Tools__InternationalLanguageTranslationEditor.st
author fm
Mon, 19 Mar 2007 12:07:20 +0100
changeset 2163 641467b2f522
parent 2053 8440fcd83b7b
child 2323 9b257cbd0ea9
permissions -rw-r--r--
Search String
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
641467b2f522 Search String
fm
parents: 2053
diff changeset
    19
		lastNameSpace'
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
                              )
2050
fm
parents: 2049
diff changeset
   245
                             )
fm
parents: 2049
diff changeset
   246
                           
fm
parents: 2049
diff changeset
   247
                          )
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
                        )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
                       )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
                     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
                    )
2050
fm
parents: 2049
diff changeset
   252
                    handles: (Any 0.33333333333333 0.66666666666667 1.0)
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                  )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                 )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
               
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
              )
2050
fm
parents: 2049
diff changeset
   257
              handles: (Any 0.5 1.0)
2015
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
         
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
        )
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
!InternationalLanguageTranslationEditor class methodsFor:'menu specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   267
keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   268
    "This resource specification was automatically generated
641467b2f522 Search String
fm
parents: 2053
diff changeset
   269
     by the MenuEditor of ST/X."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   270
641467b2f522 Search String
fm
parents: 2053
diff changeset
   271
    "Do not manually edit this!! If it is corrupted,
641467b2f522 Search String
fm
parents: 2053
diff changeset
   272
     the MenuEditor may not be able to read the specification."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   273
641467b2f522 Search String
fm
parents: 2053
diff changeset
   274
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   275
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   276
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor keyStringAndLanguageSelectionTableMenu)) startUp
641467b2f522 Search String
fm
parents: 2053
diff changeset
   277
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   278
641467b2f522 Search String
fm
parents: 2053
diff changeset
   279
    <resource: #menu>
641467b2f522 Search String
fm
parents: 2053
diff changeset
   280
641467b2f522 Search String
fm
parents: 2053
diff changeset
   281
    ^ 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   282
     #(Menu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   283
        (
641467b2f522 Search String
fm
parents: 2053
diff changeset
   284
         (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   285
            label: 'Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   286
            itemValue: changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   287
            translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   288
          )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   289
         (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   290
            label: 'Search String in Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   291
            itemValue: searchStringInLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   292
            translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   293
          )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   294
         )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   295
        nil
641467b2f522 Search String
fm
parents: 2053
diff changeset
   296
        nil
641467b2f522 Search String
fm
parents: 2053
diff changeset
   297
      )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   298
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
   299
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
    "
2050
fm
parents: 2049
diff changeset
   308
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#mainMenu
fm
parents: 2049
diff changeset
   309
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor mainMenu)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
            label: 'File'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
           (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
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
                  label: 'New'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
                  itemValue: menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
                  label: 'Open Resource File...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
                  itemValue: menuOpen
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
               (MenuItem
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   340
                  label: 'Save All Resource Files'
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   341
                  itemValue: menuSaveAll
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   342
                  translateLabel: true
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   343
                )
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   344
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                  label: 'Save Resource File'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                  itemValue: menuSave
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                  label: 'Save Resource File As...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
                  itemValue: menuSaveAs
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
               (MenuItem
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   358
                  label: 'Current NameSpace:'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   359
                  itemValue: changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   360
                  translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   361
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   362
               (MenuItem
641467b2f522 Search String
fm
parents: 2053
diff changeset
   363
                  label: '-'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   364
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   365
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
                  label: 'Exit'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
                  itemValue: closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
            label: 'View'
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
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
                  label: 'Show Missing Translations Only'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
                  indication: showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
                  label: 'Shown Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
                  submenuChannel: shownLanguagesMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
            label: 'Languages'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
                  label: 'Add Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
                  itemValue: addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
                  label: 'Remove Language...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
                  itemValue: removeLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
            label: 'Translations'
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
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
                  label: 'Add Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
                  itemValue: addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
                  label: 'Remove Translation...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
                  itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
                  label: 'Extract from Class...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                  itemValue: extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
               (MenuItem
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   445
                  label: 'Extract from Project...'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   446
                  itemValue: extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   447
                  translateLabel: true
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   448
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   449
               (MenuItem
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   450
                  label: 'Extract from NameSpace...'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   451
                  itemValue: extractTranslationsFromNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
   452
                  translateLabel: true
641467b2f522 Search String
fm
parents: 2053
diff changeset
   453
                )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   454
               (MenuItem
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   455
                  label: '-'
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   456
                )
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
   457
               (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
                  label: 'Run Application and Collect Translations...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
                  itemValue: runApplicationAndCollectTranslations
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
         (MenuItem
2050
fm
parents: 2049
diff changeset
   468
            label: 'Preferences'
fm
parents: 2049
diff changeset
   469
            translateLabel: true
fm
parents: 2049
diff changeset
   470
            submenu: 
fm
parents: 2049
diff changeset
   471
           (Menu
fm
parents: 2049
diff changeset
   472
              (
fm
parents: 2049
diff changeset
   473
               (MenuItem
fm
parents: 2049
diff changeset
   474
                  label: 'Auto Accept Changes'
fm
parents: 2049
diff changeset
   475
                  translateLabel: true
fm
parents: 2049
diff changeset
   476
                  indication: autoAcceptHolder
fm
parents: 2049
diff changeset
   477
                )
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   478
               (MenuItem
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   479
                  label: 'Search For Similar Translations'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   480
                  translateLabel: true
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   481
                  indication: searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   482
                )
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   483
               (MenuItem
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   484
                  label: 'Always Write UTF8'
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   485
                  translateLabel: true
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   486
                  indication: alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   487
                )
2050
fm
parents: 2049
diff changeset
   488
               )
fm
parents: 2049
diff changeset
   489
              nil
fm
parents: 2049
diff changeset
   490
              nil
fm
parents: 2049
diff changeset
   491
            )
fm
parents: 2049
diff changeset
   492
          )
fm
parents: 2049
diff changeset
   493
         (MenuItem
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
            label: 'Help'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
            startGroup: right
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
            submenu: 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
           (Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
              (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
                  label: 'Documentation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
                  itemValue: openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
                  label: '-'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
               (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
                  label: 'About this Application...'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
                  itemValue: openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
                  translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
                )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
               )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
              nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
            )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
        nil
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
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   524
menuItemsEditLanguage
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   525
    "This resource specification was automatically generated
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   526
     by the MenuEditor of ST/X."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   527
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   528
    "Do not manually edit this!! If it is corrupted,
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   529
     the MenuEditor may not be able to read the specification."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   530
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   531
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   532
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menu
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   533
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menu)) startUp
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   534
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   535
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   536
    <resource: #menu>
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   537
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   538
    ^ 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   539
     #(Menu
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   540
        (
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   541
         (MenuItem
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   542
            enabled: pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   543
            label: 'Paste Previous Translation'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   544
            itemValue: pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   545
            nameKey: pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   546
            translateLabel: true
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   547
          )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   548
         )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   549
        nil
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   550
        nil
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   551
      )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   552
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   553
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
    "
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   562
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menuToolBar
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   563
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menuToolBar)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
    ^ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
     #(Menu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
        (
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
            label: 'Save'
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   573
            itemValue: menuSave
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
            label: '-'
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: 'Add Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
            itemValue: addTranslation
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 newRowIcon)
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: 'Remove Translation'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
            itemValue: removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
            translateLabel: true
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
            labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
         (MenuItem
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
            label: ''
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: 'Stop Application'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
            itemValue: stopApplication
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
            isVisible: stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
            labelImage: (ResourceRetriever XPToolbarIconLibrary stop16x16Icon)
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
          )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
         )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
        nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   608
!InternationalLanguageTranslationEditor class methodsFor:'tableColumns specs'!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   609
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   610
keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   611
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   612
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   613
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   614
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   615
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   616
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   617
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   618
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   619
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   620
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   621
    <resource: #tableColumns>
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
    ^#(
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   624
      (DataSetColumnSpec
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   625
         label: 'Key'
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   626
         labelButtonType: Button
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   627
         minWidth: 50
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   628
         model: keyStringInRow:
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
      )
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
languageTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   634
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   635
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   636
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   637
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   638
     the DataSetBuilder may not be able to read the specification."
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
    "
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   641
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#languageTableColumn
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   642
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   643
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   644
    <resource: #tableColumns>
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
    ^#(
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   647
      (DataSetColumnSpec
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   648
         label: lang
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   649
         labelButtonType: Button
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   650
         minWidth: 50
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   651
         editorType: None
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   652
         model: columnInRow:at:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   653
         backgroundSelector: getBackgroundForRow:rowNr:col:
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   654
       )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   655
      )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   656
! !
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   657
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   658
!InternationalLanguageTranslationEditor methodsFor:'accessing'!
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   659
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   660
newLanguageText
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   661
"/   languageEditor accept
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   662
    ^self languageTextHolder value isNil 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   663
        ifTrue:['']
641467b2f522 Search String
fm
parents: 2053
diff changeset
   664
        ifFalse:[self languageTextHolder value asCollectionOfLines first.]
2050
fm
parents: 2049
diff changeset
   665
!
fm
parents: 2049
diff changeset
   666
fm
parents: 2049
diff changeset
   667
selectedKey  
fm
parents: 2049
diff changeset
   668
   "Returns the current selected key if there is one row seleted. Otherwise, returns nil"
fm
parents: 2049
diff changeset
   669
     |rowSelectionIndex |
fm
parents: 2049
diff changeset
   670
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   671
    keyStringsToLanguageMappings isNil ifTrue:[^nil].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   672
    self selectedKeyRow value isNil ifTrue:[^nil].
2050
fm
parents: 2049
diff changeset
   673
    rowSelectionIndex := self selectedKeyRow value.
fm
parents: 2049
diff changeset
   674
    rowSelectionIndex == 0 ifTrue:[^nil].
fm
parents: 2049
diff changeset
   675
    ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex.
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   676
! !
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   677
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   678
!InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   679
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   680
searchForSimilarTranslation
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   681
    "Looks for a quite similar translation for the key and display a dialog with available options"
641467b2f522 Search String
fm
parents: 2053
diff changeset
   682
    |similarTranslationsAssociations selectedTranslation|
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   683
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   684
    self shouldSearchForSimilarTranslation ifFalse:[^self]. 
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   685
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   686
    similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: self selectedKey in: self currentLanguage.
641467b2f522 Search String
fm
parents: 2053
diff changeset
   687
    similarTranslationsAssociations isEmpty ifTrue:[^self].    
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   688
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   689
    similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
641467b2f522 Search String
fm
parents: 2053
diff changeset
   690
        collection detect:[:selectedAssociation |
641467b2f522 Search String
fm
parents: 2053
diff changeset
   691
            selectedAssociation value sameAs: association value] ifNone:[collection add: association].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   692
        collection].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   693
    selectedTranslation := Dialog 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   694
        choose:'Choose one if you consider itīs usefull to translate: 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   695
    ', 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   696
        '<', self selectedKey, '>  ', (self currentExampleLanguageText ifNil:[''])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   697
        fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   698
        values: (similarTranslationsAssociations collect:[:each | each value])
641467b2f522 Search String
fm
parents: 2053
diff changeset
   699
        lines:10
641467b2f522 Search String
fm
parents: 2053
diff changeset
   700
        cancel: nil.      
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   701
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   702
    selectedTranslation notNil ifTrue:[self languageTextHolderValue: selectedTranslation]. 
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   703
! !
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   704
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
!InternationalLanguageTranslationEditor methodsFor:'aspects'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   707
alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   708
    alwaysWriteUTF8Holder isNil ifTrue:[alwaysWriteUTF8Holder := true asValue]. 
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   709
    ^ alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   710
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
   711
2050
fm
parents: 2049
diff changeset
   712
autoAcceptHolder
fm
parents: 2049
diff changeset
   713
    autoAcceptHolder isNil ifTrue:[autoAcceptHolder := true asValue]. 
fm
parents: 2049
diff changeset
   714
    ^ autoAcceptHolder
fm
parents: 2049
diff changeset
   715
!
fm
parents: 2049
diff changeset
   716
fm
parents: 2049
diff changeset
   717
exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
   718
    exampleLanguageSelectionHolder isNil ifTrue:[
fm
parents: 2049
diff changeset
   719
        exampleLanguageSelectionHolder := self exampleLanguageByDefault asValue.         
fm
parents: 2049
diff changeset
   720
        exampleLanguageSelectionHolder addDependent:self.
fm
parents: 2049
diff changeset
   721
    ]. 
fm
parents: 2049
diff changeset
   722
    ^ exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
   723
!
fm
parents: 2049
diff changeset
   724
fm
parents: 2049
diff changeset
   725
exampleLanguageTextHolder
fm
parents: 2049
diff changeset
   726
    exampleLanguageTextHolder isNil ifTrue:[
fm
parents: 2049
diff changeset
   727
        exampleLanguageTextHolder := '' asValue.
fm
parents: 2049
diff changeset
   728
    ].
fm
parents: 2049
diff changeset
   729
    ^ exampleLanguageTextHolder.
fm
parents: 2049
diff changeset
   730
!
fm
parents: 2049
diff changeset
   731
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   732
keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   733
    keyStringsToLanguageMappings isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   734
        keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   735
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   736
    ^ keyStringsToLanguageMappings.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
keyStringAndLanguageSelectionTableColumnDescriptionHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
    keyStringAndLanguageSelectionTableColumnDescriptionHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
        keyStringAndLanguageSelectionTableColumnDescriptionHolder := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
        keyStringAndLanguageSelectionTableColumnDescriptionHolder value:(self keyStringAndLanguageSelectionTableColumnDescription).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
    ^ keyStringAndLanguageSelectionTableColumnDescriptionHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
languageAtCol:colNr
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    ^ shownLanguages at:colNr-1.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
languageShownHolderFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    |holder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
    languageShownHolders isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
        languageShownHolders := Dictionary new
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
    holder := languageShownHolders 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
                at:lang 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
                ifAbsentPut:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
                    |h|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
                    h := true asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
                    h onChangeEvaluate:[ 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
                        h value ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
                           self enableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
                        ] ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
                           self disableLanguageDisplayFor:lang     
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
                        ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
                    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
                    h
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
                ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
    ^ holder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   775
languageTextAcceptHolder
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   776
    languageTextAcceptHolder isNil ifTrue:[
2050
fm
parents: 2049
diff changeset
   777
        languageTextAcceptHolder := false asValue.                        
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   778
    ].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   779
    ^ languageTextAcceptHolder.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   780
!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   781
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   783
    languageTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   784
        languageTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   785
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
    ^ languageTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
languageTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
    languageTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
        languageTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
    ^ languageTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
languagesList
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
    languagesList isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
        languagesList := List withAll:(self keyStringAndLanguageSelectionTable languages).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
    ^ languagesList.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
originalTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
    originalTextHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
        originalTextHolder := '' asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
    ^ originalTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
originalTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
    originalTextModifiedHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
        originalTextModifiedHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
    ^ originalTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   817
pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   818
   pastePreviousTranslationEnableHolder isNil ifTrue:[pastePreviousTranslationEnableHolder := false asValue]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   819
    ^ pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   820
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   821
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   822
searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   823
   searchForSimilarTranslationEnableHolder isNil 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   824
        ifTrue:[searchForSimilarTranslationEnableHolder := true asValue]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   825
    ^ searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   826
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   827
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
    selectedKeyRow isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
        selectedKeyRow := ValueHolder new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
        selectedKeyRow onChangeSend:#selectionChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
    ^ selectedKeyRow.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
    showMissingTranslationsOnly isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
        showMissingTranslationsOnly := false asValue.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   839
        showMissingTranslationsOnly onChangeSend:#showMissingTranslationsOnlyChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
    ^ showMissingTranslationsOnly.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
shownLanguages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
    shownLanguages isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
        shownLanguages := List new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
        shownLanguages addAll:(self languagesList).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
        shownLanguages onChangeSend:#shownLanguagesChanged to:self.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
    ^ shownLanguages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
    stopApplicationIconVisibleHolder isNil ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
        stopApplicationIconVisibleHolder := false asValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
    ^ stopApplicationIconVisibleHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   860
!InternationalLanguageTranslationEditor methodsFor:'change & update'!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   861
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   862
languageTextHolderValue: aString
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   863
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   864
    self languageTextHolder value: aString.
641467b2f522 Search String
fm
parents: 2053
diff changeset
   865
    self languageTextModifiedHolder value:true.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   866
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   867
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   868
update:something with:aParameter from:changedObject
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   869
    changedObject == shownLanguages ifTrue:[
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   870
         self shownLanguagesChanged.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   871
         ^ self.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   872
    ].
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   873
    changedObject == languageTextAcceptHolder ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   874
         self updateLanguageTextModification.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   875
         ^ self.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   876
    ].
2050
fm
parents: 2049
diff changeset
   877
    changedObject == exampleLanguageSelectionHolder ifTrue:[
fm
parents: 2049
diff changeset
   878
        self updateExampleLanguageText.
fm
parents: 2049
diff changeset
   879
        ^ self.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   880
    ].    
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   881
    changedObject == showMissingTranslationsOnly ifTrue:[
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   882
        self showMissingTranslationsOnlyChanged.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   883
        ^ self.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   884
    ]. 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   885
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   886
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   887
updateCopyPreviousTranslationButtonEnabled
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   888
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   889
     self pastePreviousTranslationEnableHolder value: self shouldCopyPreviousTranslationButtonBeEnabled
2050
fm
parents: 2049
diff changeset
   890
!
fm
parents: 2049
diff changeset
   891
fm
parents: 2049
diff changeset
   892
updateExampleLanguageText
fm
parents: 2049
diff changeset
   893
fm
parents: 2049
diff changeset
   894
    self selectedKeyRow value isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
   895
    self exampleLanguageTextHolder value:self currentExampleLanguageText
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   896
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   897
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   898
updateKeyStringsToLanguageMappings           
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   899
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   900
      keyStringsToLanguageMappings 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   901
        at:lastSelectedKey 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   902
        language:lastLanguage 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   903
        put: self newLanguageText.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   904
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   905
2050
fm
parents: 2049
diff changeset
   906
updateLanguageAndKeySelection
fm
parents: 2049
diff changeset
   907
fm
parents: 2049
diff changeset
   908
    self originalTextHolder value: self selectedKey.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   909
    self languageTextHolder value: (self languageTextFromSelectedKeyFor: self currentLanguage).
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   910
    lastLanguage := self currentLanguage.
2050
fm
parents: 2049
diff changeset
   911
    lastSelectedKey := self selectedKey. 
fm
parents: 2049
diff changeset
   912
!
fm
parents: 2049
diff changeset
   913
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   914
updateLanguageTextModification 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   915
     self languageTextModifiedHolder value ifTrue:[ 
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   916
        (self autoAccept or:[Dialog confirm:'Accept changed translation ?']) ifTrue:[
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   917
            self languageTextModifiedHolder value:false.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   918
            self languageTextHolder value:languageEditor contents.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   919
            lastLanguage notNil ifTrue:[self updateKeyStringsToLanguageMappings.]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   920
        ]
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   921
    ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   922
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   923
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   924
updateOriginalTextModification
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   925
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   926
    |answer|
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   927
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   928
        self originalTextModifiedHolder value ifTrue:[ 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   929
            answer := OptionBox 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   930
                          request:'Accept changed original text (key) ?' 
641467b2f522 Search String
fm
parents: 2053
diff changeset
   931
                          label:'Original text (key) changed'
641467b2f522 Search String
fm
parents: 2053
diff changeset
   932
                          image:(WarningBox iconBitmap)
641467b2f522 Search String
fm
parents: 2053
diff changeset
   933
                          buttonLabels:#('Cancel' 'Accept' 'Accept As New')
641467b2f522 Search String
fm
parents: 2053
diff changeset
   934
                          values:#(nil #accept #acceptAsNew)
641467b2f522 Search String
fm
parents: 2053
diff changeset
   935
                          default:#acceptAsNew.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
   936
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   937
            answer isNil ifTrue:[^ self originalTextModifiedHolder value:false. ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   938
            answer == #accept ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
   939
    self halt.        ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   940
            answer == #acceptAsNew ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
   941
    self halt.        ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
   942
        ].
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   943
! !
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   944
2050
fm
parents: 2049
diff changeset
   945
!InternationalLanguageTranslationEditor methodsFor:'dialogs'!
fm
parents: 2049
diff changeset
   946
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   947
requestEncoderDialog
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   948
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   949
   |box val characterCollection|
2050
fm
parents: 2049
diff changeset
   950
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   951
    val := '' asValue.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   952
    box := Dialog new.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   953
    (box addTextLabel:'Select or write the encoder') adjust:#left.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   954
    box addVerticalSpace.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   955
    characterCollection := CharacterEncoder supportedExternalEncodings 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   956
        inject: OrderedCollection new
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   957
        into:[:collection :each |
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   958
            collection add: each first;
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   959
                        yourself].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   960
    (box addComboBoxOn:val) list: characterCollection.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   961
    box addOkButton.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   962
    box open.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   963
    ^val value
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   964
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   965
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   966
requestEncoderStringFor: lang
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   967
  "Returns an encoder string and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   968
    |encoderString encoder|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   969
    encoderString := self requestEncoderDialog.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   970
    encoderString notEmpty ifTrue:[
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   971
        encoder := CharacterEncoder encoderFor: encoderString ifAbsent:nil.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   972
        encoder notNil ifTrue:[keyStringsToLanguageMappings atLanguage: lang putEncoder: encoder.].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   973
    ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   974
    ^encoderString
2050
fm
parents: 2049
diff changeset
   975
!
fm
parents: 2049
diff changeset
   976
fm
parents: 2049
diff changeset
   977
requestFilename  
fm
parents: 2049
diff changeset
   978
fm
parents: 2049
diff changeset
   979
    |aFilename|
fm
parents: 2049
diff changeset
   980
fm
parents: 2049
diff changeset
   981
    aFilename := Dialog 
fm
parents: 2049
diff changeset
   982
        requestFileName:'Name of resource file:'
fm
parents: 2049
diff changeset
   983
        default:nil 
fm
parents: 2049
diff changeset
   984
        pattern:'*.rs'.
fm
parents: 2049
diff changeset
   985
fm
parents: 2049
diff changeset
   986
    aFilename isEmptyOrNil ifTrue:[^ nil ].
fm
parents: 2049
diff changeset
   987
    ^aFilename asFilename
fm
parents: 2049
diff changeset
   988
!
fm
parents: 2049
diff changeset
   989
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   990
requestFilenameFor: lang  
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   991
  "Returns a filename to save the language resource and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   992
    |aFilename|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   993
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   994
    aFilename := Dialog 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   995
        requestFileName:'Name of resource file to save ', lang asString, ' :'
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   996
        default:nil 
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   997
        pattern:'*.rs'.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   998
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   999
    aFilename isEmptyOrNil ifTrue:[^ nil ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1000
    keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1001
    ^aFilename asFilename
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1002
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1003
2050
fm
parents: 2049
diff changeset
  1004
requestLanguage
fm
parents: 2049
diff changeset
  1005
    ^ Dialog 
fm
parents: 2049
diff changeset
  1006
        choose:'Which language do you want to save?'
fm
parents: 2049
diff changeset
  1007
        fromList:languagesList
fm
parents: 2049
diff changeset
  1008
        lines:10
fm
parents: 2049
diff changeset
  1009
! !
fm
parents: 2049
diff changeset
  1010
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1011
!InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
    "asks for permission before closing"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
    self hasUnsavedChanges ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1018
            confirm:(resources string:'Close without saving ?')
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
            default:false) ifFalse:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
            ^ self
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
        ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1024
    super closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1026
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1027
initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1028
    modified := false.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1029
    inSingleFileMode := false.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1030
    super initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1031
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1032
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1033
languageEditorBuilt:aView
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1034
    languageEditor := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1035
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1036
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1037
postBuildDataSet:aView
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1038
    dataSetView := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1039
    aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
2015
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
!InternationalLanguageTranslationEditor methodsFor:'menu actions'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1043
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1044
addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1045
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1046
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1047
    lang := Dialog request:'New language (ISO symbol):'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1048
    lang isEmptyOrNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1049
    lang := lang asSymbol.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1050
    (keyStringsToLanguageMappings includesLanguage:lang) ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1051
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1052
    keyStringsToLanguageMappings addLanguage:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1053
    self languagesList add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1054
    self shownLanguages add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1055
    modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1056
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1057
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1058
addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1059
    |key index|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1060
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1061
    key := Dialog request:'New Key:'.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1062
    key isEmpty ifTrue:[^self].
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1063
    (self includesKey:key) ifFalse:[
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1064
        keyStringsToLanguageMappings addKey:key.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1065
        modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1066
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1067
   index := keyStringsToLanguageMappings indexOfKey:key.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1068
   self selectedKeyRow value:index
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1071
changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1072
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1073
    |nameSpace defaultNameSpace|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1074
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1075
    lastNameSpace notNil ifTrue:[defaultNameSpace := lastNameSpace name].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1076
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Search String in Name Space:' initialAnswer:defaultNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1077
    nameSpace isNil ifTrue:[^self].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1078
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1079
    nameSpace isNil ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1080
        ^Dialog information:(resources string:'No such nameSpace exists.?') 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1081
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1082
    lastNameSpace := nameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1083
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1084
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1085
extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1086
    |aClass newTranslations|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1087
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1088
    aClass := Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1089
                requestClass:'Class to extract translations from:'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1090
                okLabel:'OK' 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1091
                initialAnswer:(lastExtractedClass ? LastExtractedClass).
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1092
    aClass isNil ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1093
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1094
    lastExtractedClass := LastExtractedClass := aClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1095
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1096
    newTranslations := self extractTranslationsFromClass:aClass.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1097
    self addAllTranslations:newTranslations.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1098
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1099
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1100
extractTranslationsFromNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1101
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1102
    |newTranslations|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1103
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1104
    self changeLastNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1105
    lastNameSpace isNil ifTrue:[^self.].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1106
    newTranslations := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1107
    lastNameSpace allClassesDo:[:eachClass |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1108
        newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1109
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1110
    self addAllTranslations:newTranslations.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1111
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1112
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1113
extractTranslationsFromProject
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1114
    |box projectID newTranslations|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1115
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1116
    box := ListSelectionBox new.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1117
"/    box useComboBoxWithList:(Smalltalk allProjectIDs).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1118
    box title:(resources string:'Project to extract translations from:').
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1119
    box list:Smalltalk allProjectIDs.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1120
    box okAction:[:sel | projectID := sel].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1121
    box initialText:(lastExtractedProject ? LastExtractedProject).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1122
    box label:'Find Translations in Project'.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1123
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1124
    box showAtPointer.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1125
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1126
    projectID notNil ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1127
        projectID := projectID withoutSeparators asSymbol.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1128
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1129
    projectID isEmptyOrNil ifTrue:[^ self ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1130
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1131
    lastExtractedProject := LastExtractedProject := projectID.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1132
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1133
    newTranslations := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1134
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1135
    Smalltalk allClassesDo:[:eachClass |
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1136
        eachClass theNonMetaclass package == projectID ifTrue:[
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1137
"/ eachClass isLoaded ifTrue:[ self halt. ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1138
            newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1139
        ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1140
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1141
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1142
    self addAllTranslations:newTranslations.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1143
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1144
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1145
inspectCanvasMissingStrings
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1146
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1147
    |spec nameSpace missingStrings|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1148
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1149
    missingStrings := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1150
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Specify NameSpace to look for missing strings' initialAnswer:nil.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1151
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1152
    nameSpace isNil ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1153
        ^Dialog information:(resources string:'No such nameSpace exists.?') 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1154
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1155
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1156
    nameSpace allClassesDo:[:cls |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1157
        cls theMetaclass methodsDo:[:m |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1158
            m hasResource ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1159
                (m resources includesKey:#canvas) ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1160
                    spec := (cls perform:m selector) decodeAsLiteralArray.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1161
                    spec do:[:eachComponent |
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1162
                        eachComponent translationKeysDo:[:k | 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1163
                            (self includesKey: k) ifFalse:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1164
                                missingStrings add: k. 
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1165
                                Transcript showCR: k storeString, '                         ', m printString]]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1166
                    ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1167
                ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1168
            ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1169
        ]
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1170
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1171
    missingStrings asSet inspect
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1172
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1173
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1174
menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1175
    modified ifTrue:[
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1176
        (Dialog 
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1177
            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
  1178
            default:false) ifFalse:[^ self].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1179
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1180
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1181
    keyStringsToLanguageMappings initialize.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1182
    keyStringsToLanguageMappings changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1183
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1184
    self languagesList contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1185
    self shownLanguages contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1186
    modified := false.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1187
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1188
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1189
menuOpen
2050
fm
parents: 2049
diff changeset
  1190
    |aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1191
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1192
    self withWaitCursorDo:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1193
        aFilename := self requestFilename.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1194
        aFilename isNil ifTrue:[^ self ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1195
        self readResourceFile:aFilename.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1196
    ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1197
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
menuSave
2050
fm
parents: 2049
diff changeset
  1200
"Saves the language selected in the fileName from where the language resource was obtained."
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1201
    |lang|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
2050
fm
parents: 2049
diff changeset
  1203
    lang := self requestLanguage.
fm
parents: 2049
diff changeset
  1204
    lang isNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1205
    self saveLanguage: lang
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1206
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1207
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1208
menuSaveAll
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1209
"Saves all the languages in the fileName from where the language resource was obtained."
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1210
    keyStringsToLanguageMappings languagesInUse do:[:each | self saveLanguage: each]. 
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1211
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1212
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1213
menuSaveAs
2050
fm
parents: 2049
diff changeset
  1214
"Saves the language selected in the specified fileName."
fm
parents: 2049
diff changeset
  1215
     |lang aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1216
2050
fm
parents: 2049
diff changeset
  1217
    lang := self requestLanguage.
fm
parents: 2049
diff changeset
  1218
    lang isNil ifTrue:[^ self]. 
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1219
    aFilename := self requestFilenameFor:lang.
2050
fm
parents: 2049
diff changeset
  1220
    aFilename isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
  1221
    self saveResourceFile:aFilename for:lang asSymbol
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1222
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1223
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1224
openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1225
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1226
     It will be invoked when the menu-item 'help-about' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1227
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
    "/ could open a customized aboutBox here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
    super openAboutThisApplication
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
openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
     It will be invoked when the menu-item 'help-documentation' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1236
    "/ change below as required ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1237
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1238
    "/ to open an HTML viewer on some document (under 'doc/online/<language>/' ):
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
    HTMLDocumentView openFullOnDocumentationFile:'TOP.html'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1240
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
    "/ add application-specific help files under the 'doc/online/<language>/help/appName'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
    "/ directory, and open a viewer with: