Tools__InternationalLanguageTranslationEditor.st
author fm
Fri, 19 May 2006 19:09:40 +0200
changeset 2049 d10762e5d924
parent 2048 dcec4e818069
child 2050 998f72439bfc
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:libtool2' }"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: Tools }"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
ApplicationModel subclass:#InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:'languagesList keyStringsToLanguageMappings languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
		originalTextHolder modified shownLanguages selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
		showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
		keyStringAndLanguageSelectionTableColumnDescriptionHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
		languageShownHolders dataSetView lastExtractedClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
		lastExtractedApplicationClass stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
		monitoredApplication originalTextModifiedHolder
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
    13
		languageTextModifiedHolder languageTextAcceptHolder
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
    14
		inSingleFileMode lastExtractedProject lastLanguage
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
    15
		lastSelectedKey autoAccept languageEditor selectedColIndexHolder'
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    16
	classVariableNames:'LastExtractedClass LastExtractedApplicationClass
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    17
		LastExtractedProject'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Interface-UIPainter'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
Object subclass:#AccessCollectingPseudoResourcePack
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
	instanceVariableNames:'collectedKeys realResourcePack'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
Collection subclass:#KeyStringsToLanguageMappings
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    30
	instanceVariableNames:'keys keyInfo perLanguageInfo perLanguageMappings languageMappings
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
    31
		languages rowPerKey'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
Object subclass:#LanguageMappingRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
	instanceVariableNames:'key mappings'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
Visitor subclass:#UISpecVisitor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
	instanceVariableNames:'translatedLabels'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!InternationalLanguageTranslationEditor class methodsFor:'documentation'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
documentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    documentation to be added.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    [author:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        cg (cg@FUSI)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    [instance variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    [class variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    [see also:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
examples
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
  Starting the application:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
                                                                [exBegin]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    InternationalLanguageTranslationEditor open
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
                                                                [exEnd]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
  more examples to be added:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
                                                                [exBegin]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    ... add code fragment for 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    ... executable example here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
                                                                [exEnd]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
history
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    "Created: / 04-03-2006 / 09:07:19 / cg"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!InternationalLanguageTranslationEditor class methodsFor:'interface specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
windowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
     by the UIPainter of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     the UIPainter may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    "
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
    99
     UIPainter new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   100
     Tools::InternationalLanguageTranslationEditor new openInterface:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   101
     Tools::InternationalLanguageTranslationEditor open
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    <resource: #canvas>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
     #(FullSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
        name: windowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
        window: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
       (WindowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
          label: 'InternationalLanguageTranslationEditor'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
          name: 'InternationalLanguageTranslationEditor'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
          min: (Point 10 10)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
          max: (Point 1024 768)
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   115
          bounds: (Rectangle 0 0 636 396)
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
          menu: mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
        component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
       (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
          collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
           (MenuPanelSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
              name: 'ToolBar'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
              menu: menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
              textDefault: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
           (VariableVerticalPanelSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
              name: 'VariableVerticalPanel1'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
              component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
             (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
                collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
                 (DataSetSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
                    name: 'KeyStringAndLanguageSelectionTable'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
                    model: selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
                    hasHorizontalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
                    hasVerticalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
                    dataList: keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
                    columnHolder: keyStringAndLanguageSelectionTableColumnDescriptionHolder
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   140
                    beDependentOfRows: true
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
                    columnAdaptor: yourself
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
                    postBuildCallback: postBuildDataSet:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                  )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
                 (ViewSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
                    name: 'Box1'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
                    component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
                   (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
                      collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
                       (LabelSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
                          label: 'Original String (Key):'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
                          name: 'Label2'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
                          layout: (LayoutFrame 0 0 0 0 0 1 30 0)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
                          translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
                          adjust: left
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
                       (TextEditorSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                          name: 'OriginalText'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                          layout: (LayoutFrame 0 0 30 0 0 1 0 1)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                          model: originalTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                          hasHorizontalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                          hasVerticalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                          modifiedChannel: originalTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
                       )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
                     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
                    )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
                  )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
                 (ViewSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
                    name: 'Box2'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
                    component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
                   (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
                      collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
                       (LabelSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
                          label: 'Translated String:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
                          name: 'Label1'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                          layout: (LayoutFrame 0 0 0 0 0 1 30 0)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                          translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                          adjust: left
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                       (TextEditorSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                          name: 'LanguageText'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                          layout: (LayoutFrame 0 0 30 0 0 1 0 1)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                          model: languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                          hasHorizontalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                          hasVerticalScrollBar: true
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   186
                          acceptChannel: languageTextAcceptHolder
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                          modifiedChannel: languageTextModifiedHolder
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   188
                          postBuildCallback: languageEditorBuilt:
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                       )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                    )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                  )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                 )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
               
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
              )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
              handles: (Any 0.33333333333333 0.66666666666667 1.0)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
           )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
         
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
!InternationalLanguageTranslationEditor class methodsFor:'menu specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
     MenuEditor new openOnClass:InternationalLanguageTranslationEditor andSelector:#mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
     (Menu new fromLiteralArrayEncoding:(InternationalLanguageTranslationEditor mainMenu)) startUp
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
            label: 'File'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
                  label: 'New'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
                  itemValue: menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
                  label: 'Open Resource File...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
                  itemValue: menuOpen
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
                  label: 'Save Resource File'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
                  itemValue: menuSave
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
                  label: 'Save Resource File As...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                  itemValue: menuSaveAs
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                  label: 'Exit'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                  itemValue: closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
            label: 'View'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
                  label: 'Show Missing Translations Only'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
                  indication: showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
                  label: 'Shown Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
                  submenuChannel: shownLanguagesMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
            label: 'Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
                  label: 'Add Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
                  itemValue: addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
                  label: 'Remove Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
                  itemValue: removeLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
            label: 'Translations'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
                  label: 'Add Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
                  itemValue: addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
                  label: 'Remove Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
                  itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
                  label: 'Extract from Class...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
                  itemValue: extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
               (MenuItem
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   339
                  label: 'Extract from Project...'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   340
                  itemValue: extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   341
                  translateLabel: true
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   342
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   343
               (MenuItem
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   344
                  label: '-'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   345
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   346
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                  label: 'Run Application and Collect Translations...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
                  itemValue: runApplicationAndCollectTranslations
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
            label: 'Help'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
            startGroup: right
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
                  label: 'Documentation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
                  itemValue: openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
                  label: 'About this Application...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
                  itemValue: openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
     MenuEditor new openOnClass:InternationalLanguageTranslationEditor andSelector:#menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
     (Menu new fromLiteralArrayEncoding:(InternationalLanguageTranslationEditor menuToolBar)) startUp
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
            label: 'Save'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
            label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
            label: 'Add Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
            itemValue: addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
            labelImage: (ResourceRetriever XPToolbarIconLibrary newRowIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
            label: 'Remove Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
            itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
            labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
            label: ''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
            label: 'Stop Application'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
            itemValue: stopApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
            isVisible: stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
            labelImage: (ResourceRetriever XPToolbarIconLibrary stop16x16Icon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   440
!InternationalLanguageTranslationEditor class methodsFor:'tableColumns specs'!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   441
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   442
keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   443
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   444
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   445
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   446
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   447
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   448
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   449
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   450
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   451
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   452
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   453
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   454
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   455
    ^#(
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   456
      (DataSetColumnSpec
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   457
         label: 'Key'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   458
         labelButtonType: Button
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   459
         minWidth: 50
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   460
         model: keyStringInRow:
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   461
       )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   462
      )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   463
!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   464
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   465
languageTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   466
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   467
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   468
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   469
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   470
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   471
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   472
    "
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   473
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#languageTableColumn
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   474
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   475
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   476
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   477
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   478
    ^#(
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   479
      (DataSetColumnSpec
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   480
         label: lang
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   481
         labelButtonType: Button
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   482
         minWidth: 50
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   483
         editorType: None
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   484
         model: columnInRow:at:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   485
         backgroundSelector: getBackgroundForRow:rowNr:col:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   486
       )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   487
      )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   488
! !
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   489
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   490
!InternationalLanguageTranslationEditor methodsFor:'accessing'!
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   491
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   492
autoAccept
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   493
    autoAccept isNil ifTrue:[autoAccept := true].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   494
    ^ autoAccept
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   495
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   496
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   497
autoAccept:something
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   498
    autoAccept := something.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   499
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   500
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   501
newLanguageText
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   502
"/   languageEditor accept
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   503
^self languageTextHolder value isNil 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   504
    ifTrue:['']
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   505
    ifFalse:[self languageTextHolder value asCollectionOfLines first.]
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   506
! !
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   507
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
!InternationalLanguageTranslationEditor methodsFor:'aspects'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
    keyStringsToLanguageMappings isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
        keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
    ^ keyStringsToLanguageMappings.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
keyStringAndLanguageSelectionTableColumnDescriptionHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
    keyStringAndLanguageSelectionTableColumnDescriptionHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
        keyStringAndLanguageSelectionTableColumnDescriptionHolder := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
        keyStringAndLanguageSelectionTableColumnDescriptionHolder value:(self keyStringAndLanguageSelectionTableColumnDescription).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
    ^ keyStringAndLanguageSelectionTableColumnDescriptionHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
languageAtCol:colNr
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
    ^ shownLanguages at:colNr-1.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
languageShownHolderFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
    |holder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
    languageShownHolders isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
        languageShownHolders := Dictionary new
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    holder := languageShownHolders 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
                at:lang 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
                ifAbsentPut:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
                    |h|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
                    h := true asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
                    h onChangeEvaluate:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
                        h value ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
                           self enableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
                        ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
                           self disableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
                        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
                    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
                    h
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
                ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
    ^ holder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   553
languageTextAcceptHolder
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   554
    languageTextAcceptHolder isNil ifTrue:[
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   555
        languageTextAcceptHolder := false asValue.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   556
        languageTextAcceptHolder onChangeSend:#languageTextAccepted to:self.
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   557
    ].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   558
    ^ languageTextAcceptHolder.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   559
!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   560
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   561
languageTextAccepted       
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   562
                                         "
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   563
self updateLanguageTextModification.    "
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   564
self selectedKeyRow value: self selectedKeyRow value + 1.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   565
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   566
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
    languageTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
        languageTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
    ^ languageTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
languageTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
    languageTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
        languageTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
    ^ languageTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
languagesList
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
    languagesList isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
        languagesList := List withAll:(self keyStringAndLanguageSelectionTable languages).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
    ^ languagesList.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
originalTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
    originalTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
        originalTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
    ^ originalTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
originalTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
    originalTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
        originalTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
    ^ originalTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
    selectedKeyRow isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
        selectedKeyRow := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
        selectedKeyRow onChangeSend:#selectionChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
    ^ selectedKeyRow.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
    showMissingTranslationsOnly isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
        showMissingTranslationsOnly := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
    ^ showMissingTranslationsOnly.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
shownLanguages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
    shownLanguages isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
        shownLanguages := List new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
        shownLanguages addAll:(self languagesList).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
        shownLanguages onChangeSend:#shownLanguagesChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
    ^ shownLanguages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
    stopApplicationIconVisibleHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   628
        stopApplicationIconVisibleHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   629
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    ^ stopApplicationIconVisibleHolder.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   631
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   632
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   633
updateLanguageAndKeySelection
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   634
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   635
    |rowSelectionIndex colSelectionIndex language selectedKey originalText languageText|
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   636
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   637
    colSelectionIndex := dataSetView selectedColIndex.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   638
    language := colSelectionIndex > 1 ifTrue:[ shownLanguages at:colSelectionIndex-1 ] ifFalse:nil.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   639
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   640
    rowSelectionIndex := self selectedKeyRow value.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   641
    rowSelectionIndex ~~ 0 ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   642
        selectedKey := keyStringsToLanguageMappings keyAt:rowSelectionIndex.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   643
        originalText := selectedKey storeString.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   644
        language notNil ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   645
            languageText := keyStringsToLanguageMappings at:selectedKey language:language.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   646
            languageText notNil ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   647
                languageText := languageText storeString.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   648
            ]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   649
        ]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   650
    ].              
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   651
    self originalTextHolder value:originalText.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   652
    self languageTextHolder value:languageText.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   653
    lastLanguage := language.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   654
    lastSelectedKey := selectedKey. 
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   657
!InternationalLanguageTranslationEditor methodsFor:'change & update'!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   658
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   659
update:something with:aParameter from:changedObject
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   660
    changedObject == shownLanguages ifTrue:[
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   661
         self shownLanguagesChanged.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   662
         ^ self.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   663
    ].
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   664
    changedObject == languageTextAcceptHolder ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   665
         self updateLanguageTextModification.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   666
         ^ self.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   667
    ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   668
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   669
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   670
updateKeyStringsToLanguageMappings           
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   671
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   672
      keyStringsToLanguageMappings 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   673
        at:lastSelectedKey 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   674
        language:lastLanguage 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   675
        put: self newLanguageText.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   676
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   677
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   678
updateLanguageTextModification 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   679
     self languageTextModifiedHolder value ifTrue:[ 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   680
        (self autoAccept or:[Dialog confirm:'Accept changed translation ?']) ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   681
            self languageTextModifiedHolder value:false.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   682
            self languageTextHolder value:languageEditor contents.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   683
            lastLanguage notNil ifTrue:[self updateKeyStringsToLanguageMappings.]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   684
        ]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   685
    ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   686
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   687
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   688
updateOriginalTextModification
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   689
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   690
|answer|
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   691
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   692
    self originalTextModifiedHolder value ifTrue:[ 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   693
        answer := OptionBox 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   694
                      request:'Accept changed original text (key) ?' 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   695
                      label:'Original text (key) changed'
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   696
                      image:(WarningBox iconBitmap)
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   697
                      buttonLabels:#('Cancel' 'Accept' 'Accept As New')
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   698
                      values:#(nil #accept #acceptAsNew)
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   699
                      default:#acceptAsNew.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   700
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   701
        answer isNil ifTrue:[^ self originalTextModifiedHolder value:false. ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   702
        answer == #accept ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   703
self halt.        ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   704
        answer == #acceptAsNew ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   705
self halt.        ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   706
    ].
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   707
! !
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   708
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
!InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    "asks for permission before closing"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
    self hasUnsavedChanges ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
            confirm:(resources string:'Close without saving ?')
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
            default:false) ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
            ^ self
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
        ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
    super closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
    modified := false.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   727
    inSingleFileMode := false.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
    super initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   731
languageEditorBuilt:aView
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   732
    languageEditor := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   733
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   734
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   735
postBuildDataSet:aView
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   736
    dataSetView := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   737
    aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
!InternationalLanguageTranslationEditor methodsFor:'menu actions'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    lang := Dialog request:'New language (ISO symbol):'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
    lang isEmptyOrNil ifTrue:[^ self].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    (keyStringsToLanguageMappings includesLanguage:lang) ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
    keyStringsToLanguageMappings addLanguage:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    self languagesList add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    self shownLanguages add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
    |key index|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
    key := Dialog request:'New Key:'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
    (keyStringsToLanguageMappings includesKey:key) ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
        keyStringsToLanguageMappings addKey:key.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
        modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
    index := keyStringsToLanguageMappings indexOfKey:key.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
    self selectedKeyRow value:index
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
    |aClass newTranslations|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
    aClass := Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
                requestClass:'Class to extract translations from:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
                okLabel:'OK' 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   775
                initialAnswer:(lastExtractedClass ? LastExtractedClass).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
    aClass isNil ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
    lastExtractedClass := LastExtractedClass := aClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   780
    newTranslations := self extractTranslationsFromClass:aClass.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   781
    self addAllTranslations:newTranslations.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   782
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   783
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   784
extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   785
    |box projectID newTranslations|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   786
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   787
    box := ListSelectionBox new.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   788
"/    box useComboBoxWithList:(Smalltalk allProjectIDs).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   789
    box title:(resources string:'Project to extract translations from:').
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   790
    box list:Smalltalk allProjectIDs.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   791
    box okAction:[:sel | projectID := sel].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   792
    box initialText:(lastExtractedProject ? LastExtractedProject).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   793
    box label:'Find Translations in Project'.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   794
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   795
    box showAtPointer.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   796
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   797
    projectID notNil ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   798
        projectID := projectID withoutSeparators asSymbol.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   799
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   800
    projectID isEmptyOrNil ifTrue:[^ self ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   801
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   802
    lastExtractedProject := LastExtractedProject := projectID.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   803
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
    newTranslations := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   806
    Smalltalk allClassesDo:[:eachClass |
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   807
        eachClass theNonMetaclass package == projectID ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   808
"/ eachClass isLoaded ifTrue:[ self halt. ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   809
            newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   810
        ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   813
    self addAllTranslations:newTranslations.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
    modified ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   818
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
            confirm:(resources stringWithCRs:'Modified translations have not been changed.\\Create new translations set anyway ?')
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
            default:false) ifFalse:[^ self].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   822
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
    keyStringsToLanguageMappings initialize.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
    keyStringsToLanguageMappings changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   826
    self languagesList contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   827
    self shownLanguages contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
    modified := false.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
menuOpen
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
    |fn|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
    fn := Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
        requestFileName:'Name of resource file:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
        default:nil 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
        pattern:'*.rs'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   839
    fn isEmptyOrNil ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
    fn := fn asFilename.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
    fn exists ifFalse:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
    self readResourceFile:fn
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
menuSave
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
     It will be invoked when the menu-item 'save' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
    "/ change below and add any actions as required here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
    self warn:'no action for ''save'' available.'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
menuSaveAs
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
     It will be invoked when the menu-item 'saveAs' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
    "/ change below and add any actions as required here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
    self warn:'no action for ''saveAs'' available.'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
     It will be invoked when the menu-item 'help-about' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
    "/ could open a customized aboutBox here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
    super openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
     It will be invoked when the menu-item 'help-documentation' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
    "/ change below as required ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   875
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   876
    "/ to open an HTML viewer on some document (under 'doc/online/<language>/' ):
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   877
    HTMLDocumentView openFullOnDocumentationFile:'TOP.html'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   878
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   879
    "/ add application-specific help files under the 'doc/online/<language>/help/appName'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   880
    "/ directory, and open a viewer with:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   881
    "/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   882
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   883
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   884
readResourceFile:aFilename
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   885
    |lang|
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   886
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   887
    lang := Dialog choose:'For which language ?' fromList:languagesList lines:10.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   888
    lang isNil ifTrue:[^ self ].
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   889
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   890
    self readResourceFile:aFilename asLanguage:lang asSymbol
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   891
!
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   892
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   893
readResourceFile:aFilename asLanguage:lang
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   894
    |resourcePack inStream lineString encoding decoder sortedKeys remainingKeys|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   895
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   896
    aFilename exists ifFalse:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   897
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   898
    resourcePack := ResourcePack new.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   899
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   900
    inStream := aFilename readStream.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
    [inStream atEnd] whileFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   902
        lineString := inStream nextLine.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   903
        (lineString notEmpty 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   904
        and:[ (lineString startsWith:';') not ]) ifTrue:[
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   905
            ((lineString startsWith:'#') and:[(lineString startsWith:'#(') not]) ifTrue:[
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   906
                lineString := (lineString copyFrom:2) withoutSeparators.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   907
                (lineString startsWith:'encoding ') ifTrue:[
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   908
                    encoding := ResourcePack extractEncodingFromLine:lineString.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   909
                    decoder := CharacterEncoder encoderFor:encoding ifAbsent:nil.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   910
                ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   911
            ] ifFalse:[
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   912
                ResourcePack
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   913
                    processResourceLine:lineString 
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   914
                    encoding:decoder 
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   915
                    file:aFilename pathName 
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   916
                    printErrorWith:[:msg | Transcript showCR:msg ] 
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   917
                    for:resourcePack
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   918
                    keepUselessTranslations:true.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   919
            ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   920
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
    inStream close.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   923
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   924
    sortedKeys := (resourcePack keys select:[:k | k isString]) asSortedCollection.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   925
    remainingKeys := resourcePack keys select:[:k | k isString not].
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   926
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   927
    sortedKeys do:[:k |
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   928
        keyStringsToLanguageMappings at:k language:lang put:(resourcePack at:k)
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   929
    ].
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   930
    remainingKeys do:[:k |
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   931
        keyStringsToLanguageMappings at:k language:lang put:(resourcePack at:k)
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
   932
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   933
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   934
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   935
removeLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   936
    "automatically generated by UIEditor ..."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
    "*** the code below performs no action"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   939
    "*** (except for some feedback on the Transcript)"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   940
    "*** Please change as required and accept in the browser."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   941
    "*** (and replace this comment by something more useful ;-)"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   942
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   943
    "action to be added ..."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   944
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   945
    Transcript showCR:self class name, ': action for #removeLanguage ...'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   946
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   947
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   948
removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   949
    |rowSelectionIndex selectedKey|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   950
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
    rowSelectionIndex := self selectedKeyRow value.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
    rowSelectionIndex ~~ 0 ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
        selectedKey := keyStringsToLanguageMappings keyAt:rowSelectionIndex ifAbsent:nil.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
        (Dialog confirm:(resources string:'Really remove key %1' with:selectedKey)) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   955
            keyStringsToLanguageMappings removeKey:selectedKey.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   956
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   957
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   958
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   959
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   960
runApplicationAndCollectTranslations
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   961
    |applicationClass newTranslations pseudoPack app startSelector|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   962
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   963
    monitoredApplication notNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
        monitoredApplication terminate.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
        [monitoredApplication notNil] whileTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   966
            Delay waitForSeconds:0.1
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   967
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   968
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   969
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   970
    applicationClass := Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   971
                requestClass:'Application class to start and collect translations from:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   972
                okLabel:'OK' 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   973
                initialAnswer:(lastExtractedApplicationClass ? LastExtractedApplicationClass ).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
    applicationClass isNil ifTrue:[^ self ].
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   975
    applicationClass isNamespace ifTrue:[
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   976
        Dialog warn:'Entered class is a NameSpace'.
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   977
        ^ self.
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   978
    ].
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   979
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   980
    applicationClass isVisualStartable ifTrue:[
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   981
        startSelector := #open
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   982
    ] ifFalse:[
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   983
        startSelector := Dialog
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   984
                    request:'Entered class seems to be no application class. Ok to start using selector:'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   985
                    initialAnswer:((applicationClass respondsTo:#'start')
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   986
                                        ifTrue:#'start'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   987
                                        ifFalse:#'new')
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   988
                    okLabel:'START'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   989
                    title:'Start Application'.
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   990
        startSelector isNil ifTrue:[
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   991
            ^ self
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   992
        ].
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   993
        startSelector := startSelector asSymbol.
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   994
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   995
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
    lastExtractedApplicationClass := LastExtractedApplicationClass := applicationClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   998
    newTranslations := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   999
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1000
    pseudoPack := AccessCollectingPseudoResourcePack new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1001
    pseudoPack realResourcePack:(applicationClass classResources).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1002
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1003
    self stopApplicationIconVisibleHolder value:true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1004
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1005
    monitoredApplication := [
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1006
        [
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1007
            app := applicationClass new.
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1008
            app perform:startSelector.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1009
            app window waitUntilVisible.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1010
            app window waitUntilClosed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1011
        ] ensure:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
            app closeRequest.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
            self stopApplicationIconVisibleHolder value:false.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
            monitoredApplication := nil.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
    ] fork.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1018
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
!InternationalLanguageTranslationEditor methodsFor:'menus dynamic'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
disableLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
    self shownLanguages remove:lang ifAbsent:[]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1024
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
enableLanguageDisplayFor:newLang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1026
    |shownLanguagesInOrder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1027
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1028
    (self shownLanguages includes:newLang) ifFalse:[
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1029
"/        shownLanguagesInOrder := self languagesList
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1030
"/                                    select:[:lang | (self shownLanguages includes:lang)
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1031
"/                                                    or:[ lang = newLang ]].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1032
"/        self shownLanguages contents:shownLanguagesInOrder.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1033
        self shownLanguages add:newLang.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1034
    ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1035
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1036
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1037
isLanguageShown:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1038
    ^ self shownLanguages includes:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1039
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1040
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1041
shownLanguagesMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1042
    <resource: #programMenu >
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1043
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1044
    ^ [
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1045
        |m selected|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1046
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1047
        m := Menu new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1048
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1049
        self languagesList do:[:lang |
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1050
            |item|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1051
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1052
            item := MenuItem label:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1053
            item indication:(self languageShownHolderFor:lang).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1054
            item hideMenuOnActivated:false.    
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1055
            m addItem:item.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1056
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1057
        m
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1058
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1059
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1060
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1061
toggleLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1062
    (self shownLanguages includes:lang) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1063
        self disableLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1064
    ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1065
        self enableLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1066
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1067
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1068
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
!InternationalLanguageTranslationEditor methodsFor:'private-key extraction'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1071
addAllTranslations:newTranslations
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1072
    |newTranslationKeys stringKeys nonStringKeys|
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1073
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1074
    newTranslationKeys := newTranslations select:[:k | k notEmpty and:[k isString not or:[k isBlank not]]].
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1075
    newTranslationKeys := newTranslationKeys select:[:k | (keyStringsToLanguageMappings includesKey:k) not].
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1076
    newTranslationKeys := newTranslationKeys 
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1077
                                collect:[:k | 
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1078
                                        (k endsWith:'...') ifTrue:[
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1079
                                            k copyWithoutLast:3.
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1080
                                        ] ifFalse:[
2035
ea8ec7c3fbeb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1081
                                            ('.:?' includes:k last) ifTrue:[
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1082
                                                k copyWithoutLast:1.
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1083
                                            ] ifFalse:[
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1084
                                                k
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1085
                                        ]]].
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1086
    newTranslationKeys := newTranslationKeys asSet.
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1087
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1088
    newTranslationKeys notEmpty ifTrue:[
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1089
        stringKeys := newTranslationKeys select:[:k | k isString].
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1090
        nonStringKeys := newTranslationKeys select:[:k | k isString not].
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1091
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1092
        stringKeys := stringKeys asSortedCollection.
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1093
        keyStringsToLanguageMappings addKeys:stringKeys.
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  1094
        keyStringsToLanguageMappings addKeys:nonStringKeys.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1095
        modified := true.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1096
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1097
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1098
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1099
extractTranslationsFromClass:aClass
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1100
    |newTranslations|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1101
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1102
    newTranslations := Set new.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1103
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1104
    self withWaitCursorDo:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1105
        "/ now, the hard part:
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1106
        "/ possible translations are in the specs,
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1107
        "/ and all arguments to (resources string:) messages.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1108
        aClass instAndClassMethodsDo:[:eachMethod |
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1109
            newTranslations addAll:( self extractTranslationsFromMethod:eachMethod ).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1110
        ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1111
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1112
    ^ newTranslations
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1113
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1114
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1115
extractTranslationsFromHelpSpecMethod:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1116
    |codeStrings matcher parseTree resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1117
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1118
    parseTree := RBParser 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1119
            parseMethod:aMethod source 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1120
            onError: [:str :pos | Transcript showCR:str. Transcript showCR:pos.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1121
                                  nil].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1122
    parseTree isNil ifTrue:[^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1123
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1124
    codeStrings  := 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1125
        #(
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1126
                '`@dict addPairsFrom: `#helpKeysAndStrings'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1127
        ).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1128
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1129
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1130
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1131
    matcher := ParseTreeSearcher new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1132
    matcher 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1133
        matchesAnyOf: codeStrings 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1134
        do: [:aNode :answer |
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1135
                |sel argNode arg|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1136
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1137
                sel := aNode selector.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1138
                (sel startsWith:'addPairsFrom:') ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1139
                    argNode := aNode arguments at:1.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1140
                    argNode isLiteral ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1141
                        arg := argNode value.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1142
                        arg isArray ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1143
                            arg doWithIndex:[:el :index |
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1144
                                index even ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1145
                                    el isString ifTrue:[    
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1146
                                        resourceKeys add:el.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1147
                                    ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1148
                                ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1149
                            ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1150
                        ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1151
                            Transcript 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
                                showCR:(resources 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1153
                                        string:'Cannot derive resourceKey from non-array in %1 in %2'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1154
                                        with:argNode formattedCode
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1155
                                        with:aMethod selector).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1156
                        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1157
                    ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1158
                        Transcript 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1159
                            showCR:(resources 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1160
                                        string:'Cannot derive resourceKey from non-literal: %1 in %2'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1161
                                        with:argNode formattedCode
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1162
                                        with:aMethod selector).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1163
                    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1164
                ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1165
                aNode
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1166
            ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1167
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1168
    matcher executeTree: parseTree initialAnswer: nil.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1169
    ^ resourceKeys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1170
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1171
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1172
extractTranslationsFromMenuSpecMethod:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1173
    |menu resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1174
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1175
    menu := aMethod mclass theNonMetaclass perform:aMethod selector.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1176
    menu isNil ifTrue:[ ^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1177
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1178
    (menu isKindOf:Menu) ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1179
        menu := Menu new fromLiteralArrayEncoding:menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1180
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1181
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1182
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1183
    menu allItemsDo:[:aMenuItem |
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1184
        aMenuItem translateLabel ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1185
            aMenuItem isSeparatorItem ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1186
                resourceKeys add:aMenuItem label.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1187
            ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1188
        ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1189
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1190
    ^ resourceKeys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1191
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1192
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1193
extractTranslationsFromMethod:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1194
    |mResources|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1195
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1196
    mResources := aMethod resources.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1197
    mResources notNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
        (mResources includesKey:#menu) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
             ^ self extractTranslationsFromMenuSpecMethod:aMethod.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1200
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1201
        (mResources includesKey:#canvas) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
             ^ self extractTranslationsFromUISpecMethod:aMethod.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1203
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1204
        (mResources includesKey:#help) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1205
             ^ self extractTranslationsFromHelpSpecMethod:aMethod.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1206
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1207
        (mResources includesKey:#tableColumns) ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1208
             ^ self extractTranslationsFromTableColumnsSpecMethod:aMethod.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1209
        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1210
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1211
        ^ self extractTranslationsFromSpecMethod:aMethod.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1212
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1213
    ^ self extractTranslationsFromMethodsCode:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1214
!