Tools__InternationalLanguageTranslationEditor.st
author fm
Tue, 25 Mar 2008 10:07:10 +0100
changeset 2323 9b257cbd0ea9
parent 2163 641467b2f522
child 2327 a1db8e464b02
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
2050
fm
parents: 2049
diff changeset
    15
		lastSelectedKey autoAcceptHolder languageEditor
fm
parents: 2049
diff changeset
    16
		selectedColIndexHolder exampleLanguageSelectionHolder
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
    17
		exampleLanguageTextHolder pastePreviousTranslationEnableHolder
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
    18
		searchForSimilarTranslationEnableHolder alwaysWriteUTF8Holder
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
    19
		lastNameSpace pasteOriginalEnableHolder'
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    20
	classVariableNames:'LastExtractedClass LastExtractedApplicationClass
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    21
		LastExtractedProject'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
	category:'Interface-UIPainter'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
Object subclass:#AccessCollectingPseudoResourcePack
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
	instanceVariableNames:'collectedKeys realResourcePack'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
Collection subclass:#KeyStringsToLanguageMappings
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    34
	instanceVariableNames:'keys keyInfo perLanguageInfo perLanguageMappings languageMappings
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
    35
		languages rowPerKey'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
Object subclass:#LanguageMappingRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
	instanceVariableNames:'key mappings'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
Visitor subclass:#UISpecVisitor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
	instanceVariableNames:'translatedLabels'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!InternationalLanguageTranslationEditor class methodsFor:'documentation'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
documentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    documentation to be added.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    [author:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
        cg (cg@FUSI)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    [instance variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    [class variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    [see also:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
examples
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
  Starting the application:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
                                                                [exBegin]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    InternationalLanguageTranslationEditor open
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
                                                                [exEnd]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
  more examples to be added:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
                                                                [exBegin]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    ... add code fragment for 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ... executable example here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
                                                                [exEnd]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
"
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
history
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "Created: / 04-03-2006 / 09:07:19 / cg"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
!InternationalLanguageTranslationEditor class methodsFor:'interface specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
windowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
     by the UIPainter of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
     the UIPainter may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   103
     UIPainter new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   104
     Tools::InternationalLanguageTranslationEditor new openInterface:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   105
     Tools::InternationalLanguageTranslationEditor open
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    <resource: #canvas>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
     #(FullSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
        name: windowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
        window: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
       (WindowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
          label: 'InternationalLanguageTranslationEditor'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
          name: 'InternationalLanguageTranslationEditor'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
          min: (Point 10 10)
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   118
          bounds: (Rectangle 0 0 778 614)
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
          menu: mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
        component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
       (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
          collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
           (MenuPanelSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
              name: 'ToolBar'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
              menu: menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
              textDefault: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
           (VariableVerticalPanelSpec
2050
fm
parents: 2049
diff changeset
   131
              name: 'VariableVerticalPanel2'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
              component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
             (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
                collection: (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
                 (DataSetSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
                    name: 'KeyStringAndLanguageSelectionTable'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
                    model: selectedKeyRow
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   139
                    menu: keyStringAndLanguageSelectionTableMenu
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
                    hasHorizontalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
                    hasVerticalScrollBar: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
                    dataList: keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                    columnHolder: keyStringAndLanguageSelectionTableColumnDescriptionHolder
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   144
                    beDependentOfRows: true
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
                    columnAdaptor: yourself
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
                    postBuildCallback: postBuildDataSet:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
                  )
2050
fm
parents: 2049
diff changeset
   148
                 (VariableVerticalPanelSpec
fm
parents: 2049
diff changeset
   149
                    name: 'VariableVerticalPanel1'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
                    component: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
                   (SpecCollection
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
                      collection: (
2050
fm
parents: 2049
diff changeset
   153
                       (ViewSpec
fm
parents: 2049
diff changeset
   154
                          name: 'Box1'
fm
parents: 2049
diff changeset
   155
                          component: 
fm
parents: 2049
diff changeset
   156
                         (SpecCollection
fm
parents: 2049
diff changeset
   157
                            collection: (
fm
parents: 2049
diff changeset
   158
                             (LabelSpec
fm
parents: 2049
diff changeset
   159
                                label: 'Original String (Key):'
fm
parents: 2049
diff changeset
   160
                                name: 'Label2'
fm
parents: 2049
diff changeset
   161
                                layout: (LayoutFrame 0 0 -2 0 0 1 28 0)
fm
parents: 2049
diff changeset
   162
                                translateLabel: true
fm
parents: 2049
diff changeset
   163
                                adjust: left
fm
parents: 2049
diff changeset
   164
                              )
fm
parents: 2049
diff changeset
   165
                             (TextEditorSpec
fm
parents: 2049
diff changeset
   166
                                name: 'OriginalText'
fm
parents: 2049
diff changeset
   167
                                layout: (LayoutFrame 0 0 27 0 0 1 -2 1)
fm
parents: 2049
diff changeset
   168
                                model: originalTextHolder
fm
parents: 2049
diff changeset
   169
                                hasHorizontalScrollBar: true
fm
parents: 2049
diff changeset
   170
                                hasVerticalScrollBar: true
fm
parents: 2049
diff changeset
   171
                                modifiedChannel: originalTextModifiedHolder
fm
parents: 2049
diff changeset
   172
                                acceptCallBack: languageTextAccepted
fm
parents: 2049
diff changeset
   173
                              )
fm
parents: 2049
diff changeset
   174
                             )
fm
parents: 2049
diff changeset
   175
                           
fm
parents: 2049
diff changeset
   176
                          )
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                        )
2050
fm
parents: 2049
diff changeset
   178
                       (ViewSpec
fm
parents: 2049
diff changeset
   179
                          name: 'Box3'
fm
parents: 2049
diff changeset
   180
                          component: 
fm
parents: 2049
diff changeset
   181
                         (SpecCollection
fm
parents: 2049
diff changeset
   182
                            collection: (
fm
parents: 2049
diff changeset
   183
                             (LabelSpec
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   184
                                label: 'Select Another Language as example:'
2050
fm
parents: 2049
diff changeset
   185
                                name: 'Label3'
fm
parents: 2049
diff changeset
   186
                                layout: (LayoutFrame 0 0 -6 0 0 1 24 0)
fm
parents: 2049
diff changeset
   187
                                translateLabel: true
fm
parents: 2049
diff changeset
   188
                                adjust: left
fm
parents: 2049
diff changeset
   189
                              )
fm
parents: 2049
diff changeset
   190
                             (ComboBoxSpec
fm
parents: 2049
diff changeset
   191
                                name: 'ComboBox1'
fm
parents: 2049
diff changeset
   192
                                layout: (LayoutFrame 197 0 -2 0 322 0 18 0)
fm
parents: 2049
diff changeset
   193
                                model: exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
   194
                                immediateAccept: false
fm
parents: 2049
diff changeset
   195
                                acceptOnLeave: true
fm
parents: 2049
diff changeset
   196
                                acceptOnLostFocus: true
fm
parents: 2049
diff changeset
   197
                                acceptOnPointerLeave: false
fm
parents: 2049
diff changeset
   198
                                comboList: shownLanguages
fm
parents: 2049
diff changeset
   199
                                useIndex: false
fm
parents: 2049
diff changeset
   200
                              )
fm
parents: 2049
diff changeset
   201
                             (TextEditorSpec
fm
parents: 2049
diff changeset
   202
                                name: 'ExampleLanguageText'
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   203
                                layout: (LayoutFrame 0 0 30 0 0 1 0 1)
2050
fm
parents: 2049
diff changeset
   204
                                model: exampleLanguageTextHolder
fm
parents: 2049
diff changeset
   205
                                hasHorizontalScrollBar: true
fm
parents: 2049
diff changeset
   206
                                hasVerticalScrollBar: true
fm
parents: 2049
diff changeset
   207
                                isReadOnly: true
fm
parents: 2049
diff changeset
   208
                              )
fm
parents: 2049
diff changeset
   209
                             )
fm
parents: 2049
diff changeset
   210
                           
fm
parents: 2049
diff changeset
   211
                          )
fm
parents: 2049
diff changeset
   212
                        )
fm
parents: 2049
diff changeset
   213
                       (ViewSpec
fm
parents: 2049
diff changeset
   214
                          name: 'Box2'
fm
parents: 2049
diff changeset
   215
                          component: 
fm
parents: 2049
diff changeset
   216
                         (SpecCollection
fm
parents: 2049
diff changeset
   217
                            collection: (
fm
parents: 2049
diff changeset
   218
                             (LabelSpec
fm
parents: 2049
diff changeset
   219
                                label: 'Translated String:'
fm
parents: 2049
diff changeset
   220
                                name: 'Label1'
fm
parents: 2049
diff changeset
   221
                                layout: (LayoutFrame 0 0 0 0 0 1 30 0)
fm
parents: 2049
diff changeset
   222
                                translateLabel: true
fm
parents: 2049
diff changeset
   223
                                adjust: left
fm
parents: 2049
diff changeset
   224
                              )
fm
parents: 2049
diff changeset
   225
                             (TextEditorSpec
fm
parents: 2049
diff changeset
   226
                                name: 'LanguageText'
fm
parents: 2049
diff changeset
   227
                                layout: (LayoutFrame 0 0 30 0 0 1 0 1)
fm
parents: 2049
diff changeset
   228
                                model: languageTextHolder
fm
parents: 2049
diff changeset
   229
                                hasHorizontalScrollBar: true
fm
parents: 2049
diff changeset
   230
                                hasVerticalScrollBar: true
fm
parents: 2049
diff changeset
   231
                                acceptChannel: languageTextAcceptHolder
fm
parents: 2049
diff changeset
   232
                                modifiedChannel: languageTextModifiedHolder
fm
parents: 2049
diff changeset
   233
                                acceptCallBack: languageTextAccepted
fm
parents: 2049
diff changeset
   234
                                postBuildCallback: languageEditorBuilt:
fm
parents: 2049
diff changeset
   235
                              )
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   236
                             (ActionButtonSpec
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   237
                                label: 'Paste Previous'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   238
                                name: 'pastePreviousTranslation'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   239
                                layout: (LayoutOrigin 0 0.83085250338295 0 0.03448275862069)
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   240
                                translateLabel: true
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   241
                                model: pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   242
                                enableChannel: pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   243
                                disabledLogo: 'Paste Previous'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   244
                              )
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   245
                             (ActionButtonSpec
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   246
                                label: 'Paste Original'
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   247
                                name: 'Button1'
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   248
                                layout: (LayoutOrigin -95 0.83085250338295 0 0.03448275862069)
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   249
                                translateLabel: true
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   250
                                model: pasteOriginalInLanguageText
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   251
                                enableChannel: pasteOriginalEnableHolder
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   252
                                disabledLogo: 'Paste Original'
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   253
                              )
2050
fm
parents: 2049
diff changeset
   254
                             )
fm
parents: 2049
diff changeset
   255
                           
fm
parents: 2049
diff changeset
   256
                          )
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                       )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
                     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                    )
2050
fm
parents: 2049
diff changeset
   261
                    handles: (Any 0.33333333333333 0.66666666666667 1.0)
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                  )
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
              )
2050
fm
parents: 2049
diff changeset
   266
              handles: (Any 0.5 1.0)
2015
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
         
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
!InternationalLanguageTranslationEditor class methodsFor:'menu specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   276
keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   277
    "This resource specification was automatically generated
641467b2f522 Search String
fm
parents: 2053
diff changeset
   278
     by the MenuEditor of ST/X."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   279
641467b2f522 Search String
fm
parents: 2053
diff changeset
   280
    "Do not manually edit this!! If it is corrupted,
641467b2f522 Search String
fm
parents: 2053
diff changeset
   281
     the MenuEditor may not be able to read the specification."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   282
641467b2f522 Search String
fm
parents: 2053
diff changeset
   283
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   284
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   285
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor keyStringAndLanguageSelectionTableMenu)) startUp
641467b2f522 Search String
fm
parents: 2053
diff changeset
   286
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   287
641467b2f522 Search String
fm
parents: 2053
diff changeset
   288
    <resource: #menu>
641467b2f522 Search String
fm
parents: 2053
diff changeset
   289
641467b2f522 Search String
fm
parents: 2053
diff changeset
   290
    ^ 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   291
     #(Menu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   292
        (
641467b2f522 Search String
fm
parents: 2053
diff changeset
   293
         (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   294
            label: 'Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   295
            itemValue: changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   296
            translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   297
          )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   298
         (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   299
            label: 'Search String in Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   300
            itemValue: searchStringInLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   301
            translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   302
          )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   303
         )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   304
        nil
641467b2f522 Search String
fm
parents: 2053
diff changeset
   305
        nil
641467b2f522 Search String
fm
parents: 2053
diff changeset
   306
      )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   307
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
   308
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
    "
2050
fm
parents: 2049
diff changeset
   317
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#mainMenu
fm
parents: 2049
diff changeset
   318
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor mainMenu)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
            label: 'File'
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
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
                  label: 'New'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
                  itemValue: menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
                  label: 'Open Resource File...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                  itemValue: menuOpen
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
               (MenuItem
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   349
                  label: 'Save All Resource Files'
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   350
                  itemValue: menuSaveAll
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   351
                  translateLabel: true
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   352
                )
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   353
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
                  label: 'Save Resource File'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
                  itemValue: menuSave
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
                  label: 'Save Resource File As...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
                  itemValue: menuSaveAs
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
                  translateLabel: true
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: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
               (MenuItem
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   367
                  label: 'Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   368
                  itemValue: changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   369
                  translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   370
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   371
               (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   372
                  label: '-'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   373
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   374
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
                  label: 'Exit'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
                  itemValue: closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
            label: 'View'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                  label: 'Show Missing Translations Only'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
                  indication: showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
                  label: 'Shown Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
                  submenuChannel: shownLanguagesMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
            label: 'Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
                  label: 'Add Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
                  itemValue: addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
                  label: 'Remove Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
                  itemValue: removeLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
            label: 'Translations'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
                  label: 'Add Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
                  itemValue: addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                  label: 'Remove Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                  itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
                  label: 'Extract from Class...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
                  itemValue: extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
               (MenuItem
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   454
                  label: 'Extract from Project...'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   455
                  itemValue: extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   456
                  translateLabel: true
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   457
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   458
               (MenuItem
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   459
                  label: 'Extract from NameSpace...'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   460
                  itemValue: extractTranslationsFromNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   461
                  translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   462
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   463
               (MenuItem
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   464
                  label: '-'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   465
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   466
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
                  label: 'Run Application and Collect Translations...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
                  itemValue: runApplicationAndCollectTranslations
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
         (MenuItem
2050
fm
parents: 2049
diff changeset
   477
            label: 'Preferences'
fm
parents: 2049
diff changeset
   478
            translateLabel: true
fm
parents: 2049
diff changeset
   479
            submenu: 
fm
parents: 2049
diff changeset
   480
           (Menu
fm
parents: 2049
diff changeset
   481
              (
fm
parents: 2049
diff changeset
   482
               (MenuItem
fm
parents: 2049
diff changeset
   483
                  label: 'Auto Accept Changes'
fm
parents: 2049
diff changeset
   484
                  translateLabel: true
fm
parents: 2049
diff changeset
   485
                  indication: autoAcceptHolder
fm
parents: 2049
diff changeset
   486
                )
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   487
               (MenuItem
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   488
                  label: 'Search For Similar Translations'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   489
                  translateLabel: true
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   490
                  indication: searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   491
                )
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   492
               (MenuItem
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   493
                  label: 'Always Write UTF8'
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   494
                  translateLabel: true
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   495
                  indication: alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   496
                )
2050
fm
parents: 2049
diff changeset
   497
               )
fm
parents: 2049
diff changeset
   498
              nil
fm
parents: 2049
diff changeset
   499
              nil
fm
parents: 2049
diff changeset
   500
            )
fm
parents: 2049
diff changeset
   501
          )
fm
parents: 2049
diff changeset
   502
         (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
            label: 'Help'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
            startGroup: right
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
                  label: 'Documentation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
                  itemValue: openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
                  label: 'About this Application...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
                  itemValue: openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   533
menuItemsEditLanguage
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   534
    "This resource specification was automatically generated
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   535
     by the MenuEditor of ST/X."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   536
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   537
    "Do not manually edit this!! If it is corrupted,
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   538
     the MenuEditor may not be able to read the specification."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   539
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   540
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   541
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menu
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   542
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menu)) startUp
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   543
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   544
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   545
    <resource: #menu>
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   546
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   547
    ^ 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   548
     #(Menu
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   549
        (
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   550
         (MenuItem
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   551
            enabled: pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   552
            label: 'Paste Previous Translation'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   553
            itemValue: pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   554
            nameKey: pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   555
            translateLabel: true
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   556
          )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   557
         )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   558
        nil
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   559
        nil
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   560
      )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   561
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   562
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
    "
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   571
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menuToolBar
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   572
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menuToolBar)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
            label: 'Save'
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   582
            itemValue: menuSave
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
            label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
            label: 'Add Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
            itemValue: addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
            labelImage: (ResourceRetriever XPToolbarIconLibrary newRowIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
            label: 'Remove Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
            itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
            labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
            label: ''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
            label: 'Stop Application'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
            itemValue: stopApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
            isVisible: stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
            labelImage: (ResourceRetriever XPToolbarIconLibrary stop16x16Icon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   617
!InternationalLanguageTranslationEditor class methodsFor:'tableColumns specs'!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   618
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   619
keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   620
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   621
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   622
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   623
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   624
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   625
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   626
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   627
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   628
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   629
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   630
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   631
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   632
    ^#(
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   633
      (DataSetColumnSpec
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   634
         label: 'Key'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   635
         labelButtonType: Button
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   636
         minWidth: 50
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   637
         model: keyStringInRow:
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   638
       )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   639
      )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   640
!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   641
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   642
languageTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   643
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   644
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   645
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   646
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   647
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   648
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   649
    "
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   650
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#languageTableColumn
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   651
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   652
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   653
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   654
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   655
    ^#(
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   656
      (DataSetColumnSpec
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   657
         label: lang
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   658
         labelButtonType: Button
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   659
         minWidth: 50
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   660
         editorType: None
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   661
         model: columnInRow:at:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   662
         backgroundSelector: getBackgroundForRow:rowNr:col:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   663
       )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   664
      )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   665
! !
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   666
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   667
!InternationalLanguageTranslationEditor methodsFor:'accessing'!
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   668
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   669
newLanguageText
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   670
"/   languageEditor accept
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   671
    ^self languageTextHolder value isNil 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   672
        ifTrue:['']
641467b2f522 Search String
fm
parents: 2053
diff changeset
   673
        ifFalse:[self languageTextHolder value asCollectionOfLines first.]
2050
fm
parents: 2049
diff changeset
   674
!
fm
parents: 2049
diff changeset
   675
fm
parents: 2049
diff changeset
   676
selectedKey  
fm
parents: 2049
diff changeset
   677
   "Returns the current selected key if there is one row seleted. Otherwise, returns nil"
fm
parents: 2049
diff changeset
   678
     |rowSelectionIndex |
fm
parents: 2049
diff changeset
   679
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   680
    keyStringsToLanguageMappings isNil ifTrue:[^nil].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   681
    self selectedKeyRow value isNil ifTrue:[^nil].
2050
fm
parents: 2049
diff changeset
   682
    rowSelectionIndex := self selectedKeyRow value.
fm
parents: 2049
diff changeset
   683
    rowSelectionIndex == 0 ifTrue:[^nil].
fm
parents: 2049
diff changeset
   684
    ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex.
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   685
! !
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   686
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   687
!InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   688
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   689
searchForSimilarTranslation
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   690
    "Looks for a quite similar translation for the key and display a dialog with available options"
641467b2f522 Search String
fm
parents: 2053
diff changeset
   691
    |similarTranslationsAssociations selectedTranslation|
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   692
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   693
    self shouldSearchForSimilarTranslation ifFalse:[^self]. 
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   694
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   695
    similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: self selectedKey in: self currentLanguage.
641467b2f522 Search String
fm
parents: 2053
diff changeset
   696
    similarTranslationsAssociations isEmpty ifTrue:[^self].    
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   697
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   698
    similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
641467b2f522 Search String
fm
parents: 2053
diff changeset
   699
        collection detect:[:selectedAssociation |
641467b2f522 Search String
fm
parents: 2053
diff changeset
   700
            selectedAssociation value sameAs: association value] ifNone:[collection add: association].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   701
        collection].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   702
    selectedTranslation := Dialog 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   703
        choose:'Choose one if you consider itīs usefull to translate: 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   704
    ', 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   705
        '<', self selectedKey, '>  ', (self currentExampleLanguageText ifNil:[''])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   706
        fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   707
        values: (similarTranslationsAssociations collect:[:each | each value])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   708
        lines:10
641467b2f522 Search String
fm
parents: 2053
diff changeset
   709
        cancel: nil.      
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   710
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   711
    selectedTranslation notNil ifTrue:[self languageTextHolderValue: selectedTranslation]. 
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   712
! !
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   713
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
!InternationalLanguageTranslationEditor methodsFor:'aspects'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   716
alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   717
    alwaysWriteUTF8Holder isNil ifTrue:[alwaysWriteUTF8Holder := true asValue]. 
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   718
    ^ alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   719
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   720
2050
fm
parents: 2049
diff changeset
   721
autoAcceptHolder
fm
parents: 2049
diff changeset
   722
    autoAcceptHolder isNil ifTrue:[autoAcceptHolder := true asValue]. 
fm
parents: 2049
diff changeset
   723
    ^ autoAcceptHolder
fm
parents: 2049
diff changeset
   724
!
fm
parents: 2049
diff changeset
   725
fm
parents: 2049
diff changeset
   726
exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
   727
    exampleLanguageSelectionHolder isNil ifTrue:[
fm
parents: 2049
diff changeset
   728
        exampleLanguageSelectionHolder := self exampleLanguageByDefault asValue.         
fm
parents: 2049
diff changeset
   729
        exampleLanguageSelectionHolder addDependent:self.
fm
parents: 2049
diff changeset
   730
    ]. 
fm
parents: 2049
diff changeset
   731
    ^ exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
   732
!
fm
parents: 2049
diff changeset
   733
fm
parents: 2049
diff changeset
   734
exampleLanguageTextHolder
fm
parents: 2049
diff changeset
   735
    exampleLanguageTextHolder isNil ifTrue:[
fm
parents: 2049
diff changeset
   736
        exampleLanguageTextHolder := '' asValue.
fm
parents: 2049
diff changeset
   737
    ].
fm
parents: 2049
diff changeset
   738
    ^ exampleLanguageTextHolder.
fm
parents: 2049
diff changeset
   739
!
fm
parents: 2049
diff changeset
   740
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
    keyStringsToLanguageMappings isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
        keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    ^ keyStringsToLanguageMappings.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
keyStringAndLanguageSelectionTableColumnDescriptionHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
    keyStringAndLanguageSelectionTableColumnDescriptionHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
        keyStringAndLanguageSelectionTableColumnDescriptionHolder := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
        keyStringAndLanguageSelectionTableColumnDescriptionHolder value:(self keyStringAndLanguageSelectionTableColumnDescription).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    ^ keyStringAndLanguageSelectionTableColumnDescriptionHolder.
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
languageAtCol:colNr
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
    ^ shownLanguages at:colNr-1.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
languageShownHolderFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
    |holder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
    languageShownHolders isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
        languageShownHolders := Dictionary new
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
    holder := languageShownHolders 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
                at:lang 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
                ifAbsentPut:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
                    |h|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
                    h := true asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
                    h onChangeEvaluate:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
                        h value ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
                           self enableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   775
                        ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
                           self disableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
                        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
                    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
                    h
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
                ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    ^ holder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   783
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   784
languageTextAcceptHolder
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   785
    languageTextAcceptHolder isNil ifTrue:[
2050
fm
parents: 2049
diff changeset
   786
        languageTextAcceptHolder := false asValue.                        
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   787
    ].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   788
    ^ languageTextAcceptHolder.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   789
!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   790
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
    languageTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
        languageTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
    ^ languageTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
languageTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
    languageTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
        languageTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    ^ languageTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
languagesList
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
    languagesList isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
        languagesList := List withAll:(self keyStringAndLanguageSelectionTable languages).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
    ^ languagesList.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
originalTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
    originalTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
        originalTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
    ^ originalTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   818
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
originalTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
    originalTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
        originalTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   822
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
    ^ originalTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   826
pasteOriginalEnableHolder
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   827
   pasteOriginalEnableHolder isNil ifTrue:[pasteOriginalEnableHolder := false asValue]. 
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   828
    ^ pasteOriginalEnableHolder
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   829
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   830
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   831
pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   832
   pastePreviousTranslationEnableHolder isNil ifTrue:[pastePreviousTranslationEnableHolder := false asValue]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   833
    ^ pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   834
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   835
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   836
searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   837
   searchForSimilarTranslationEnableHolder isNil 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   838
        ifTrue:[searchForSimilarTranslationEnableHolder := true asValue]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   839
    ^ searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   840
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   841
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
    selectedKeyRow isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
        selectedKeyRow := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
        selectedKeyRow onChangeSend:#selectionChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
    ^ selectedKeyRow.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
    showMissingTranslationsOnly isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
        showMissingTranslationsOnly := false asValue.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   853
        showMissingTranslationsOnly onChangeSend:#showMissingTranslationsOnlyChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
    ^ showMissingTranslationsOnly.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
shownLanguages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
    shownLanguages isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
        shownLanguages := List new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
        shownLanguages addAll:(self languagesList).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
        shownLanguages onChangeSend:#shownLanguagesChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
    ^ shownLanguages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
    stopApplicationIconVisibleHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
        stopApplicationIconVisibleHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
    ^ stopApplicationIconVisibleHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   874
!InternationalLanguageTranslationEditor methodsFor:'change & update'!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   875
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   876
languageTextHolderValue: aString
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   877
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   878
    self languageTextHolder value: aString.
641467b2f522 Search String
fm
parents: 2053
diff changeset
   879
    self languageTextModifiedHolder value:true.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   880
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   881
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   882
update:something with:aParameter from:changedObject
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   883
    changedObject == shownLanguages ifTrue:[
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   884
         self shownLanguagesChanged.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   885
         ^ self.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   886
    ].
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   887
    changedObject == languageTextAcceptHolder ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   888
         self updateLanguageTextModification.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   889
         ^ self.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   890
    ].
2050
fm
parents: 2049
diff changeset
   891
    changedObject == exampleLanguageSelectionHolder ifTrue:[
fm
parents: 2049
diff changeset
   892
        self updateExampleLanguageText.
fm
parents: 2049
diff changeset
   893
        ^ self.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   894
    ].    
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   895
    changedObject == showMissingTranslationsOnly ifTrue:[
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   896
        self showMissingTranslationsOnlyChanged.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   897
        ^ self.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   898
    ]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   899
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   900
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   901
updateCopyPreviousTranslationButtonEnabled
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   902
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   903
     self pastePreviousTranslationEnableHolder value: self shouldCopyPreviousTranslationButtonBeEnabled
2050
fm
parents: 2049
diff changeset
   904
!
fm
parents: 2049
diff changeset
   905
fm
parents: 2049
diff changeset
   906
updateExampleLanguageText
fm
parents: 2049
diff changeset
   907
fm
parents: 2049
diff changeset
   908
    self selectedKeyRow value isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
   909
    self exampleLanguageTextHolder value:self currentExampleLanguageText
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   910
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   911
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   912
updateKeyStringsToLanguageMappings           
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   913
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   914
      keyStringsToLanguageMappings 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   915
        at:lastSelectedKey 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   916
        language:lastLanguage 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   917
        put: self newLanguageText.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   918
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   919
2050
fm
parents: 2049
diff changeset
   920
updateLanguageAndKeySelection
fm
parents: 2049
diff changeset
   921
fm
parents: 2049
diff changeset
   922
    self originalTextHolder value: self selectedKey.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   923
    self languageTextHolder value: (self languageTextFromSelectedKeyFor: self currentLanguage).
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   924
    lastLanguage := self currentLanguage.
2050
fm
parents: 2049
diff changeset
   925
    lastSelectedKey := self selectedKey. 
fm
parents: 2049
diff changeset
   926
!
fm
parents: 2049
diff changeset
   927
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   928
updateLanguageTextModification 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   929
     self languageTextModifiedHolder value ifTrue:[ 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   930
        (self autoAccept or:[Dialog confirm:'Accept changed translation ?']) ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   931
            self languageTextModifiedHolder value:false.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   932
            self languageTextHolder value:languageEditor contents.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   933
            lastLanguage notNil ifTrue:[self updateKeyStringsToLanguageMappings.]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   934
        ]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   935
    ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   936
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   937
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   938
updateOriginalTextModification
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   939
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   940
    |answer|
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   941
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   942
        self originalTextModifiedHolder value ifTrue:[ 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   943
            answer := OptionBox 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   944
                          request:'Accept changed original text (key) ?' 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   945
                          label:'Original text (key) changed'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   946
                          image:(WarningBox iconBitmap)
641467b2f522 Search String
fm
parents: 2053
diff changeset
   947
                          buttonLabels:#('Cancel' 'Accept' 'Accept As New')
641467b2f522 Search String
fm
parents: 2053
diff changeset
   948
                          values:#(nil #accept #acceptAsNew)
641467b2f522 Search String
fm
parents: 2053
diff changeset
   949
                          default:#acceptAsNew.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   950
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   951
            answer isNil ifTrue:[^ self originalTextModifiedHolder value:false. ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   952
            answer == #accept ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
   953
    self halt.        ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   954
            answer == #acceptAsNew ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
   955
    self halt.        ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   956
        ].
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   957
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   958
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   959
updatePasteOriginalButtonEnabled
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   960
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
   961
     self pasteOriginalEnableHolder value: self shouldPasteOriginalButtonBeEnabled
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   962
! !
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   963
2050
fm
parents: 2049
diff changeset
   964
!InternationalLanguageTranslationEditor methodsFor:'dialogs'!
fm
parents: 2049
diff changeset
   965
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   966
requestEncoderDialog
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   967
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   968
   |box val characterCollection|
2050
fm
parents: 2049
diff changeset
   969
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   970
    val := '' asValue.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   971
    box := Dialog new.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   972
    (box addTextLabel:'Select or write the encoder') adjust:#left.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   973
    box addVerticalSpace.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   974
    characterCollection := CharacterEncoder supportedExternalEncodings 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   975
        inject: OrderedCollection new
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   976
        into:[:collection :each |
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   977
            collection add: each first;
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   978
                        yourself].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   979
    (box addComboBoxOn:val) list: characterCollection.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   980
    box addOkButton.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   981
    box open.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   982
    ^val value
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   983
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   984
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   985
requestEncoderStringFor: lang
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   986
  "Returns an encoder string and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   987
    |encoderString encoder|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   988
    encoderString := self requestEncoderDialog.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   989
    encoderString notEmpty ifTrue:[
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   990
        encoder := CharacterEncoder encoderFor: encoderString ifAbsent:nil.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   991
        encoder notNil ifTrue:[keyStringsToLanguageMappings atLanguage: lang putEncoder: encoder.].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   992
    ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   993
    ^encoderString
2050
fm
parents: 2049
diff changeset
   994
!
fm
parents: 2049
diff changeset
   995
fm
parents: 2049
diff changeset
   996
requestFilename  
fm
parents: 2049
diff changeset
   997
fm
parents: 2049
diff changeset
   998
    |aFilename|
fm
parents: 2049
diff changeset
   999
fm
parents: 2049
diff changeset
  1000
    aFilename := Dialog 
fm
parents: 2049
diff changeset
  1001
        requestFileName:'Name of resource file:'
fm
parents: 2049
diff changeset
  1002
        default:nil 
fm
parents: 2049
diff changeset
  1003
        pattern:'*.rs'.
fm
parents: 2049
diff changeset
  1004
fm
parents: 2049
diff changeset
  1005
    aFilename isEmptyOrNil ifTrue:[^ nil ].
fm
parents: 2049
diff changeset
  1006
    ^aFilename asFilename
fm
parents: 2049
diff changeset
  1007
!
fm
parents: 2049
diff changeset
  1008
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1009
requestFilenameFor: lang  
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1010
  "Returns a filename to save the language resource and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1011
    |aFilename|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1012
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1013
    aFilename := Dialog 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1014
        requestFileName:'Name of resource file to save ', lang asString, ' :'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1015
        default:nil 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1016
        pattern:'*.rs'.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1017
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1018
    aFilename isEmptyOrNil ifTrue:[^ nil ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1019
    keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1020
    ^aFilename asFilename
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1021
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1022
2050
fm
parents: 2049
diff changeset
  1023
requestLanguage
fm
parents: 2049
diff changeset
  1024
    ^ Dialog 
fm
parents: 2049
diff changeset
  1025
        choose:'Which language do you want to save?'
fm
parents: 2049
diff changeset
  1026
        fromList:languagesList
fm
parents: 2049
diff changeset
  1027
        lines:10
fm
parents: 2049
diff changeset
  1028
! !
fm
parents: 2049
diff changeset
  1029
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1030
!InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1031
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1032
closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1033
    "asks for permission before closing"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1034
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1035
    self hasUnsavedChanges ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1036
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1037
            confirm:(resources string:'Close without saving ?')
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1038
            default:false) ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1039
            ^ self
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1040
        ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1041
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1042
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1043
    super closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1044
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1045
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1046
initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1047
    modified := false.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1048
    inSingleFileMode := false.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1049
    super initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1050
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1051
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1052
languageEditorBuilt:aView
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1053
    languageEditor := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1054
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1055
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1056
postBuildDataSet:aView
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1057
    dataSetView := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1058
    aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
2015
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
!InternationalLanguageTranslationEditor methodsFor:'menu actions'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1062
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1063
addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1064
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1065
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1066
    lang := Dialog request:'New language (ISO symbol):'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1067
    lang isEmptyOrNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1068
    lang := lang asSymbol.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
    (keyStringsToLanguageMappings includesLanguage:lang) ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1071
    keyStringsToLanguageMappings addLanguage:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1072
    self languagesList add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1073
    self shownLanguages add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1074
    modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1075
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1076
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1077
addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1078
    |key index|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1079
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1080
    key := Dialog request:'New Key:'.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1081
    key isEmpty ifTrue:[^self].
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1082
    (self includesKey:key) ifFalse:[
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1083
        keyStringsToLanguageMappings addKey:key.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1084
        modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1085
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1086
   index := keyStringsToLanguageMappings indexOfKey:key.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1087
   self selectedKeyRow value:index
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1088
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1089
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1090
changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1091
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1092
    |nameSpace defaultNameSpace|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1093
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1094
    lastNameSpace notNil ifTrue:[defaultNameSpace := lastNameSpace name].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1095
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Search String in Name Space:' initialAnswer:defaultNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1096
    nameSpace isNil ifTrue:[^self].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1097
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1098
    nameSpace isNil ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1099
        ^Dialog information:(resources string:'No such nameSpace exists.?') 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1100
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1101
    lastNameSpace := nameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1102
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1103
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1104
extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1105
    |aClass newTranslations|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1106
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1107
    aClass := Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1108
                requestClass:'Class to extract translations from:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1109
                okLabel:'OK' 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1110
                initialAnswer:(lastExtractedClass ? LastExtractedClass).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1111
    aClass isNil ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1112
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1113
    lastExtractedClass := LastExtractedClass := aClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1114
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1115
    newTranslations := self extractTranslationsFromClass:aClass.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1116
    self addAllTranslations:newTranslations.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1117
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1118
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1119
extractTranslationsFromNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1120
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1121
    |newTranslations|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1122
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1123
    self changeLastNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1124
    lastNameSpace isNil ifTrue:[^self.].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1125
    newTranslations := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1126
    lastNameSpace allClassesDo:[:eachClass |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1127
        newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1128
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1129
    self addAllTranslations:newTranslations.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1130
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1131
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1132
extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1133
    |box projectID newTranslations|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1134
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1135
    box := ListSelectionBox new.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1136
"/    box useComboBoxWithList:(Smalltalk allProjectIDs).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1137
    box title:(resources string:'Project to extract translations from:').
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1138
    box list:Smalltalk allProjectIDs.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1139
    box okAction:[:sel | projectID := sel].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1140
    box initialText:(lastExtractedProject ? LastExtractedProject).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1141
    box label:'Find Translations in Project'.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1142
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1143
    box showAtPointer.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1144
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1145
    projectID notNil ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1146
        projectID := projectID withoutSeparators asSymbol.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1147
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1148
    projectID isEmptyOrNil ifTrue:[^ self ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1149
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1150
    lastExtractedProject := LastExtractedProject := projectID.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1151
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
    newTranslations := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1153
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1154
    Smalltalk allClassesDo:[:eachClass |
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1155
        eachClass theNonMetaclass package == projectID ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1156
"/ eachClass isLoaded ifTrue:[ self halt. ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1157
            newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1158
        ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1159
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1160
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1161
    self addAllTranslations:newTranslations.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1162
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1163
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1164
inspectCanvasMissingStrings
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1165
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1166
    |spec nameSpace missingStrings|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1167
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1168
    missingStrings := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1169
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Specify NameSpace to look for missing strings' initialAnswer:nil.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1170
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1171
    nameSpace isNil ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1172
        ^Dialog information:(resources string:'No such nameSpace exists.?') 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1173
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1174
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1175
    nameSpace allClassesDo:[:cls |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1176
        cls theMetaclass methodsDo:[:m |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1177
            m hasResource ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1178
                (m resources includesKey:#canvas) ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1179
                    spec := (cls perform:m selector) decodeAsLiteralArray.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1180
                    spec do:[:eachComponent |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1181
                        eachComponent translationKeysDo:[:k | 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1182
                            (self includesKey: k) ifFalse:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1183
                                missingStrings add: k. 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1184
                                Transcript showCR: k storeString, '                         ', m printString]]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1185
                    ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1186
                ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1187
            ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1188
        ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1189
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1190
    missingStrings asSet inspect
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1191
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1192
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1193
menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1194
    modified ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1195
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1196
            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
  1197
            default:false) ifFalse:[^ self].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1200
    keyStringsToLanguageMappings initialize.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1201
    keyStringsToLanguageMappings changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1203
    self languagesList contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1204
    self shownLanguages contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1205
    modified := false.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1206
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1207
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1208
menuOpen
2050
fm
parents: 2049
diff changeset
  1209
    |aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1210
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1211
    self withWaitCursorDo:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1212
        aFilename := self requestFilename.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1213
        aFilename isNil ifTrue:[^ self ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1214
        self readResourceFile:aFilename.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1215
    ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1216
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1217
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
menuSave
2050
fm
parents: 2049
diff changeset
  1219
"Saves the language selected in the fileName from where the language resource was obtained."
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1220
    |lang|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1221
2050
fm
parents: 2049
diff changeset
  1222
    lang := self requestLanguage.
fm
parents: 2049
diff changeset
  1223
    lang isNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1224
    self saveLanguage: lang
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1225
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1226
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1227
menuSaveAll
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1228
"Saves all the languages in the fileName from where the language resource was obtained."
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1229
    keyStringsToLanguageMappings languagesInUse do:[:each | self saveLanguage: each]. 
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1230
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1232
menuSaveAs
2050
fm
parents: 2049
diff changeset
  1233
"Saves the language selected in the specified fileName."
fm
parents: 2049
diff changeset
  1234
     |lang aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
2050
fm
parents: 2049
diff changeset
  1236
    lang := self requestLanguage.
fm
parents: 2049
diff changeset
  1237
    lang isNil ifTrue:[^ self]. 
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1238
    aFilename := self requestFilenameFor:lang.
2050
fm
parents: 2049
diff changeset
  1239
    aFilename isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
  1240
    self saveResourceFile:aFilename for:lang asSymbol
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1243
openAboutThisApplication
8f226ff9b5e6 initial checkin
C