Tools__InternationalLanguageTranslationEditor.st
author Claus Gittinger <cg@exept.de>
Sun, 12 Aug 2018 10:37:28 +0200
changeset 3590 885f170ab630
parent 3522 2a319ce12319
child 3594 cfbc0a29b030
permissions -rw-r--r--
#REFACTORING by cg class: TabListEditor changed: #doSave
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
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
    19
		lastNameSpace pasteOriginalEnableHolder ignoreCaseHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
    20
		closeSearchBar searchTextModifiedHolder searchNextText
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
    21
		searchBarImageInfoLabelHolder searchPreviousText searchBoxVisible
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
    22
		searchBarInfoLabelHolder searchTextHolder searchTextView
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
    23
		searchBoxView translationsPanel lastPackage methodsUsingKey'
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    24
	classVariableNames:'LastExtractedClass LastExtractedApplicationClass
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
    25
		LastExtractedProject LastProject'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
	category:'Interface-UIPainter'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
Object subclass:#AccessCollectingPseudoResourcePack
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
    31
	instanceVariableNames:'collectedKeys realResourcePack watchingTranslationEditor'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
Collection subclass:#KeyStringsToLanguageMappings
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
    38
	instanceVariableNames:'keys keyInfo perLanguageInfo perLanguageMappings languageMappings
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
    39
		languages rowPerKey'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
Object subclass:#LanguageMappingRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
	instanceVariableNames:'key mappings'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
Visitor subclass:#UISpecVisitor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
	instanceVariableNames:'translatedLabels'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
	classVariableNames:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
	poolDictionaries:''
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
	privateIn:InternationalLanguageTranslationEditor
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!InternationalLanguageTranslationEditor class methodsFor:'documentation'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
documentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    documentation to be added.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    [author:]
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    66
	cg (cg@FUSI)
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    [instance variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    [class variables:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    [see also:]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
examples
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
  Starting the application:
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    80
								[exBegin]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    InternationalLanguageTranslationEditor open
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    83
								[exEnd]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
  more examples to be added:
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    86
								[exBegin]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    87
    ... add code fragment for
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    ... executable example here ...
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
    89
								[exEnd]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
"
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
history
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    "Created: / 04-03-2006 / 09:07:19 / cg"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
    97
!InternationalLanguageTranslationEditor class methodsFor:'help spec'!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
    98
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
    99
helpSpec
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   100
    <resource: #help>
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   101
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   102
    ^ super helpSpec addPairsFrom:#(
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   103
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   104
#searchBox
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   105
'Show a search box at the bottom to search for substrings in the string keys'
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   106
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   107
#browseReferringMethods
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   108
'Browse methods which refer to this string'
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   109
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   110
)
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   111
! !
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
   112
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   113
!InternationalLanguageTranslationEditor class methodsFor:'image specs'!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   114
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   115
closeSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   116
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   117
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   118
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   119
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   120
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   121
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   122
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   123
     self closeSearchBar inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   124
     ImageEditor openOnClass:self andSelector:#closeSearchBar
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   125
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   126
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   127
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   128
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   129
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   130
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   131
	constantNamed:#'Psiware::SystemManagement class closeSearchBar'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   132
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   133
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@GQ\SD1LSD1LSD1LSD1LWGP@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   134
@ATGA@HA@PDA@PDA@PHDA1T@@@@@@@@TAENG!!(VB XA?_''57QPPT@@@@@@@@E NJ^V)&X%)UTT5IV7 KE @@@@@@@A A"7Q,#&9VS%^MQ$E<DQ @@@@@@@@Z
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   135
@X%-#9NRX52R$80:^1@Z@@@@@@@@F0FHY6>R$9JR$9ION''(PF0@@@@@@@A<A 5ABT)FS$9D=KR13C1<@@@@@@@@)@WUCND*Q$9NQM"T!!XP8)@@@@@@@@K E2
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   136
O4RQ$9FQ$9@2G%8JK @@@@@@@CLA\S2D$9D9M)BS]!!1]BSL@@@@@@@@7@W@5LXP6J2\2]"P"VP 7@@@@@@@@O U+R3@*I2T#HA0&N5 RO @@@@@@@D LPF%(
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   137
YVQ W59]VU 4CD @@@@@@@AGFP4F@PDA@PDA@PDFCQ%G@@@@@@@@K41TUEQTUEQTUEQTUEQLK0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   138
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 167 25 15 170 49 40 171 50 39 174 68 60 176 56 48 176 58 49 183 118 110 184 45 32 184 46 32 184 47 34 184 71 58 184 85 78 184 86 79 185 53 39 186 57 42 186 59 43 186 60 45 186 68 58 190 187 180 192 188 181 193 189 182 194 190 183 195 192 184 197 194 186 202 148 142 202 199 191 205 202 195 207 64 48 207 203 195 208 65 49 208 205 198 209 65 49 209 66 49 209 69 52 210 66 49 210 78 64 211 67 51 211 71 54 212 69 51 212 208 200 212 208 202 213 69 52 213 70 52 213 79 57 215 80 59 215 212 206 217 214 207 218 79 62 218 84 67 219 107 95 219 216 210 221 84 63 221 84 67 221 109 96 221 218 213 222 76 56 222 110 96 222 113 79 223 87 67 223 87 70 223 115 99 224 221 216 225 89 72 225 105 91 225 117 84 227 89 64 227 91 73 227 112 98 227 115 95 227 122 92 227 224 219 227 225 219 228 113 83 228 113 99 229 102 87 229 226 221 230 115 84 230 117 81 230 142 117 231 102 80 231 116 86 231 120 103 231 131 119 231 228 224 232 118 88 232 119 82 233 143 117 234 99 76 234 102 79 234 119 89 234 127 100 234 145 119 235 104 82 235 106 86 236 108 89 236 110 92 236 113 92 236 121 91 236 146 119 237 113 95 237 115 98 237 122 92 237 132 100 238 117 101 238 119 104 238 123 93 238 123 109 238 131 98 238 133 102 238 146 120 238 148 121 239 125 112 239 127 115 239 129 118 239 131 105 239 134 102 240 135 122 240 200 196 242 135 113 242 141 116 242 141 119 242 145 116 242 147 118 242 148 120 243 137 115 243 138 118 243 141 121 243 142 123 243 144 126 243 145 129 243 151 134 243 202 197 244 147 132 244 149 135 244 152 137 244 163 142 244 164 145 245 160 143 245 164 146 245 213 204 246 213 203 248 215 205 249 215 206 252 244 243 253 244 243 253 247 245 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? @@@@@@@@@@@@') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   139
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   140
    "Created: / 15-06-2007 / 18:04:38 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   141
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   142
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   143
restartSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   144
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   145
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   146
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   147
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   148
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   149
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   150
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   151
     self restartSearchBarIcon inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   152
     ImageEditor openOnClass:self andSelector:#restartSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   153
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   154
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   155
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   156
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   157
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   158
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   159
	constantNamed:#'Psiware::SystemManagement class restartSearchBarIcon'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   160
	ifAbsentPut:[(Depth24Image new) width: 20; height: 20; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   161
@@@@@@@@@@@@@@@@@@@@@@@@?>SX?>''V?>;)?>O!!?>G]?>WY@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=3\:[>''5;JF/Y-.+XY),(U.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   162
6JZK?=J1?>V<>.+I@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>?'':+:!!19]U6*-Q?]Y/?>RC?>*!!?>F_>+=939UL2Y!!L>MJT??W[@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   163
@@@@??[-=\^&1IEP=<Q[?>1/?=5$?=52?>NT?=^Q?>BP?>FG>;1]6JEO8;^H?]3I@@@@@@@@@@@@@@@@@@@@?\*95Y-)<+!!$??.F?>)17+-U8,E40Y-.09I)
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   164
:Z1-?=I??=)8?<1.>K597;NL??K,@@@@@@@@@@@@?=#M6I>B>+:@?>2U=,]]5[IN7,^C5LB[<MWL?]#O=,BZ7)=\>;Y[??FP?=>O1YEW8<B$;=WH@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   165
>,"%8Z:A?>N#?>._5KA$9-JW7=+FX6M+V%U3"''*T0Y>V4ZA7595T=;1"?=&D?=&L,W(93IU\:KE9=LBG9[Q9;K1<?=^R:K591*-6??''[@@@@RE%37>7?=?/?
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   166
>^_''3*.M0YAU<K5,?>ZO?=>G?<!!6?<Y6>+U(69YI3:IG?=Z@?>NU5:=19,6%@@@@@@@@OU5*2.+7;O??5-KF2;JS?=*&?>&"?=.E?>2R?=&F?>"X8I-N5)ED
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   167
29$&?>M:?=*F3:E&>]/A@@@@@@@@O5=.7O??5^/(?O++<M.>0I-/;LNE??2)?=&B?>^%,W)A8:14?=FX3)TR?>U/?=Q:3IAZ?=?T@@@@@@@@P5Y68_#?7.70
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   168
??[1??C_:,F%6;A=>MJA?>6":,6+&G91?>+^?>+]79<$?<1\?=:C5IM[?<;F@@@@@@@@Q$1>6N_?<?+?<.W.?>3*??S(=,.(2Z!!#=-:^+9>P4,[P<>''46=O^
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   169
=+MX;Z)O?>^Q:Z]*;+Z''@@@@@@@@TD:O9^/?;/C??>???>/:?>71?>7Z;]^%0+JA7=CI8]O"0+[D8=#&?<&V79="?=2L?\E88[BG@@@@@@@@VU&M=_3?9N''?
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   170
>/C???K??NK/??[1???#9M?B??3;(IV#/[WD;^_5@@@@;KR]<[10?=Q68[9,8,>W@@@@TU9&;/??9__9:.;/?_#<??/?>?[==?79>_?=<_S9T5M[0,WN7^G*
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   171
@@@@@@@@1Y= >=!!>9,]-3[],6]B''TEH=;O_''=O?6>O77>O''=>//?=_+?:O_?:_''?>O??SEM[/<[P6.O,@@@@@@@@8-F%1*%/9[>@?>R(7+VG_%,;\E]CW$=H
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   172
U5AWV5%.U5);R5M:Q5M;S%-=TE]*[GI>):696M;*@@@@@@@@@@@@6\F[2Y914)9.;[VF?L"!!8[^_3J>''0KB:0;?V0,_''-<C),K/(,;7!!+[OI,K[D2=G_9N+8
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   173
@@@@@@@@@@@@@@@@@@@@?\*_7*]>3))5/II9+9FF+9> 0;7I5-#-7NO?7^#?8^/?:/G?7NK07>W3@@@@@@@@@@@@@@@@@@@@@@@@?>N;?>N;?=:9?>7T?>#X
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   174
>^_%=N?6<OK?@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@?@OC?0OO?8O_?<O_?>O???O?????_??>_??>_??>_??>_??>_??>_??__??O???O???G???A??/A? O') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   175
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   176
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   177
searchNextIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   178
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   179
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   180
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   181
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   182
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   183
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   184
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   185
     self searchNextIcon inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   186
     ImageEditor openOnClass:self andSelector:#searchNextIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   187
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   188
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   189
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   190
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   191
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   192
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   193
	constantNamed:#'Psiware::SystemManagement class searchNextIcon'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   194
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   195
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   196
@@@@@@AFF XA@PXUQ @@@@@@@@@@@@@@@@@*@Q5G^WX6E0D*@@@@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@A[@U==\F-"VUQOUSLAV0@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   197
G19-D <NCP0KB!!@7D1<@@@@@@@@@  ]MT5JY&Y&Y&Y%RLR4G  @@@@@@@H\A WL $)&Y&Y&RF35B@X\@@@@@@@BK@XA1WA"X&Y&XE#T:P@FK@@@@@@@@# !!H
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   198
]F$<II&YH3H>N2 H# @@@@@@@@@''GG)*Y2$9NRIDO4DQHP@@@@@@@@@@!!@EP[6U]I"UIQTL.@XP@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@@@@EDA
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   199
FSQ!!VC@T@UD@@@@@@@@@@@@@@@@@#R,I@PDIJ84@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   200
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 48 54 77 55 63 87 56 64 89 57 67 90 59 67 90 64 69 89 71 74 92 72 76 96 76 81 100 80 89 118 82 90 119 83 91 120 84 92 122 86 94 123 87 96 124 89 97 126 92 104 132 97 106 136 97 110 138 97 112 138 100 102 112 101 107 130 104 118 144 105 113 135 105 124 146 107 109 118 107 116 144 110 127 148 112 126 148 113 129 148 117 119 129 118 130 156 119 123 133 125 140 174 127 131 146 127 132 148 127 146 178 130 151 181 131 132 143 133 149 185 133 152 182 134 134 138 137 140 150 138 138 142 139 156 191 141 160 195 143 164 199 143 169 198 144 157 197 144 158 197 152 173 208 153 184 209 155 167 210 156 180 208 157 179 215 157 180 211 160 162 171 160 173 216 160 174 216 160 182 214 161 173 217 161 174 217 161 176 219 161 179 220 161 180 220 163 182 222 163 184 222 164 182 222 164 184 223 166 164 161 166 189 212 166 194 211 167 190 228 167 194 229 167 200 221 169 170 174 169 195 212 169 196 232 170 181 228 170 203 221 171 171 176 171 173 182 171 193 220 173 182 232 173 192 232 173 200 234 175 206 239 175 210 240 176 188 237 178 175 168 178 175 173 178 202 234 178 206 240 179 195 238 180 205 223 180 214 243 180 216 244 181 193 242 181 195 239 181 204 223 181 212 243 182 206 242 182 209 243 184 180 173 184 211 244 184 215 245 185 198 246 185 200 244 188 215 233 188 225 249 189 226 249 190 206 250 190 219 248 191 209 249 191 217 248 191 222 248 192 188 181 192 221 249 194 190 184 195 191 184 196 226 251 196 232 251 199 196 189 202 198 191 202 226 253 203 199 193 203 229 253 203 237 252 203 237 253 204 202 196 206 202 195 206 205 204 207 203 196 208 204 197 208 205 201 212 208 200 212 208 201 212 208 202 212 209 205 213 210 202 213 212 213 214 211 206 215 212 207 216 213 206 218 215 210 220 221 223 221 219 214 222 219 215 222 220 215 230 228 225 236 235 232 243 243 244 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@G C@_8C@?<CA?>CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@?<C@_8C@G C@@@C@@@C@@@C') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   201
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   202
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   203
searchPreviousIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   204
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   205
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   206
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   207
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   208
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   209
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   210
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   211
     self searchPreviousIcon inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   212
     ImageEditor openOnClass:self andSelector:#searchPreviousIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   213
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   214
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   215
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   216
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   217
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   218
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   219
	constantNamed:#'Psiware::SystemManagement class searchPreviousIcon'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   220
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   221
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   222
@@@@@@BMJ0$A@P$+#P@@@@@@@@@@@@@@@@AQ@Q$4XU 0E@EQ@@@@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@BD@UA/YU4&IT%EP28A!!@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   223
I11:Z&\)NS$"QC=ADRD@@@@@@@@@# !!H]F$<II&YH3H>N2 H# @@@@@@@H,A GE\FI"Y&Y VMS)@@X,@@@@@@@BG@XE3HIJY&Y&Y$!!,=P FG@@@@@@@@  ]M
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   224
T5JY&Y&Y&Y%RLR4G  @@@@@@@@@_G&4RC08MC@,JDC\SG0@@@@@@@@@@V0E__WA+X%%TS5T3@U,@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@@@@B(A
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   225
GT]9]#XW@R(@@@@@@@@@@@@@@@@@Q!!(F@PDFETX@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   226
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 48 54 77 55 63 87 56 64 89 57 67 90 59 67 90 64 69 89 71 74 92 72 76 96 76 81 100 80 89 118 82 90 119 83 91 120 84 92 122 86 94 123 87 96 124 89 97 126 92 104 132 97 106 136 97 110 138 97 112 138 100 102 112 101 107 130 104 118 144 105 113 135 105 124 146 107 109 118 107 116 144 110 127 148 112 126 148 113 129 148 117 119 129 118 130 156 119 123 133 125 140 174 127 131 146 127 132 148 127 146 178 130 151 181 131 132 143 133 149 185 133 152 182 134 134 138 137 140 150 138 138 142 139 156 191 141 160 195 143 164 199 143 169 198 144 157 197 144 158 197 152 173 208 153 184 209 155 167 210 156 180 208 157 179 215 157 180 211 160 162 171 160 173 216 160 174 216 160 182 214 161 173 217 161 174 217 161 176 219 161 179 220 161 180 220 163 182 222 163 184 222 164 182 222 164 184 223 166 164 161 166 189 212 166 194 211 167 190 228 167 194 229 167 200 221 169 170 174 169 195 212 169 196 232 170 181 228 170 203 221 171 171 176 171 173 182 171 193 220 173 182 232 173 192 232 173 200 234 175 206 239 175 210 240 176 188 237 178 175 168 178 175 173 178 202 234 178 206 240 179 195 238 180 205 223 180 214 243 180 216 244 181 193 242 181 195 239 181 204 223 181 212 243 182 206 242 182 209 243 184 180 173 184 211 244 184 215 245 185 198 246 185 200 244 188 215 233 188 225 249 189 226 249 190 206 250 190 219 248 191 209 249 191 217 248 191 222 248 192 188 181 192 221 249 194 190 184 195 191 184 196 226 251 196 232 251 199 196 189 202 198 191 202 226 253 203 199 193 203 229 253 203 237 252 203 237 253 204 202 196 206 202 195 206 205 204 207 203 196 208 204 197 208 205 201 212 208 200 212 208 201 212 208 202 212 209 205 213 210 202 213 212 213 214 211 206 215 212 207 216 213 206 218 215 210 220 221 223 221 219 214 222 219 215 222 220 215 230 228 225 236 235 232 243 243 244 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@G C@_8C@?<CA?>CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@?<C@_8C@G C@@@C@@@C@@@C') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   227
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   228
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   229
searchToolBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   230
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   231
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   232
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   233
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   234
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   235
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   236
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   237
     self searchToolBarIcon inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   238
     ImageEditor openOnClass:self andSelector:#searchToolBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   239
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   240
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   241
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   242
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   243
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   244
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   245
	constantNamed:#'Psiware::SystemManagement class searchToolBarIcon'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   246
	ifAbsentPut:[(Depth24Image new) width: 22; height: 22; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   247
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   248
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   249
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>4][>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   250
@@@@@@@@@@@@@@@@@@@@@@@@@@@@;>#8/L#+!!:KS!!:KS/,'',;>''9@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2];>^)WH
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   251
NE:+KU*:J5&9NE6*_I#K4^S>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>RV3DLER"SWR6$K#0#;[.SGJ4L5"''UG_N4][>@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   252
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*K''\JT*,U6Z7:^S?>/C*;.3,6>C>RFF(KEZ"3-_-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   253
@@@@@@@@@@@@&Z''HFTF &Z7">N#:7NK?7NK?6=W>!!Y''YH4N -+3T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%I>;FDV)#ZWU??''57NK?
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   254
7NK?:>_?\8WKFCN".K#T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1L;.A#V[O5")3=W;=/[4</W:1,??K$JVI4Z\7-''4@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   255
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?-,[1E#:&C"ZZH3F U6_EU63FHS^XHS.K JOX7-''4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   256
,K_*O5ZTCRBLPU&0FCBHDB&RDR6RH$NI Y#I4][>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?-;#%ND&KC">BYV.*4=;>7.+>-<K!!,K/!!7NK?
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   257
:^C;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?/K3^PT%<CBI/NE>==O;8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   258
@@@@@@@@@@@@7NK? (J9GB1SZV>W:M3?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5MS&++3H6M/#@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   259
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   260
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   261
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   262
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   263
@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@A C@G8C@O<C@_>C@_>C@_>C@_>C@_>C@?>CA?<CC?8CG8@CG0@CC @CA@@C@@@C@@@C@@@C@@@C') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   264
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   265
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   266
warningSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   267
    "This resource specification was automatically generated
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   268
     by the ImageEditor of ST/X."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   269
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   270
    "Do not manually edit this!! If it is corrupted,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   271
     the ImageEditor may not be able to read the specification."
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   272
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   273
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   274
     self warningSearchBarIcon inspect
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   275
     ImageEditor openOnClass:self andSelector:#warningSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   276
     Icon flushCachedIcons
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   277
    "
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   278
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   279
    <resource: #image>
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   280
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   281
    ^Icon
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   282
	constantNamed:#'Psiware::SystemManagement class warningSearchBarIcon'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   283
	ifAbsentPut:[(Depth24Image new) width: 22; height: 19; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   284
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?:.+<Y"P??C\@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@>_;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   285
@@@@?]SZ)5]X.6!! -HM2??''*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>39-7*B4H&G>[N+%%MJ>\#A@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   286
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<+R?*U1&?=CN?>W^4HJ@+FY$?>+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   287
@@@@@@@@@@@@@@@@@@@@?>G_)U!!^>Z^->,B><+"4?*^-%C8?;;Z+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@??#1-(E;.65+?<#H
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   288
?=_T?=GP?::65W-=(EQF?>WQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?\#D*VAY?;61<;"0;,C@6J^+;*"0>ZN$&CX)6(-:@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   289
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>#+/7Q148E6?<"4<L&:W#(:G@@@392!!48^G9WM(%24_?=WN@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   290
??C?7Y&$.E5\?;V*=<:8??K_R3X5DP@@4+R49ZZ!!7VIZ/#85)%UR??G/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=7.2&)6=IJQ?;..=]W@??7*PS$7E@,N
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   291
4<OC?>K^>(M=1S8;)$ID8Y6^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;HNR4U%%<)&S?<^9??_(??;3REEN@P,J2<[C??K/?:R!!/C8?&R(0(T-N?>GZ@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   292
@@@@@@@@@@@@@@@@@@@@?<;H,31B3T9U2'')1?L3@?>3&=^7*XWE0@@<M7=;\??S3?=_U46-,#Q(!!$B,/18"A@@@@@@@@@@@@@@@@@@@@??G&1G!!*,S03)SP,
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   293
3()?>=WL??_:<>33[G:@D2T%;^/,??#8??K19Y6^&R(0!!QPX#S8:;K22@@@@@@@@@@@@@@@@<*RZ+5I@*$D+*T48<[N&?>C_7,+U??3?7N''/(J.-?/+;??W5
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   294
;.O!!?>G_3&]+ 0(O#B8.(U9X@@@@@@@@@@@@?<?Y/%MM.487%$P^7I)7?<&=?=+ <^W3;?C?YV]3JR .-*60=/W35.[#<>W"?:*+*3@3$R\)^R ''2)^T@@@@
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   295
?>K2;(ZO2DQ@-SP!!,5H/?<F!!?<V=?;3B?=_"?>7:)72EUBT+<,GD?>?,<M;Z>]GO?<#J8VM& P4P_A0^ C(:?>+''?:"+34%H13L/02("13T(13\,5$H>3S<=
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   296
1TMC0DQD/$IB/D@>.S4;-S,8,C(:,C 9-3X:(A4""@4R_1DT RH&/6%*?82D/S8503873C<85C<923H,23@+/RP\-"HX,"HW+"DX*"@V)10U)1(S)!!XU)AXU
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   297
(Q0_$1XZ#1X["A(]^QPX&34>?;&).&-Z/6]Y06MU1&AR/5UG15-N0EYF1&EO0&EN/&EP.6AN.%5N.5-M.5%P/UYQ.$)I.4)L0UQW/U-\+5YX5XFA') ; mask:((Depth1Image new) width: 22; height: 19; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@C G@G0C@O0C@O8C@_8C@?<C@?<CA?>CC??CC??CC??#G??#O??3O??3_??;????????????????') ; yourself); yourself]
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   298
! !
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
   299
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
!InternationalLanguageTranslationEditor class methodsFor:'interface specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
windowSpec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
     by the UIPainter of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
     the UIPainter may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
    "
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   310
     UIPainter new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   311
     Tools::InternationalLanguageTranslationEditor new openInterface:#windowSpec
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
   312
     Tools::InternationalLanguageTranslationEditor open
2015
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
    <resource: #canvas>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   317
    ^
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   318
    #(FullSpec
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   319
       name: windowSpec
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   320
       window:
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   321
      (WindowSpec
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   322
	 label: 'InternationalLanguageTranslationEditor'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   323
	 name: 'InternationalLanguageTranslationEditor'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   324
	 min: (Point 10 10)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   325
	 bounds: (Rectangle 0 0 774 610)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   326
	 menu: mainMenu
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   327
       )
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   328
       component:
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   329
      (SpecCollection
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   330
	 collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   331
	  (MenuPanelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   332
	     name: 'ToolBar'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   333
	     layout: (LayoutFrame 0 0 0 0 0 1 30 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   334
	     menu: menuToolBar
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   335
	     textDefault: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   336
	   )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   337
	  (VariableVerticalPanelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   338
	     name: 'TranslationsVariableVerticalPanel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   339
	     layout: (LayoutFrame 0 0 30 0 0 1 -32 1)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   340
	     component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   341
	    (SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   342
	       collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   343
		(DataSetSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   344
		   name: 'KeyStringAndLanguageSelectionTable'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   345
		   model: selectedKeyRow
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   346
		   menu: keyStringAndLanguageSelectionTableMenu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   347
		   hasHorizontalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   348
		   hasVerticalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   349
		   dataList: keyStringAndLanguageSelectionTable
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   350
		   columnHolder: keyStringAndLanguageSelectionTableColumnDescriptionHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   351
		   beDependentOfRows: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   352
		   columnAdaptor: yourself
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   353
		   postBuildCallback: postBuildDataSet:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   354
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   355
		(VariableVerticalPanelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   356
		   name: 'VariableVerticalPanel1'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   357
		   component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   358
		  (SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   359
		     collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   360
		      (ViewSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   361
			 name: 'Box1'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   362
			 component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   363
			(SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   364
			   collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   365
			    (LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   366
			       label: 'Original String (Key):'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   367
			       name: 'Label2'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   368
			       layout: (LayoutFrame 0 0 -2 0 0 1 28 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   369
			       translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   370
			       adjust: left
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   371
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   372
			    (TextEditorSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   373
			       name: 'OriginalText'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   374
			       layout: (LayoutFrame 0 0 27 0 0 1 -2 1)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   375
			       model: originalTextHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   376
			       hasHorizontalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   377
			       hasVerticalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   378
			       modifiedChannel: originalTextModifiedHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   379
			       acceptCallBack: languageTextAccepted
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   380
			       hasKeyboardFocusInitially: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   381
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   382
			    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   383
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   384
			 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   385
		       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   386
		      (ViewSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   387
			 name: 'Box3'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   388
			 component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   389
			(SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   390
			   collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   391
			    (LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   392
			       label: 'Select Another Language as example:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   393
			       name: 'Label3'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   394
			       layout: (LayoutFrame 0 0 -6 0 0 1 24 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   395
			       translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   396
			       adjust: left
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   397
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   398
			    (ComboBoxSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   399
			       name: 'ComboBox1'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   400
			       layout: (LayoutFrame 281 0 -2 0 406 0 18 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   401
			       model: exampleLanguageSelectionHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   402
			       immediateAccept: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   403
			       acceptOnLeave: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   404
			       acceptOnLostFocus: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   405
			       acceptOnPointerLeave: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   406
			       comboList: shownLanguages
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   407
			       useIndex: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   408
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   409
			    (TextEditorSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   410
			       name: 'ExampleLanguageText'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   411
			       layout: (LayoutFrame 0 0 30 0 0 1 0 1)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   412
			       model: exampleLanguageTextHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   413
			       hasHorizontalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   414
			       hasVerticalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   415
			       isReadOnly: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   416
			       hasKeyboardFocusInitially: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   417
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   418
			    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   419
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   420
			 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   421
		       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   422
		      (ViewSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   423
			 name: 'Box2'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   424
			 component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   425
			(SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   426
			   collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   427
			    (LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   428
			       label: 'Translated String:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   429
			       name: 'Label1'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   430
			       layout: (LayoutFrame 0 0 0 0 0 1 30 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   431
			       translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   432
			       adjust: left
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   433
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   434
			    (TextEditorSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   435
			       name: 'LanguageText'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   436
			       layout: (LayoutFrame 0 0 30 0 0 1 0 1)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   437
			       model: languageTextHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   438
			       hasHorizontalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   439
			       hasVerticalScrollBar: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   440
			       acceptChannel: languageTextAcceptHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   441
			       modifiedChannel: languageTextModifiedHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   442
			       acceptCallBack: languageTextAccepted
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   443
			       hasKeyboardFocusInitially: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   444
			       postBuildCallback: languageEditorBuilt:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   445
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   446
			    (ActionButtonSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   447
			       label: 'Paste Previous'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   448
			       name: 'pastePreviousTranslation'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   449
			       layout: (LayoutOrigin 0 0.83085250338295003 0 0.034482758620689995)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   450
			       translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   451
			       model: pastePreviousTranslationInLanguageText
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   452
			       enableChannel: pastePreviousTranslationEnableHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   453
			       disabledLogo: 'Paste Previous'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   454
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   455
			    (ActionButtonSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   456
			       label: 'Paste Original'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   457
			       name: 'Button1'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   458
			       layout: (LayoutOrigin -95 0.83085250338295003 0 0.034482758620689995)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   459
			       translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   460
			       model: pasteOriginalInLanguageText
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   461
			       enableChannel: pasteOriginalEnableHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   462
			       disabledLogo: 'Paste Original'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   463
			     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   464
			    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   465
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   466
			 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   467
		       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   468
		      )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   469
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   470
		   )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   471
		   handles: (Any 0.3333333333333301 0.66666666666667018 1.0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   472
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   473
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   474
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   475
	     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   476
	     handles: (Any 0.5 1.0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   477
	     postBuildCallback: postBuildTranslationsPanel:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   478
	   )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   479
	  (ViewSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   480
	     name: 'SearchBox'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   481
	     layout: (LayoutFrame 0 0 -32 1 0 1 0 1)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   482
	     level: -1
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   483
	     visibilityChannel: searchBoxVisible
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   484
	     component:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   485
	    (SpecCollection
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   486
	       collection: (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   487
		(ActionButtonSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   488
		   label: 'closeSearchBarIcon'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   489
		   name: 'closeSearchBarButton'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   490
		   layout: (LayoutFrame 4 0 5 0 25 0 26 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   491
		   hasCharacterOrientedLabel: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   492
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   493
		   model: closeSearchBar
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   494
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   495
		(LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   496
		   label: 'Search:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   497
		   name: 'SearchLabel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   498
		   layout: (LayoutFrame 30 0 5 0 100 0 27 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   499
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   500
		   adjust: right
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   501
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   502
		(InputFieldSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   503
		   name: 'SearchEntryField'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   504
		   layout: (LayoutFrame 100 0 5 0 257 0 27 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   505
		   model: searchTextHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   506
		   immediateAccept: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   507
		   acceptOnReturn: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   508
		   acceptOnTab: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   509
		   acceptOnLostFocus: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   510
		   modifiedChannel: searchTextModifiedHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   511
		   acceptOnPointerLeave: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   512
		   postBuildCallback: postBuildSearchTextView:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   513
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   514
		(ActionButtonSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   515
		   label: 'searchNextIcon'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   516
		   name: 'SearchNextButton'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   517
		   layout: (LayoutFrame 264 0 5 0 285 0 26 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   518
		   hasCharacterOrientedLabel: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   519
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   520
		   model: searchNextText
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   521
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   522
		(ActionButtonSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   523
		   label: 'searchPreviousIcon'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   524
		   name: 'searchPreviousButton'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   525
		   layout: (LayoutFrame 292 0 5 0 313 0 26 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   526
		   hasCharacterOrientedLabel: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   527
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   528
		   model: searchPreviousText
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   529
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   530
		(CheckBoxSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   531
		   label: 'Ignore case'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   532
		   name: 'IgnoreCaseCheckBox'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   533
		   layout: (LayoutFrame 322 0 5 0 518 0 27 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   534
		   model: ignoreCaseHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   535
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   536
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   537
		(LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   538
		   label: 'SearchBarImageInfoLabel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   539
		   name: 'SearchBarImageInfoLabel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   540
		   layout: (LayoutFrame 524 0 5 0 548 0 27 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   541
		   hasCharacterOrientedLabel: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   542
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   543
		   labelChannel: searchBarImageInfoLabelHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   544
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   545
		(LabelSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   546
		   label: 'SearchBarInfoLabel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   547
		   name: 'SearchBarInfoLabel'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   548
		   layout: (LayoutFrame 551 0 5 0 829 0 27 0)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   549
		   translateLabel: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   550
		   labelChannel: searchBarInfoLabelHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   551
		   adjust: left
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   552
		 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   553
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   554
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   555
	     )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   556
	     postBuildCallback: postBuildSearchBoxView:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   557
	   )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   558
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   559
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   560
       )
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
   561
     )
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
!InternationalLanguageTranslationEditor class methodsFor:'menu specs'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   566
keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   567
    "This resource specification was automatically generated
641467b2f522 Search String
fm
parents: 2053
diff changeset
   568
     by the MenuEditor of ST/X."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   569
641467b2f522 Search String
fm
parents: 2053
diff changeset
   570
    "Do not manually edit this!! If it is corrupted,
641467b2f522 Search String
fm
parents: 2053
diff changeset
   571
     the MenuEditor may not be able to read the specification."
641467b2f522 Search String
fm
parents: 2053
diff changeset
   572
3448
e4a15fd6bec5 #REFACTORING by mawalch
mawalch
parents: 3447
diff changeset
   573
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   574
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   575
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyStringAndLanguageSelectionTableMenu
641467b2f522 Search String
fm
parents: 2053
diff changeset
   576
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor keyStringAndLanguageSelectionTableMenu)) startUp
641467b2f522 Search String
fm
parents: 2053
diff changeset
   577
    "
641467b2f522 Search String
fm
parents: 2053
diff changeset
   578
641467b2f522 Search String
fm
parents: 2053
diff changeset
   579
    <resource: #menu>
641467b2f522 Search String
fm
parents: 2053
diff changeset
   580
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   581
    ^
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   582
     #(Menu
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   583
	(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   584
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   585
	    label: 'Browse Methods Containing this String'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   586
	    itemValue: browseReferringMethods
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   587
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   588
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   589
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   590
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   591
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   592
	    label: 'Set Current NameSpace...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   593
	    itemValue: changeLastNameSpace
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   594
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   595
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   596
	    label: 'Search String in Current NameSpace'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   597
	    itemValue: searchStringInLastNameSpace
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   598
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   599
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   600
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   601
	    isVisible: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   602
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   603
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   604
	    label: 'Set Current Package...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   605
	    itemValue: changeLastPackage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   606
	    isVisible: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   607
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   608
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   609
	    label: 'Search String in Current Package'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   610
	    itemValue: searchStringInLastPackage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   611
	    isVisible: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   612
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   613
	 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   614
	nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   615
	nil
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
   616
      )
641467b2f522 Search String
fm
parents: 2053
diff changeset
   617
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
   618
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
mainMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   626
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
    "
2050
fm
parents: 2049
diff changeset
   628
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#mainMenu
fm
parents: 2049
diff changeset
   629
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor mainMenu)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   634
    ^
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
     #(Menu
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   636
	(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   637
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   638
	    label: 'File'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   639
	    submenu:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   640
	   (Menu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   641
	      (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   642
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   643
		  label: 'New'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   644
		  itemValue: menuNew
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   645
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   646
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   647
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   648
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   649
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   650
		  label: 'Open Resources for Package or Project...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   651
		  itemValue: menuOpenByPackage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   652
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   653
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   654
		  label: 'Open Resource File...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   655
		  itemValue: menuOpen
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   656
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   657
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   658
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   659
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   660
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   661
		  label: 'Save All Resource Files'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   662
		  itemValue: menuSaveAll
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   663
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   664
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   665
		  label: 'Save Resource File'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   666
		  itemValue: menuSave
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   667
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   668
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   669
		  label: 'Save Resource File As...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   670
		  itemValue: menuSaveAs
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   671
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   672
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   673
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   674
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   675
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   676
		  label: 'Import existing translations from file...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   677
		  itemValue: importExistingTranslationsFromFile
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   678
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   679
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   680
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   681
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   682
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   683
		  label: 'Set Current NameSpace'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   684
		  itemValue: changeLastNameSpace
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   685
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   686
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   687
		  label: 'Set Current Package'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   688
		  itemValue: changeLastPackage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   689
		  isVisible: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   690
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   691
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   692
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   693
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   694
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   695
		  label: 'Exit'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   696
		  itemValue: closeRequest
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   697
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   698
	       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   699
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   700
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   701
	    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   702
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   703
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   704
	    label: 'View'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   705
	    submenu:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   706
	   (Menu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   707
	      (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   708
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   709
		  label: 'Show Missing Translations Only'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   710
		  indication: showMissingTranslationsOnly
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   711
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   712
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   713
		  label: 'Show Search Box'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   714
		  indication: searchBoxVisible
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   715
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   716
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   717
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   718
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   719
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   720
		  label: 'Shown Languages'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   721
		  submenuChannel: shownLanguagesMenu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   722
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   723
	       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   724
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   725
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   726
	    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   727
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   728
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   729
	    label: 'Languages'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   730
	    submenu:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   731
	   (Menu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   732
	      (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   733
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   734
		  label: 'Add Language...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   735
		  itemValue: addLanguage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   736
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   737
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   738
		  label: 'Remove Language...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   739
		  itemValue: removeLanguage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   740
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   741
	       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   742
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   743
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   744
	    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   745
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   746
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   747
	    label: 'Translations'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   748
	    submenuChannel: translationsMenuSpec
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   749
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   750
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   751
	    label: 'Preferences'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   752
	    submenu:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   753
	   (Menu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   754
	      (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   755
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   756
		  label: 'Auto Accept Changes'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   757
		  indication: autoAcceptHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   758
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   759
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   760
		  label: 'Search For Similar Translations'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   761
		  indication: searchForSimilarTranslationEnableHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   762
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   763
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   764
		  label: 'Always Write UTF8'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   765
		  indication: alwaysWriteUTF8Holder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   766
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   767
	       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   768
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   769
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   770
	    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   771
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   772
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   773
	    label: 'Help'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   774
	    startGroup: right
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   775
	    submenu:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   776
	   (Menu
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   777
	      (
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   778
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   779
		  label: 'Documentation'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   780
		  itemValue: openDocumentation
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   781
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   782
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   783
		  label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   784
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   785
	       (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   786
		  label: 'About this Application...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   787
		  itemValue: openAboutThisApplication
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   788
		)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   789
	       )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   790
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   791
	      nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   792
	    )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   793
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   794
	 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   795
	nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   796
	nil
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
      )
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   800
menuItemsEditLanguage
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   801
    "This resource specification was automatically generated
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   802
     by the MenuEditor of ST/X."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   803
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   804
    "Do not manually edit this!! If it is corrupted,
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   805
     the MenuEditor may not be able to read the specification."
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   806
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   807
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   808
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menu
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   809
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menu)) startUp
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   810
    "
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   811
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   812
    <resource: #menu>
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   813
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   814
    ^
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   815
     #(Menu
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   816
	(
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   817
	 (MenuItem
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   818
	    enabled: pastePreviousTranslationEnableHolder
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   819
	    label: 'Paste Previous Translation'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   820
	    itemValue: pastePreviousTranslationInLanguageText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   821
	    nameKey: pastePreviousTranslationInLanguageText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   822
	    translateLabel: true
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   823
	  )
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   824
	 )
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   825
	nil
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
   826
	nil
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   827
      )
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   828
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   829
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
menuToolBar
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
    "This resource specification was automatically generated
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
     by the MenuEditor of ST/X."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
    "Do not manually edit this!! If it is corrupted,
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
     the MenuEditor may not be able to read the specification."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
2880
Claus Gittinger <cg@exept.de>
parents: 2570
diff changeset
   837
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
    "
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   839
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#menuToolBar
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
   840
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor menuToolBar)) startUp
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
    "
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
    <resource: #menu>
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   845
    ^
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
     #(Menu
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   847
	(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   848
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   849
	    label: 'Save'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   850
	    itemValue: menuSave
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   851
	    isButton: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   852
	    labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   853
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   854
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   855
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   856
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   857
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   858
	    label: 'Add Translation'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   859
	    itemValue: addTranslation
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   860
	    isButton: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   861
	    labelImage: (ResourceRetriever XPToolbarIconLibrary newRowIcon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   862
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   863
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   864
	    label: 'Remove Translation'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   865
	    itemValue: removeTranslation
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   866
	    isButton: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   867
	    labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   868
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   869
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   870
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   871
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   872
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   873
	    activeHelpKey: browseReferringMethods
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   874
	    label: 'Browse'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   875
	    itemValue: browseReferringMethods
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   876
	    labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowserIcon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   877
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   878
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   879
	    label: ''
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   880
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   881
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   882
	    label: 'Stop Application'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   883
	    itemValue: stopApplication
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   884
	    isButton: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   885
	    isVisible: stopApplicationIconVisibleHolder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   886
	    labelImage: (ResourceRetriever XPToolbarIconLibrary stop16x16Icon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   887
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   888
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   889
	    activeHelpKey: searchBox
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   890
	    label: 'Search'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   891
	    isButton: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   892
	    startGroup: right
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   893
	    hideMenuOnActivated: false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   894
	    indication: searchBoxVisible
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   895
	    shortcutKey: Ctrlf
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   896
	    labelImage: (ResourceRetriever #'Tools::InternationalLanguageTranslationEditor' searchToolBarIcon)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   897
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   898
	 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   899
	nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   900
	nil
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
      )
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   902
!
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   903
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   904
translationsMenuSpec
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   905
    "This resource specification was automatically generated
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   906
     by the MenuEditor of ST/X."
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   907
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   908
    "Do not manually edit this!! If it is corrupted,
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   909
     the MenuEditor may not be able to read the specification."
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   910
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   911
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   912
    "
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   913
     MenuEditor new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#translationsMenuSpec
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   914
     (Menu new fromLiteralArrayEncoding:(Tools::InternationalLanguageTranslationEditor translationsMenuSpec)) startUp
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   915
    "
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   916
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   917
    <resource: #menu>
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   918
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   919
    ^
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   920
     #(Menu
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   921
	(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   922
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   923
	    label: 'Add Translation...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   924
	    itemValue: addTranslation
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   925
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   926
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   927
	    label: 'Remove Translation...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   928
	    itemValue: removeTranslation
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   929
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   930
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   931
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   932
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   933
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   934
	    label: 'Extract from Package...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   935
	    itemValue: extractTranslationsFromProject
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   936
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   937
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   938
	    label: 'Extract from Class...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   939
	    itemValue: extractTranslationsFromClass
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   940
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   941
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   942
	    label: 'Extract from NameSpace...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   943
	    itemValue: extractTranslationsFromNameSpace
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   944
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   945
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   946
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   947
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   948
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   949
	    label: 'Run Application and Collect Translations...'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   950
	    itemValue: runApplicationAndCollectTranslations
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   951
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   952
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   953
	    label: '-'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   954
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   955
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   956
	    label: 'Generate Missing Translations'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   957
	    itemValue: generateMissingTranslations
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   958
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   959
	 (MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   960
	    label: 'Generate Missing Translations Slice'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   961
	    submenuChannel: menuSliceTranslateGenerate
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   962
	    isMenuSlice: true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   963
	  )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   964
	 )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   965
	nil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   966
	nil
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
   967
      )
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   968
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   969
2433
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   970
!InternationalLanguageTranslationEditor class methodsFor:'startup'!
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   971
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   972
openOnFile:aFilename
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   973
    |fn|
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   974
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   975
    fn := aFilename asFilename.
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   976
3077
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
   977
    ^ self new
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   978
	allButOpen;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   979
	readResourceFile:fn asLanguage:fn withoutSuffix baseName;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   980
	openWindow;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   981
	yourself.
3077
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
   982
!
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
   983
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
   984
openOnPackage:aPackageId
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
   985
    ^ self new
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   986
	allButOpen;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   987
	readResourceFileForPackage:aPackageId;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   988
	openWindow;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
   989
	yourself.
2433
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   990
! !
88fbe1703c31 +openOnFile
Claus Gittinger <cg@exept.de>
parents: 2419
diff changeset
   991
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   992
!InternationalLanguageTranslationEditor class methodsFor:'tableColumns specs'!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   993
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   994
keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   995
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   996
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   997
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   998
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
   999
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1000
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1001
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1002
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#keyTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1003
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1004
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1005
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1006
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1007
    ^#(
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1008
      (DataSetColumnSpec
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1009
	 label: 'Key'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1010
	 labelButtonType: Button
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1011
	 minWidth: 50
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1012
	 model: keyStringInRow:
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1013
       )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1014
      )
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1015
!
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1016
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1017
languageTableColumn
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1018
    "This resource specification was automatically generated
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1019
     by the DataSetBuilder of ST/X."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1020
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1021
    "Do not manually edit this!! If it is corrupted,
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1022
     the DataSetBuilder may not be able to read the specification."
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1023
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1024
    "
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1025
     DataSetBuilder new openOnClass:Tools::InternationalLanguageTranslationEditor andSelector:#languageTableColumn
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1026
    "
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1027
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1028
    <resource: #tableColumns>
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1029
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1030
    ^#(
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1031
      (DataSetColumnSpec
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1032
	 label: lang
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1033
	 labelButtonType: Button
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1034
	 minWidth: 50
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1035
	 editorType: None
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1036
	 model: columnInRow:at:
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1037
	 backgroundSelector: getBackgroundForRow:rowNr:col:
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1038
       )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1039
      )
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1040
! !
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1041
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1042
!InternationalLanguageTranslationEditor methodsFor:'accessing'!
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1043
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1044
currentSelectionIndex
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1045
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1046
    ^ self selectedKeyRow value
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1047
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1048
    "Created: / 16-06-2007 / 09:04:11 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1049
    "Modified: / 19-06-2007 / 17:28:38 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1050
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1051
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1052
exists: anObject
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1053
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1054
    ^self objectsList includes: anObject
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1055
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1056
    "Created: / 19-06-2007 / 16:42:22 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1057
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1058
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1059
indexOf: anObject
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1060
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1061
    ^self objectsList indexOf: anObject
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1062
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1063
    "Created: / 19-06-2007 / 16:39:44 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1064
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1065
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1066
newLanguageText
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1067
"/   languageEditor accept
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
  1068
    ^self languageTextHolder value isEmptyOrNil
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1069
	ifTrue:['']
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1070
	ifFalse:[self languageTextHolder value asCollectionOfLines first.]
2050
fm
parents: 2049
diff changeset
  1071
!
fm
parents: 2049
diff changeset
  1072
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1073
objectsList
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1074
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1075
    ^ keyStringsToLanguageMappings
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1076
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1077
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1078
selectListIndex: rowIndex
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1079
"/    |selection list|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1080
"/    list := self objectsList.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1081
"/    list isEmpty ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1082
"/    selection := list at:rowIndex ifAbsent:nil.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1083
    self selectedKeyRow value: rowIndex.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1084
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1085
    "Created: / 16-06-2007 / 09:06:46 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1086
    "Modified: / 22-06-2007 / 13:45:54 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1087
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1088
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1089
selectedKey
2050
fm
parents: 2049
diff changeset
  1090
   "Returns the current selected key if there is one row seleted. Otherwise, returns nil"
fm
parents: 2049
diff changeset
  1091
     |rowSelectionIndex |
fm
parents: 2049
diff changeset
  1092
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1093
    keyStringsToLanguageMappings isNil ifTrue:[^nil].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1094
    self selectedKeyRow value isNil ifTrue:[^nil].
2050
fm
parents: 2049
diff changeset
  1095
    rowSelectionIndex := self selectedKeyRow value.
fm
parents: 2049
diff changeset
  1096
    rowSelectionIndex == 0 ifTrue:[^nil].
fm
parents: 2049
diff changeset
  1097
    ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1098
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1099
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1100
tableView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1101
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1102
    ^dataSetView scrolledView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1103
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1104
    "Created: / 15-06-2007 / 18:59:51 / Administrador"
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1105
! !
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1106
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1107
!InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1108
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1109
searchForSimilarTranslation
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1110
    "Looks for a quite similar translation for the key and display a dialog with available options"
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1111
    |similarTranslationsAssociations selectedTranslation key|
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1112
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1113
    self shouldSearchForSimilarTranslation ifFalse:[^self].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1114
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1115
    key := self selectedKey.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1116
    key isNil ifTrue:[^ self.].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1117
    similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: key in: self currentLanguage.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1118
    similarTranslationsAssociations isEmpty ifTrue:[^self].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1119
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1120
    similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1121
	collection detect:[:selectedAssociation |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1122
	    selectedAssociation value sameAs: association value] ifNone:[collection add: association].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1123
	collection].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1124
    selectedTranslation := Dialog
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1125
	choose:'Choose one if you consider it´s usefull to translate:
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1126
    ',
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1127
	'<', key, '>  ', (self currentExampleLanguageText ifNil:[''])
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1128
	fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1129
	values: (similarTranslationsAssociations collect:[:each | each value])
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1130
	lines:10
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1131
	cancel: nil.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1132
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1133
    selectedTranslation notNil ifTrue:[self languageTextHolderValue: selectedTranslation].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1134
! !
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1135
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1136
!InternationalLanguageTranslationEditor methodsFor:'aspects'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1137
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1138
alwaysWriteUTF8Holder
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1139
    alwaysWriteUTF8Holder isNil ifTrue:[alwaysWriteUTF8Holder := true asValue].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1140
    ^ alwaysWriteUTF8Holder
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1141
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1142
2050
fm
parents: 2049
diff changeset
  1143
autoAcceptHolder
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1144
    autoAcceptHolder isNil ifTrue:[autoAcceptHolder := true asValue].
2050
fm
parents: 2049
diff changeset
  1145
    ^ autoAcceptHolder
fm
parents: 2049
diff changeset
  1146
!
fm
parents: 2049
diff changeset
  1147
fm
parents: 2049
diff changeset
  1148
exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
  1149
    exampleLanguageSelectionHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1150
	exampleLanguageSelectionHolder := self exampleLanguageByDefault asValue.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1151
	exampleLanguageSelectionHolder addDependent:self.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1152
    ].
2050
fm
parents: 2049
diff changeset
  1153
    ^ exampleLanguageSelectionHolder
fm
parents: 2049
diff changeset
  1154
!
fm
parents: 2049
diff changeset
  1155
fm
parents: 2049
diff changeset
  1156
exampleLanguageTextHolder
fm
parents: 2049
diff changeset
  1157
    exampleLanguageTextHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1158
	exampleLanguageTextHolder := '' asValue.
2050
fm
parents: 2049
diff changeset
  1159
    ].
fm
parents: 2049
diff changeset
  1160
    ^ exampleLanguageTextHolder.
fm
parents: 2049
diff changeset
  1161
!
fm
parents: 2049
diff changeset
  1162
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1163
ignoreCaseHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1164
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1165
    ignoreCaseHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1166
	ignoreCaseHolder := false asValue.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1167
"/ if your app needs to be notified of changes, uncomment one of the lines below:
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1168
"/       ignoreCaseHolder addDependent:self.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1169
	ignoreCaseHolder onChangeSend:#ignoreCaseHolderChanged to:self.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1170
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1171
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1172
    ^ ignoreCaseHolder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1173
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1174
    "Created: / 16-06-2007 / 06:45:04 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1175
    "Modified: / 16-06-2007 / 19:32:15 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1176
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1177
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1178
keyStringAndLanguageSelectionTable
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1179
    keyStringsToLanguageMappings isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1180
	keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1181
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1182
    ^ keyStringsToLanguageMappings.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1183
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1184
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1185
keyStringAndLanguageSelectionTableColumnDescriptionHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1186
    keyStringAndLanguageSelectionTableColumnDescriptionHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1187
	keyStringAndLanguageSelectionTableColumnDescriptionHolder := ValueHolder new.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1188
	keyStringAndLanguageSelectionTableColumnDescriptionHolder value:(self keyStringAndLanguageSelectionTableColumnDescription).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1189
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1190
    ^ keyStringAndLanguageSelectionTableColumnDescriptionHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1191
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1192
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1193
languageAtCol:colNr
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1194
    ^ shownLanguages at:colNr-1.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1195
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1196
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1197
languageShownHolderFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
    |holder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1200
    languageShownHolders isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1201
	languageShownHolders := Dictionary new
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
    ].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1203
    holder := languageShownHolders
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1204
		at:lang
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1205
		ifAbsentPut:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1206
		    |h|
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1207
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1208
		    h := true asValue.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1209
		    h onChangeEvaluate:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1210
			h value ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1211
			   self enableLanguageDisplayFor:lang
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1212
			] ifFalse:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1213
			   self disableLanguageDisplayFor:lang
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1214
			].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1215
		    ].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1216
		    h
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1217
		].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
    ^ holder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1219
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1220
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1221
languageTextAcceptHolder
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1222
    languageTextAcceptHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1223
	languageTextAcceptHolder := false asValue.
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1224
    ].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1225
    ^ languageTextAcceptHolder.
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1226
!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1227
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
languageTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
    languageTextHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1230
	languageTextHolder := '' asValue.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1232
    ^ languageTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
languageTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1236
    languageTextModifiedHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1237
	languageTextModifiedHolder := false asValue.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1238
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
    ^ languageTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1240
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
languagesList
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1243
    languagesList isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1244
	languagesList := List withAll:(self keyStringAndLanguageSelectionTable languages).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1246
    ^ languagesList.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1247
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1248
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1249
originalTextHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1250
    originalTextHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1251
	originalTextHolder := '' asValue.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1252
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1253
    ^ originalTextHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1254
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1255
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1256
originalTextModifiedHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1257
    originalTextModifiedHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1258
	originalTextModifiedHolder := false asValue.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1259
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1260
    ^ originalTextModifiedHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1261
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1262
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1263
pasteOriginalEnableHolder
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1264
   pasteOriginalEnableHolder isNil ifTrue:[pasteOriginalEnableHolder := false asValue].
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1265
    ^ pasteOriginalEnableHolder
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1266
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1267
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1268
pastePreviousTranslationEnableHolder
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1269
   pastePreviousTranslationEnableHolder isNil ifTrue:[pastePreviousTranslationEnableHolder := false asValue].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1270
    ^ pastePreviousTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1271
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1272
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1273
searchBarImageInfoLabelHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1274
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1275
    searchBarImageInfoLabelHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1276
	searchBarImageInfoLabelHolder := nil asValue .
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1277
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1278
    ^ searchBarImageInfoLabelHolder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1279
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1280
    "Created: / 16-06-2007 / 10:06:28 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1281
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1282
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1283
searchBarInfoLabelHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1284
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1285
    searchBarInfoLabelHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1286
	searchBarInfoLabelHolder := '' asValue .
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1287
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1288
    ^ searchBarInfoLabelHolder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1289
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1290
    "Created: / 16-06-2007 / 06:20:49 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1291
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1292
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1293
searchBoxVisible
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1294
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1295
    searchBoxVisible isNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1296
	searchBoxVisible := false asValue.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1297
	searchBoxVisible
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1298
	    onChangeEvaluate:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1299
		self updateToolVisibility.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1300
		searchBoxVisible value ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1301
		    searchTextView takeFocus.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1302
		].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1303
	    ].
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1304
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1305
    ^ searchBoxVisible.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1306
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1307
    "Created: / 15-06-2007 / 18:15:52 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1308
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1309
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1310
searchForSimilarTranslationEnableHolder
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1311
   searchForSimilarTranslationEnableHolder isNil
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1312
	ifTrue:[searchForSimilarTranslationEnableHolder := true asValue].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1313
    ^ searchForSimilarTranslationEnableHolder
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1314
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1315
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1316
searchTextHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1317
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1318
    searchTextHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1319
	searchTextHolder := ValueHolder new.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1320
"/ if your app needs to be notified of changes, uncomment one of the lines below:
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1321
"/       userSelectedHolder addDependent:self.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1322
"/       userSelectedHolder onChangeSend:#searchTextHolderChanged to:self.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1323
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1324
    ^ searchTextHolder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1325
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1326
    "Created: / 15-06-2007 / 18:06:08 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1327
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1328
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1329
searchTextModifiedHolder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1330
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1331
    searchTextModifiedHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1332
	searchTextModifiedHolder := false asValue .
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1333
"/ if your app needs to be notified of changes, uncomment one of the lines below:
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1334
"/       searchTextModifiedHolder addDependent:self.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1335
       searchTextModifiedHolder onChangeSend:#searchTextModifiedHolderChanged to:self.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1336
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1337
    ^ searchTextModifiedHolder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1338
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1339
    "Created: / 15-06-2007 / 18:07:19 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1340
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1341
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1342
selectedKeyRow
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1343
    selectedKeyRow isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1344
	selectedKeyRow := ValueHolder new.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1345
	selectedKeyRow onChangeSend:#selectionChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1346
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1347
    ^ selectedKeyRow.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1348
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1349
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1350
showMissingTranslationsOnly
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1351
    showMissingTranslationsOnly isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1352
	showMissingTranslationsOnly := false asValue.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1353
	showMissingTranslationsOnly onChangeSend:#showMissingTranslationsOnlyChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1354
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1355
    ^ showMissingTranslationsOnly.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1356
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1357
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1358
shownLanguages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1359
    shownLanguages isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1360
	shownLanguages := List new.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1361
	shownLanguages addAll:(self languagesList).
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1362
	shownLanguages onChangeSend:#shownLanguagesChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1363
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1364
    ^ shownLanguages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1365
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1366
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1367
stopApplicationIconVisibleHolder
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1368
    stopApplicationIconVisibleHolder isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1369
	stopApplicationIconVisibleHolder := false asValue.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1370
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1371
    ^ stopApplicationIconVisibleHolder.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1372
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1373
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1374
!InternationalLanguageTranslationEditor methodsFor:'change & update'!
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1375
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1376
languageTextHolderValue: aString
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1377
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1378
    self languageTextHolder value: aString.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1379
    self languageTextModifiedHolder value:true.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1380
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1381
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1382
update:something with:aParameter from:changedObject
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1383
    changedObject == shownLanguages ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1384
	 self shownLanguagesChanged.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1385
	 ^ self.
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1386
    ].
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1387
    changedObject == languageTextAcceptHolder ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1388
	 self updateLanguageTextModification.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1389
	 ^ self.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1390
    ].
2050
fm
parents: 2049
diff changeset
  1391
    changedObject == exampleLanguageSelectionHolder ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1392
	self updateExampleLanguageText.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1393
	^ self.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1394
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1395
    changedObject == showMissingTranslationsOnly ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1396
	self showMissingTranslationsOnlyChanged.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1397
	^ self.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1398
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1399
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1400
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1401
updateCopyPreviousTranslationButtonEnabled
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1402
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1403
     self pastePreviousTranslationEnableHolder value: self shouldCopyPreviousTranslationButtonBeEnabled
2050
fm
parents: 2049
diff changeset
  1404
!
fm
parents: 2049
diff changeset
  1405
fm
parents: 2049
diff changeset
  1406
updateExampleLanguageText
fm
parents: 2049
diff changeset
  1407
fm
parents: 2049
diff changeset
  1408
    self selectedKeyRow value isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
  1409
    self exampleLanguageTextHolder value:self currentExampleLanguageText
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1410
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1411
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1412
updateKeyStringsToLanguageMappings
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1413
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1414
      keyStringsToLanguageMappings
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1415
	at:lastSelectedKey
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1416
	language:lastLanguage
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1417
	put: self newLanguageText.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1418
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1419
2050
fm
parents: 2049
diff changeset
  1420
updateLanguageAndKeySelection
fm
parents: 2049
diff changeset
  1421
fm
parents: 2049
diff changeset
  1422
    self originalTextHolder value: self selectedKey.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1423
    self languageTextHolder value: (self languageTextFromSelectedKeyFor: self currentLanguage).
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1424
    lastLanguage := self currentLanguage.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1425
    lastSelectedKey := self selectedKey.
2050
fm
parents: 2049
diff changeset
  1426
!
fm
parents: 2049
diff changeset
  1427
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1428
updateLanguageTextModification
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1429
     self languageTextModifiedHolder value ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1430
	(self autoAccept or:[Dialog confirm:'Accept changed translation ?']) ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1431
	    self languageTextModifiedHolder value:false.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1432
	    self languageTextHolder value:languageEditor contents.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1433
	    lastLanguage notNil ifTrue:[self updateKeyStringsToLanguageMappings.]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1434
	]
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1435
    ].
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1436
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1437
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1438
updateOriginalTextModification
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1439
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1440
    |answer|
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1441
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1442
	self originalTextModifiedHolder value ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1443
	    answer := OptionBox
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1444
			  request:'Accept changed original text (key) ?'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1445
			  label:'Original text (key) changed'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1446
			  image:(WarningBox iconBitmap)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1447
			  buttonLabels:#('Cancel' 'Accept' 'Accept As New')
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1448
			  values:#(nil #accept #acceptAsNew)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1449
			  default:#acceptAsNew.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1450
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1451
	    answer isNil ifTrue:[^ self originalTextModifiedHolder value:false. ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1452
	    answer == #accept ifTrue:[
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
  1453
    self shouldImplement.        ].
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1454
	    answer == #acceptAsNew ifTrue:[
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
  1455
    self shouldImplement.        ].
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1456
	].
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1457
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1458
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1459
updatePasteOriginalButtonEnabled
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1460
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  1461
     self pasteOriginalEnableHolder value: self shouldPasteOriginalButtonBeEnabled
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1462
! !
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  1463
2050
fm
parents: 2049
diff changeset
  1464
!InternationalLanguageTranslationEditor methodsFor:'dialogs'!
fm
parents: 2049
diff changeset
  1465
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1466
requestEncoderDialog
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1467
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1468
   |box val characterCollection|
2050
fm
parents: 2049
diff changeset
  1469
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1470
    val := '' asValue.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1471
    box := Dialog new.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1472
    (box addTextLabel:'Select or write the encoder') adjust:#left.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1473
    box addVerticalSpace.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1474
    characterCollection := CharacterEncoder supportedExternalEncodings
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1475
	inject: OrderedCollection new
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1476
	into:[:collection :each |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1477
	    collection add: each first;
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1478
			yourself].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1479
    (box addComboBoxOn:val) list: characterCollection.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1480
    box addOkButton.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1481
    box open.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1482
    ^val value
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1483
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1484
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1485
requestEncoderStringFor: lang
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1486
  "Returns an encoder string and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1487
    |encoderString encoder|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1488
    encoderString := self requestEncoderDialog.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1489
    encoderString notEmpty ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1490
	encoder := CharacterEncoder encoderFor: encoderString ifAbsent:nil.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1491
	encoder notNil ifTrue:[keyStringsToLanguageMappings atLanguage: lang putEncoder: encoder.].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1492
    ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1493
    ^encoderString
2050
fm
parents: 2049
diff changeset
  1494
!
fm
parents: 2049
diff changeset
  1495
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1496
requestFilename
2050
fm
parents: 2049
diff changeset
  1497
fm
parents: 2049
diff changeset
  1498
    |aFilename|
fm
parents: 2049
diff changeset
  1499
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1500
    aFilename := Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1501
	requestFileName:(resources string:'Name of resource file:')
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1502
	default:nil
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1503
	pattern:'*.rs'.
2050
fm
parents: 2049
diff changeset
  1504
fm
parents: 2049
diff changeset
  1505
    aFilename isEmptyOrNil ifTrue:[^ nil ].
fm
parents: 2049
diff changeset
  1506
    ^aFilename asFilename
fm
parents: 2049
diff changeset
  1507
!
fm
parents: 2049
diff changeset
  1508
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1509
requestFilenameFor: lang
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1510
  "Returns a filename to save the language resource and updates the language's info"
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1511
    |aFilename|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1512
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1513
    aFilename := Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1514
	requestFileName:(resources string:'Name of resource file to save %1:' with:lang asString)
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1515
	default:nil
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1516
	pattern:'*.rs'.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1517
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1518
    aFilename isEmptyOrNil ifTrue:[^ nil ].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1519
    keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1520
    ^aFilename asFilename
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1521
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1522
2050
fm
parents: 2049
diff changeset
  1523
requestLanguage
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1524
    ^ Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1525
	choose:(resources string:'For which language ?')
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1526
	fromList:languagesList
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1527
	lines:10.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1528
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1529
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1530
requestLanguageToSave
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1531
    ^ Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1532
	choose:'Which language do you want to save?'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1533
	fromList:languagesList
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1534
	lines:10
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1535
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1536
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1537
requestPackage
2419
e71445e7174c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
  1538
    |package allProjects projectsWithResources|
e71445e7174c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
  1539
3264
93f5deb3f9b6 #REFACTORING by Maren
matilk
parents: 3248
diff changeset
  1540
    allProjects := Smalltalk allPackageIDs.
2419
e71445e7174c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
  1541
    projectsWithResources := allProjects
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1542
				select:[:pID |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1543
				    |dir|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1544
				    dir := Smalltalk projectDirectoryForPackage:pID.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1545
				    dir notNil and:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1546
				    (dir asFilename construct:'resources') exists]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1547
				].
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1548
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1549
    package := Dialog
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1550
	requestProject:(resources string:'Name of Package:')
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1551
	from:projectsWithResources
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1552
	initialAnswer:LastProject
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1553
	suggestions:nil.
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1554
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1555
    package isEmptyOrNil ifTrue:[^ nil ].
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1556
    LastProject := package.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1557
    ^ package
2050
fm
parents: 2049
diff changeset
  1558
! !
fm
parents: 2049
diff changeset
  1559
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1560
!InternationalLanguageTranslationEditor methodsFor:'images'!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1561
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1562
restartSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1563
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1564
    ^ self class restartSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1565
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1566
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1567
warningSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1568
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1569
    ^ self class warningSearchBarIcon
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1570
! !
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1571
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1572
!InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1573
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1574
closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1575
    "asks for permission before closing"
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1576
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1577
    self hasUnsavedChanges ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1578
	(Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1579
	    confirm:(resources string:'Close without saving ?')
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1580
	    default:false) ifFalse:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1581
	    ^ self
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1582
	]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1583
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1584
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1585
    super closeRequest
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1586
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1587
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1588
initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1589
    modified := false.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1590
    inSingleFileMode := false.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1591
    methodsUsingKey := Dictionary new.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1592
    super initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1593
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1594
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1595
languageEditorBuilt:aView
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1596
    languageEditor := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1597
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1598
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1599
postBuildDataSet:aView
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1600
    dataSetView := aView.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  1601
    aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1602
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1603
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1604
!InternationalLanguageTranslationEditor methodsFor:'initialize'!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1605
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1606
postBuildSearchBoxView: aBoxView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1607
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1608
    searchBoxView := aBoxView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1609
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1610
    "Created: / 15-06-2007 / 18:02:38 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1611
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1612
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1613
postBuildSearchTextView: anEditFieldView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1614
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1615
    searchTextView := anEditFieldView
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1616
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1617
    "Created: / 15-06-2007 / 18:17:15 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1618
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1619
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1620
postBuildTranslationsPanel: aPanel
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1621
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1622
    translationsPanel := aPanel
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1623
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1624
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1625
postBuildWith:aBuilder
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1626
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1627
    super postBuildWith:aBuilder.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1628
    self updateToolVisibility.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1629
! !
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1630
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1631
!InternationalLanguageTranslationEditor methodsFor:'menu actions'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1632
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1633
addLanguage
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1634
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1635
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1636
    lang := Dialog request:(resources string:'New language (ISO symbol):').
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1637
    lang isEmptyOrNil ifTrue:[^ self].
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1638
    self addLanguage:lang
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1639
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1640
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1641
addLanguage:langArg
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1642
    |lang|
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1643
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1644
    lang := langArg asSymbol.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1645
    (keyStringsToLanguageMappings includesLanguage:lang) ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1646
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1647
    keyStringsToLanguageMappings addLanguage:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1648
    self languagesList add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1649
    self shownLanguages add:lang.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1650
    modified := true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1651
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1652
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1653
addTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1654
    |key index|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1655
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1656
    key := Dialog request:'New Key:'.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1657
    key isEmpty ifTrue:[^self].
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1658
    (self includesKey:key) ifFalse:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1659
	keyStringsToLanguageMappings addKey:key.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1660
	modified := true.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1661
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1662
   index := keyStringsToLanguageMappings indexOfKey:key.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  1663
   self selectedKeyRow value:index
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1664
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1665
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1666
browseReferringMethods
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1667
    |selectedKey methods browser|
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1668
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1669
    selectedKey := self selectedKey.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1670
    selectedKey isNil ifTrue:[^ Dialog information: 'No selected key'].
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1671
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1672
    methods := methodsUsingKey at:selectedKey ifAbsent:nil.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1673
    methods isEmptyOrNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1674
	Dialog information:(resources stringWithCRs:'oops - no method remembered.\Please rerun the extract from XXX menu operation').
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1675
	^ self.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1676
    ].
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1677
    browser := UserPreferences systemBrowserClass browseMethods:methods.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1678
    browser autoSearch:selectedKey ignoreCase:true.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1679
!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  1680
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1681
changeLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1682
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1683
    |nameSpace defaultNameSpace|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1684
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1685
    lastNameSpace notNil ifTrue:[defaultNameSpace := lastNameSpace name].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1686
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Search String in Name Space:' initialAnswer:defaultNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1687
    nameSpace isNil ifTrue:[^self].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1688
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1689
    nameSpace isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1690
	^Dialog information:(resources string:'No such nameSpace exists.')
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1691
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1692
    lastNameSpace := nameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1693
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1694
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1695
changeLastPackage
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1696
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1697
    |package defaultPackage|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1698
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1699
    lastPackage notNil ifTrue:[defaultPackage := lastPackage].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1700
    package := Dialog
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1701
	    requestProject:'Package:'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1702
	    initialAnswer:defaultPackage
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1703
	    suggestions:#('foo' 'bar' 'baz').
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1704
    package isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1705
	^ self "/ Dialog information:(resources string:'No such package exists.')
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1706
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1707
    lastPackage := package.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1708
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1709
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1710
extractTranslationsFromClass
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1711
    |aClass newTranslations|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1712
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1713
    aClass := Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1714
		requestClass:'Class to extract translations from:'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1715
		okLabel:'OK'
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1716
		initialAnswer:(lastExtractedClass ? LastExtractedClass).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1717
    aClass isNil ifTrue:[^ self ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1718
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1719
    lastExtractedClass := LastExtractedClass := aClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1720
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1721
    newTranslations := self extractTranslationsFromClass:aClass.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1722
    self addAllTranslations:newTranslations.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1723
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1724
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1725
extractTranslationsFromNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1726
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1727
    |newTranslations|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1728
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1729
    self changeLastNameSpace.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1730
    lastNameSpace isNil ifTrue:[^self.].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1731
    newTranslations := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1732
    lastNameSpace allClassesDo:[:eachClass |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1733
	newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1734
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1735
    self addAllTranslations:newTranslations.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1736
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1737
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1738
extractTranslationsFromProject
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1739
    |projectID newTranslations initialAnswer suggestions|
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1740
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1741
    initialAnswer := lastExtractedProject ? LastExtractedProject.
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1742
    suggestions := initialAnswer isNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1743
	OrderedCollection new
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1744
    ] ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1745
	OrderedCollection with:initialAnswer
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1746
    ].
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1747
    projectID := Dialog requestProject:(resources string:'Package to extract translations from:') initialAnswer:initialAnswer suggestions:suggestions.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1748
    projectID notNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1749
	projectID := projectID withoutSeparators asSymbol.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1750
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1751
    projectID isEmptyOrNil ifTrue:[^ self ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1752
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1753
    lastExtractedProject := LastExtractedProject := projectID.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  1754
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1755
    newTranslations := Set new.
3282
4e75a66b42af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3264
diff changeset
  1756
    self withWaitCursorDo:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1757
	Smalltalk allClassesDo:[:eachClass |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1758
	    eachClass theNonMetaclass instAndClassMethodsDo:[:eachMethod |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1759
		eachMethod package == projectID ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1760
		    newTranslations addAll:( self extractTranslationsFromMethod:eachMethod ).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1761
		]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1762
	    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1763
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1764
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1765
	self addAllTranslations:newTranslations.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1766
    ].
3454
5488b2613628 #BUGFIX by mawalch
mawalch
parents: 3448
diff changeset
  1767
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1768
    "Modified: / 19-02-2015 / 11:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  1769
    "Modified: / 16-08-2017 / 12:29:21 / mawalch"
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1770
!
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1771
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1772
generateMissingTranslations: keys for: languages using: translator
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1773
    keys do:[:string |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1774
	languages do:[:lang |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1775
	    | translation |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1776
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1777
	    translation := keyStringsToLanguageMappings at:string language:lang.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1778
	    translation isNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1779
		translation := translator value: lang value: string.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1780
		translation notNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1781
		    keyStringsToLanguageMappings at: string language: lang put: translation.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1782
		].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1783
	    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1784
	].
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1785
    ].
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1786
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1787
    "Created: / 19-02-2015 / 12:31:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1788
!
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1789
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1790
generateMissingTranslationsFor: languages
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1791
    self
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1792
	generateMissingTranslations: keyStringsToLanguageMappings keys
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1793
				for: languages
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1794
			      using: [ :lang :string | '**%1** %2' bindWith: lang asUppercase with: string ]
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1795
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1796
    "Created: / 19-02-2015 / 12:39:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1797
!
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1798
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1799
generateMissingTranslationsForAll
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1800
    self generateMissingTranslationsFor: keyStringsToLanguageMappings languages
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1801
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  1802
    "Created: / 19-02-2015 / 12:40:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1803
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1804
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1805
importExistingTranslationsFromFile
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1806
    self information:'The import function is not available in this release'.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1807
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1808
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1809
inspectCanvasMissingStrings
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1810
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1811
    |spec nameSpace missingStrings|
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1812
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1813
    missingStrings := OrderedCollection new.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1814
    nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Specify NameSpace to look for missing strings' initialAnswer:nil.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1815
    nameSpace := Smalltalk at:nameSpace asSymbol.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1816
    nameSpace isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1817
	^Dialog information:(resources string:'No such nameSpace exists.?')
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1818
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1819
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1820
    nameSpace allClassesDo:[:cls |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1821
	cls theMetaclass methodsDo:[:m |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1822
	    m hasResource ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1823
		(m resources includesKey:#canvas) ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1824
		    spec := (cls perform:m selector) decodeAsLiteralArray.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1825
		    spec do:[:eachComponent |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1826
			eachComponent translationKeysDo:[:k |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1827
			    (self includesKey: k) ifFalse:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1828
				missingStrings add: k.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1829
				Transcript showCR: k storeString, '                         ', m printString]]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1830
		    ]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1831
		]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1832
	    ]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1833
	]
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1834
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1835
    missingStrings asSet inspect
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1836
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1837
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1838
menuNew
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1839
    modified ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1840
	(Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1841
	    confirm:(resources stringWithCRs:'Modified translations have not been changed.\\Create new translations set anyway ?')
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1842
	    default:false) ifFalse:[^ self].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1843
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1844
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1845
    keyStringsToLanguageMappings initialize.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1846
    keyStringsToLanguageMappings changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1847
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1848
    self languagesList contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1849
    self shownLanguages contents:self keyStringAndLanguageSelectionTable languages.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1850
    modified := false.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1851
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1852
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1853
menuOpen
2050
fm
parents: 2049
diff changeset
  1854
    |aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1855
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1856
    self withWaitCursorDo:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1857
	aFilename := self requestFilename.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1858
	aFilename isNil ifTrue:[^ self ].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1859
	self readResourceFile:aFilename.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1860
    ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1861
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1862
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1863
menuOpenByPackage
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1864
    |package|
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1865
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1866
    self withWaitCursorDo:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1867
	package := self requestPackage.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1868
	package isNil ifTrue:[^ self ].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1869
	self readResourceFileForPackage:package.
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1870
    ]
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1871
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1872
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1873
menuSave
2050
fm
parents: 2049
diff changeset
  1874
"Saves the language selected in the fileName from where the language resource was obtained."
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1875
    |lang|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1876
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1877
    lang := self requestLanguageToSave.
2050
fm
parents: 2049
diff changeset
  1878
    lang isNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1879
    self saveLanguage: lang
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1880
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1881
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1882
menuSaveAll
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1883
"Saves all the languages in the fileName from where the language resource was obtained."
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1884
    keyStringsToLanguageMappings languagesInUse do:[:each | self saveLanguage: each].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1885
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1886
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1887
menuSaveAs
2050
fm
parents: 2049
diff changeset
  1888
"Saves the language selected in the specified fileName."
fm
parents: 2049
diff changeset
  1889
     |lang aFilename|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1890
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1891
    lang := self requestLanguageToSave.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1892
    lang isNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  1893
    aFilename := self requestFilenameFor:lang.
2050
fm
parents: 2049
diff changeset
  1894
    aFilename isNil ifTrue:[^ self].
fm
parents: 2049
diff changeset
  1895
    self saveResourceFile:aFilename for:lang asSymbol
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1896
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1897
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1898
openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1899
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1900
     It will be invoked when the menu-item 'help-about' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1901
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1902
    "/ could open a customized aboutBox here ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1903
    super openAboutThisApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1904
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1905
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1906
openDocumentation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1907
    "This method was generated by the Browser.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1908
     It will be invoked when the menu-item 'help-documentation' is selected."
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1909
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1910
    "/ change below as required ...
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1911
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1912
    "/ to open an HTML viewer on some document (under 'doc/online/<language>/' ):
2413
655f1c52504c help file reference fixed
Claus Gittinger <cg@exept.de>
parents: 2410
diff changeset
  1913
    HTMLDocumentView openFullOnDocumentationFile:'tools/languageEditor/TOP.html'.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1914
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1915
    "/ add application-specific help files under the 'doc/online/<language>/help/appName'
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1916
    "/ directory, and open a viewer with:
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1917
    "/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1918
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1919
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1920
readResourceFile:aFilename
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1921
    |lang|
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1922
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  1923
    lang := self requestLanguage.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1924
    lang isNil ifTrue:[^ self ].
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1925
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1926
    self readResourceFile:aFilename asLanguage:lang asSymbol
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1927
!
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  1928
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1929
readResourceFileForPackage:aPackage
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1930
    |allLanguages lang packageDir resourceDir langFile|
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1931
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1932
    packageDir := Smalltalk packageDirectoryForPackageId:aPackage.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1933
    resourceDir := packageDir asFilename construct:'resources'.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1934
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1935
    allLanguages := Set new.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1936
    resourceDir directoryContentsAsFilenamesDo:[:eachFile |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1937
	eachFile suffix = 'rs' ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1938
	    (('##.rs' match:eachFile baseName)
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1939
	    or:[('##-##.rs' match:eachFile baseName)]) ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1940
		allLanguages add:(eachFile withoutSuffix baseName)
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1941
	    ].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1942
	].
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1943
    ].
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1944
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1945
    allLanguages addAll:languagesList.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1946
    allLanguages := allLanguages asSortedCollection.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1947
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1948
    lang := Dialog
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1949
	choose:(resources string:'For which language ?')
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1950
	fromList:allLanguages
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1951
	values:allLanguages
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1952
	buttons:(resources array:#('All'))
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1953
	values:#(all)
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1954
	lines:10
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1955
	cancel:nil.
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1956
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1957
    lang isNil ifTrue:[^ self ].
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1958
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1959
    langFile := resourceDir construct:lang,'.rs'.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1960
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1961
    lang == #all ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1962
	allLanguages do:[:lang |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1963
	    self addLanguage:lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1964
	    self readResourceFile:(resourceDir construct:lang,'.rs') asLanguage:lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1965
	].
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1966
    ] ifFalse:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1967
	self readResourceFile:langFile asLanguage:lang asSymbol
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1968
    ].
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1969
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  1970
2050
fm
parents: 2049
diff changeset
  1971
removeLanguage
3246
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  1972
    |languagesToRemove|
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  1973
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  1974
    languagesToRemove := Dialog chooseMultiple:'Which language(s) do you want to remove?' fromList:languagesList lines:10.
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  1975
    languagesToRemove isEmptyOrNil ifTrue:[^ self ].
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  1976
    (Dialog confirm: 'Are you sure to remove the languages: ', languagesToRemove printString) ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1977
	  self languagesList removeAll:languagesToRemove.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  1978
	  self shownLanguages removeAll:languagesToRemove.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1979
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1980
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1981
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1982
removeTranslation
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1983
    |rowSelectionIndex selectedKey|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1984
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1985
    rowSelectionIndex := self selectedKeyRow value.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  1986
    rowSelectionIndex isNil ifTrue:[^self].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1987
    rowSelectionIndex ~~ 0 ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1988
	selectedKey := keyStringsToLanguageMappings keyAt:rowSelectionIndex ifAbsent:nil.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1989
	selectedKey isNil ifTrue:[^self].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1990
	(Dialog confirm:(resources string:'Really remove key %1' with:selectedKey)) ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1991
	    keyStringsToLanguageMappings removeKey:selectedKey.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  1992
	].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1993
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1994
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1995
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1996
runApplicationAndCollectTranslations
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  1997
    |applicationClass newTranslations pseudoPack app startSelector|
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1998
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1999
    monitoredApplication notNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2000
	monitoredApplication terminate.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2001
	[monitoredApplication notNil] whileTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2002
	    Delay waitForSeconds:0.1
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2003
	].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2004
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2005
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2006
    applicationClass := Dialog
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2007
		requestClass:'Application class to start and collect translations from:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2008
		okLabel:'OK'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2009
		initialAnswer:(lastExtractedApplicationClass ? LastExtractedApplicationClass ).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2010
    applicationClass isNil ifTrue:[^ self ].
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2011
    applicationClass isNameSpace ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2012
	Dialog warn:'Entered class is a NameSpace'.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2013
	^ self.
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2014
    ].
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2015
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2016
    applicationClass isVisualStartable ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2017
	startSelector := #open
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2018
    ] ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2019
	startSelector := Dialog
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2020
		    request:'Entered class seems to be no application class. Ok to start using selector:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2021
		    initialAnswer:((applicationClass respondsTo:#'start')
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2022
					ifTrue:#'start'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2023
					ifFalse:#'new')
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2024
		    okLabel:'START'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2025
		    title:'Start Application'.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2026
	startSelector isNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2027
	    ^ self
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2028
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2029
	startSelector := startSelector asSymbol.
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2030
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2031
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2032
    lastExtractedApplicationClass := LastExtractedApplicationClass := applicationClass.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2033
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2034
    newTranslations := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2035
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2036
    pseudoPack := AccessCollectingPseudoResourcePack new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2037
    pseudoPack realResourcePack:(applicationClass classResources).
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2038
    pseudoPack watchingTranslationEditor:self.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2039
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2040
    self stopApplicationIconVisibleHolder value:true.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2041
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2042
    monitoredApplication :=
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2043
	[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2044
	    [
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2045
		app := applicationClass new.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2046
		app resources:pseudoPack.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2047
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2048
		app perform:startSelector.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2049
		app window waitUntilVisible.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2050
		app window waitUntilClosed.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2051
	    ] ensure:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2052
		app closeRequest.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2053
		self stopApplicationIconVisibleHolder value:false.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2054
		monitoredApplication := nil.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2055
	    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2056
	] fork.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2057
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2058
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2059
searchStringInLastNameSpace
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2060
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2061
    |selectedKey browser lastSearchPatterns|
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2062
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2063
    selectedKey := self selectedKey.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2064
    selectedKey isNil ifTrue:[^Dialog information: 'No selected key'].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2065
    browser := NewSystemBrowser new "open".
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2066
    browser allButOpen.
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2067
    lastSearchPatterns := browser lastSearchPatterns.
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2068
    (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2069
	browser lastSearchPatterns addFirst: selectedKey
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2070
    ].
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2071
    SearchDialog lastStringSearchArea: #currentNameSpace.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2072
    lastNameSpace isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2073
	self changeLastNameSpace.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2074
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2075
    lastNameSpace notNil ifTrue:[
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2076
"/        browser navigationState selectedClasses value: lastNameSpace allClasses.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2077
	browser navigationState nameSpaceFilter value: (OrderedCollection with:lastNameSpace name).
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2078
	browser navigationState selectedNamespaces value: (OrderedCollection with:lastNameSpace name).
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2079
    ].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2080
    self withWaitCursorDo:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2081
	browser browseMenuMethodsWithString
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2082
    ].
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2083
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2084
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2085
searchStringInLastPackage
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2086
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2087
    | selectedKey browser lastSearchPatterns|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2088
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2089
    selectedKey := self selectedKey.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2090
    selectedKey isNil ifTrue:[^ Dialog information: 'No selected key'].
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2091
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2092
    browser := NewSystemBrowser new "open".
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2093
    browser allButOpen.
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2094
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2095
    lastSearchPatterns := browser lastSearchPatterns.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2096
    (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2097
	browser lastSearchPatterns addFirst: selectedKey
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2098
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2099
    SearchDialog lastStringSearchArea: #currentPackage.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2100
    lastPackage isNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2101
	self changeLastPackage.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2102
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2103
    lastPackage notNil ifTrue:[
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2104
"/        browser navigationState selectedClasses value: lastNameSpace allClasses.
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2105
	browser navigationState packageFilter value: (OrderedCollection with:lastPackage).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2106
	browser navigationState selectedProjects value: (OrderedCollection with:lastPackage).
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2107
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2108
    self withWaitCursorDo:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2109
	browser
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2110
	    askForMethodAndSpawnSearchTitle:'String to Search for in Sources:'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2111
	    browserLabel:'Methods containing "%1"'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2112
	    searchWith:#( #'findString:in:ignoreCase:match:' #'findString:inMethods:ignoreCase:match:' )
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2113
	    searchWhat:#string
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2114
	    searchArea:#currentPackage
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2115
	    withCaseIgnore:false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2116
	    withTextEntry:false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2117
	    withMatch:true
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2118
	    withMethodList:false
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2119
	    setSearchPattern:[:brwsr :string :ignoreCase :doMatch|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2120
				brwsr autoSearchPattern:string ignoreCase:ignoreCase.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2121
			     ]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2122
	    initialText:selectedKey "/ does not work: ('''*',selectedKey,'*''') check match!!
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2123
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2124
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2125
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2126
!InternationalLanguageTranslationEditor methodsFor:'menus dynamic'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2127
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2128
disableLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2129
    self shownLanguages remove:lang ifAbsent:[]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2130
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2131
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2132
enableLanguageDisplayFor:newLang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2133
    |shownLanguagesInOrder|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2134
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2135
    (self shownLanguages includes:newLang) ifFalse:[
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  2136
"/        shownLanguagesInOrder := self languagesList
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  2137
"/                                    select:[:lang | (self shownLanguages includes:lang)
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  2138
"/                                                    or:[ lang = newLang ]].
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  2139
"/        self shownLanguages contents:shownLanguagesInOrder.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2140
	self shownLanguages add:newLang.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2141
    ]
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2142
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2143
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2144
isLanguageShown:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2145
    ^ self shownLanguages includes:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2146
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2147
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2148
menuSliceTranslateGenerate
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2149
    | menu |
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2150
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2151
    menu := Menu new.
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2152
    keyStringsToLanguageMappings notNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2153
	keyStringsToLanguageMappings languages do:[:lang |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2154
	    menu addItem:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2155
		(MenuItem
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2156
		    label: (resources string: 'Generate Missing Translations - %1' with: lang asUppercase)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2157
		    itemValue: [ self generateMissingTranslationsFor: (Array with: lang) ])
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2158
	].
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2159
    ].
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2160
    ^ menu
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2161
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2162
    "Created: / 19-02-2015 / 12:44:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2163
!
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2164
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2165
shownLanguagesMenu
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2166
    <resource: #programMenu >
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2167
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2168
    ^ [
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2169
	|m selected|
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2170
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2171
	m := Menu new.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2172
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2173
	self languagesList do:[:lang |
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2174
	    |item|
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2175
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2176
	    item := MenuItem label:lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2177
	    item indication:(self languageShownHolderFor:lang).
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2178
	    item hideMenuOnActivated:false.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2179
	    m addItem:item.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2180
	].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2181
	m
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2182
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2183
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2184
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2185
toggleLanguageDisplayFor:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2186
    (self shownLanguages includes:lang) ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2187
	self disableLanguageDisplayFor:lang
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2188
    ] ifFalse:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2189
	self enableLanguageDisplayFor:lang
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2190
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2191
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2192
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2193
!InternationalLanguageTranslationEditor methodsFor:'private-key extraction'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2194
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2195
addAllTranslations:newTranslations
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2196
    "merge found xlations into the list of already present xlations"
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2197
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  2198
    |newTranslationKeys stringKeys nonStringKeys|
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2199
3245
ff9a2e01e0a5 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3189
diff changeset
  2200
    newTranslationKeys := newTranslations select:[:k | k notEmptyOrNil and:[k isString not or:[k isBlank not]]].
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2201
    newTranslationKeys := newTranslationKeys select:[:k | (keyStringsToLanguageMappings includesKey:k) not].
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2202
    "/ follow the common-xlations algrithm of ResourcePack
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2203
    "/ (which knows how to xlate strings with additional special chars.)
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2204
    newTranslationKeys :=
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2205
	newTranslationKeys collect:[:oldKey |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2206
	    |newKey methods|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2207
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2208
	    (oldKey endsWith:' ...') ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2209
		newKey := oldKey copyButLast:4.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2210
	    ] ifFalse:[ (oldKey endsWith:'...') ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2211
		newKey := oldKey copyButLast:3.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2212
	    ] ifFalse:[ ('\.:?=,!! ' includes:oldKey last) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2213
		newKey := oldKey copyButLast:1.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2214
	    ] ifFalse:[ ((oldKey first == $() and:[ oldKey last == $) ]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2215
		newKey := oldKey copyFrom:2 to:oldKey size - 1
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2216
	    ] ifFalse:[ ((oldKey first == $[) and:[ oldKey last == $] ]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2217
		newKey := oldKey copyFrom:2 to:oldKey size - 1
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2218
	    ] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2219
		newKey :=oldKey
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2220
	    ]]]]].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2221
	    "/ must attach oldKey-methods to newKey
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2222
	    methods := methodsUsingKey at:oldKey ifAbsent:nil.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2223
	    methods notNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2224
		(methodsUsingKey at:newKey ifAbsentPut:[Set new]) addAll:methods
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2225
	    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2226
	    newKey
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2227
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2228
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  2229
    newTranslationKeys := newTranslationKeys asSet.
3246
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  2230
    newTranslationKeys := newTranslationKeys select:[:k | (keyStringsToLanguageMappings includesKey:k) not].
2034
23d558e4d32e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2033
diff changeset
  2231
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2232
    newTranslationKeys notEmpty ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2233
	stringKeys := newTranslationKeys select:[:k | k isString].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2234
	nonStringKeys := newTranslationKeys select:[:k | k isString not].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2235
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2236
	stringKeys := stringKeys asSortedCollection.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2237
	keyStringsToLanguageMappings addKeys:stringKeys.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2238
	keyStringsToLanguageMappings addKeys:nonStringKeys.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2239
	modified := true.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2240
    ].
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2241
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2242
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2243
extractTranslationsFromClass:aClass
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2244
    |newTranslations|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2245
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2246
    newTranslations := Set new.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2247
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2248
    self withWaitCursorDo:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2249
	"/ now, the hard part:
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2250
	"/ possible translations are in the specs,
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2251
	"/ and all arguments to (resources string:) messages.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2252
	aClass instAndClassMethodsDo:[:eachMethod |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2253
	    newTranslations addAll:( self extractTranslationsFromMethod:eachMethod ).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2254
	].
3248
Stefan Vogel <sv@exept.de>
parents: 3246
diff changeset
  2255
    ].
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2256
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2257
    newTranslations :=
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2258
	newTranslations select:[:eachTranslation|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2259
	    (aClass resources at:eachTranslation ifAbsent:nil) isNil
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2260
	].
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2261
    ^ newTranslations
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2262
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  2263
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2264
extractTranslationsFromHelpSpecMethod:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2265
    "return strings which need translation from a help-spec method"
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2266
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2267
    |codeStrings matcher parseTree resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2268
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2269
    parseTree := RBParser
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2270
	    parseMethod:aMethod source
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2271
	    onError: [:str :pos | Transcript showCR:str. Transcript showCR:pos.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2272
				  nil].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2273
    parseTree isNil ifTrue:[^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2274
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2275
    codeStrings  :=
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2276
	#(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2277
		'`@dict addPairsFrom: `#helpKeysAndStrings'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2278
		'^ `#lit'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2279
	).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2280
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2281
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2282
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2283
    matcher := ParseTreeSearcher new.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2284
    matcher
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2285
	matchesAnyOf: codeStrings
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2286
	do: [:aNode :answer |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2287
		|sel argNode arg|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2288
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2289
		aNode isReturn ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2290
		    "/ a ^ #(...)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2291
		    aNode value isLiteralArray ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2292
			aNode value value pairWiseDo:[:helpKey :helpString |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2293
			    self rememberMethod:aMethod usingKey:helpString.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2294
			    resourceKeys add:helpString.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2295
			].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2296
		    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2297
		] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2298
		    sel := aNode selector.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2299
		    (sel startsWith:'addPairsFrom:') ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2300
			argNode := aNode arguments at:1.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2301
			argNode isLiteralArray ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2302
			    arg := argNode value.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2303
			    arg doWithIndex:[:el :index |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2304
				index even ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2305
				    el isString ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2306
					self rememberMethod:aMethod usingKey:el.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2307
					resourceKeys add:el.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2308
				    ]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2309
				].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2310
			    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2311
			] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2312
			    Transcript halt
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2313
				showCR:(resources
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2314
					    string:'Cannot derive resourceKey from non-literal array: %1 in %2'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2315
					    with:argNode formattedCode
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2316
					    with:aMethod selector).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2317
			].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2318
		    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2319
		].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2320
		aNode
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2321
	    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2322
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2323
    matcher executeTree: parseTree initialAnswer: nil.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2324
    ^ resourceKeys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2325
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2326
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2327
extractTranslationsFromMenuSpecMethod:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2328
    "return strings which need translation from a menu-spec method"
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2329
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2330
    |menu resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2331
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2332
    menu := aMethod mclass theNonMetaclass perform:aMethod selector.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2333
    menu isNil ifTrue:[ ^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2334
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2335
    (menu isKindOf:Menu) ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2336
	menu := Menu new fromLiteralArrayEncoding:menu
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2337
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2338
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2339
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2340
    menu allItemsDo:[:aMenuItem |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2341
	aMenuItem translateLabel ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2342
	    (aMenuItem isSeparatorItem or:[aMenuItem isMenuSlice])  ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2343
		self rememberMethod:aMethod usingKey:aMenuItem label.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2344
		resourceKeys add:aMenuItem label.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2345
	    ]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2346
	]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2347
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2348
    ^ resourceKeys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2349
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2350
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2351
extractTranslationsFromMethod:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2352
    "return strings which need translation from a method."
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2353
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2354
    |mResources|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2355
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2356
    mResources := aMethod resources.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2357
    mResources notNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2358
	(mResources includesKey:#menu) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2359
	     ^ self extractTranslationsFromMenuSpecMethod:aMethod.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2360
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2361
	(mResources includesKey:#canvas) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2362
	     ^ self extractTranslationsFromUISpecMethod:aMethod.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2363
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2364
	(mResources includesKey:#help) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2365
	     ^ self extractTranslationsFromHelpSpecMethod:aMethod.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2366
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2367
	(mResources includesKey:#tableColumns) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2368
	     ^ self extractTranslationsFromTableColumnsSpecMethod:aMethod.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2369
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2370
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2371
	^ self extractTranslationsFromSpecMethod:aMethod.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2372
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2373
    ^ self extractTranslationsFromMethodsCode:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2374
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2375
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2376
extractTranslationsFromMethodsCode:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2377
    "return strings which need translation from a normal method.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2378
     detects messages to the resource translation mechanism"
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2379
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2380
    |codeStrings matcher parseTree resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2381
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2382
    parseTree := RBParser
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2383
	    parseMethod:aMethod source
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2384
	    onError: [:str :pos | Transcript showCR:str. Transcript showCR:pos.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2385
				  nil].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2386
    parseTree isNil ifTrue:[^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2387
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2388
    codeStrings  :=
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2389
	#(
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2390
		'resources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2391
		'self resources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2392
		'self class resources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2393
		'self class classResources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2394
		'self classResources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2395
		'`V classResources `@msg: `@args'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2396
	).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2397
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2398
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2399
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2400
    matcher := ParseTreeSearcher new.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2401
    matcher
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2402
	matchesAnyOf: codeStrings
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2403
	do: [:aNode :answer |
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2404
		|sel keyStringArgNode keyStringArg|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2405
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2406
		sel := aNode selector.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2407
		((sel startsWith:'string:') or:[(sel startsWith:'at:') or:[sel startsWith:'stringWithCRs:']]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2408
		    keyStringArgNode := aNode arguments at:1.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2409
		    (keyStringArg := self literalStringOrStringConcatenation:keyStringArgNode) notNil ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2410
			self rememberMethod:aMethod usingKey:keyStringArg.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2411
			resourceKeys add:keyStringArg.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2412
		    ] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2413
			Transcript
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2414
			    showCR:(resources
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2415
				    string:'[LanguageTranslator] warning: Cannot derive resourceKey from non-string: %1 in %2'
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2416
				    with:keyStringArgNode formattedCode
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2417
				    with:aMethod whoString).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2418
		    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2419
		].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2420
		aNode
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2421
	    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2422
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2423
    matcher executeTree: parseTree initialAnswer: nil.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2424
    ^ resourceKeys
3189
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2425
4f828e688bf5 Support to automatically generate translations (for testing only)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3187
diff changeset
  2426
    "Modified: / 19-02-2015 / 11:42:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2427
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2428
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2429
extractTranslationsFromSpecMethod:aMethod
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2430
    ^ #()
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2431
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2432
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2433
extractTranslationsFromTableColumnsSpecMethod:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2434
    "return strings which need translation from a table-spec method"
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2435
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2436
    |columnDescription resourceKeys|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2437
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2438
    columnDescription := aMethod mclass theNonMetaclass perform:aMethod selector.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2439
    columnDescription isNil ifTrue:[ ^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2440
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2441
    (columnDescription first isKindOf:DataSetColumnSpec) ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2442
	columnDescription := columnDescription collect:[:el | DataSetColumnSpec new fromLiteralArrayEncoding:el].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2443
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2444
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2445
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2446
    columnDescription do:[:aColumnSpec |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2447
	aColumnSpec translateLabel ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2448
	    self rememberMethod:aMethod usingKey:aColumnSpec label.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2449
	    resourceKeys add:aColumnSpec label.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2450
	]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2451
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2452
    ^ resourceKeys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2453
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2454
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2455
extractTranslationsFromUISpecMethod:aMethod
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2456
    "return strings which need translation from a UI-spec method"
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2457
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2458
    |spec resourceKeys visitor|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2459
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2460
    spec := aMethod mclass theNonMetaclass perform:aMethod selector.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2461
    spec isNil ifTrue:[ ^ #() ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2462
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2463
    (spec isKindOf:UISpecification) ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2464
	spec := UISpecification from:spec
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2465
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2466
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2467
    resourceKeys := Set new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2468
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2469
    visitor := UISpecVisitor new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2470
    spec acceptVisitor:visitor.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2471
    visitor translatedLabels do:[:each |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2472
	self rememberMethod:aMethod usingKey:each.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2473
    ].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2474
    ^ visitor translatedLabels
3284
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2475
!
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2476
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2477
literalStringOrStringConcatenation:aParseNode
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2478
    "nil if not a literal or a string concatenation"
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2479
3284
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2480
    aParseNode isLiteralString ifTrue:[^ aParseNode value].
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2481
    (aParseNode isMessage and:[aParseNode selector == #,]) ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2482
	|leftString rightString|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2483
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2484
	aParseNode receiver isLiteralString ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2485
	    leftString := aParseNode receiver value
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2486
	] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2487
	    leftString := self literalStringOrStringConcatenation:aParseNode receiver.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2488
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2489
	aParseNode arguments first isLiteralString ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2490
	    rightString := aParseNode arguments first value
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2491
	] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2492
	    rightString := self literalStringOrStringConcatenation:aParseNode arguments first.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2493
	].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2494
	(leftString notNil and:[rightString notNil]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2495
	    ^ leftString , rightString
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2496
	].
3284
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2497
    ].
4de194c0ee74 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3283
diff changeset
  2498
    ^ nil
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2499
!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2500
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2501
recordNewTranslation:aString
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2502
    "called from recorder, when the monitored application does a translation"
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2503
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2504
    self addAllTranslations:{ aString }
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2505
!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2506
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2507
rememberMethod:aMethod usingKey:aKey
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  2508
    (methodsUsingKey at:aKey ifAbsentPut:[Set new]) add:aMethod
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2509
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2510
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2511
!InternationalLanguageTranslationEditor methodsFor:'queries'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2512
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2513
autoAccept
2050
fm
parents: 2049
diff changeset
  2514
fm
parents: 2049
diff changeset
  2515
    ^ self autoAcceptHolder value
fm
parents: 2049
diff changeset
  2516
!
fm
parents: 2049
diff changeset
  2517
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2518
currentExampleLanguageText
2050
fm
parents: 2049
diff changeset
  2519
   "Returns the language text corresponding for the current selected key and the example language selection"
fm
parents: 2049
diff changeset
  2520
fm
parents: 2049
diff changeset
  2521
  ^self languageTextFromSelectedKeyFor: self exampleLanguageSelectionHolder value
fm
parents: 2049
diff changeset
  2522
!
fm
parents: 2049
diff changeset
  2523
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2524
currentLanguage
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2525
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2526
    |colSelectionIndex |
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2527
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2528
    colSelectionIndex := dataSetView selectedColIndex.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2529
    ^colSelectionIndex > 1 ifTrue:[ shownLanguages at:colSelectionIndex-1 ] ifFalse:nil.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2530
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2531
2050
fm
parents: 2049
diff changeset
  2532
exampleLanguageByDefault
fm
parents: 2049
diff changeset
  2533
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2534
    ^self shownLanguages isEmpty
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2535
	ifTrue:[nil]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2536
	ifFalse:[self shownLanguages first]
2050
fm
parents: 2049
diff changeset
  2537
!
fm
parents: 2049
diff changeset
  2538
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2539
hasFirstRowSelection
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2540
    self selectedKeyRow isNil ifTrue:[^false].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2541
    ^ self selectedKeyRow value > 1
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2542
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2543
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2544
hasLanguageSelection
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2545
    dataSetView selectedColIndex isNil ifTrue:[^false].
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2546
    ^ dataSetView selectedColIndex > 1
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2547
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2548
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2549
hasUnsavedChanges
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2550
    ^ modified
2050
fm
parents: 2049
diff changeset
  2551
!
fm
parents: 2049
diff changeset
  2552
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2553
includesKey: aKey
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2554
    keyStringsToLanguageMappings isNil ifTrue:[^false].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2555
    ^keyStringsToLanguageMappings includesKey:aKey
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2556
!
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2557
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2558
isSearchForSimilarTranslationEnabled
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2559
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2560
    ^self searchForSimilarTranslationEnableHolder value
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2561
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2562
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2563
languageTextFromKey: aKeyIndex for: language
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2564
    "Returns the language text corresponding for the aKeyIndex and the received language"
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2565
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2566
    language isNil ifTrue:[^''].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2567
    ^keyStringsToLanguageMappings at: aKeyIndex language:language.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2568
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2569
2050
fm
parents: 2049
diff changeset
  2570
languageTextFromSelectedKeyFor: language
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2571
    "Returns the language text corresponding for the current selected key and the received language"
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2572
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2573
    ^self languageTextFromKey: self selectedKey for: language
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2574
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2575
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2576
shouldCopyPreviousTranslationButtonBeEnabled
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2577
    ^ self hasLanguageSelection
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2578
	and:[self hasFirstRowSelection]
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2579
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2580
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2581
shouldPasteOriginalButtonBeEnabled
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2582
    ^ self hasLanguageSelection
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2583
	and:[self hasFirstRowSelection]
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2584
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  2585
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2586
shouldSearchForSimilarTranslation
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  2587
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2588
    self isSearchForSimilarTranslationEnabled ifFalse:[^false].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2589
    (self languageTextHolder value notNil and:[self languageTextHolder value notEmpty]) ifTrue:[^false].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2590
    (self hasLanguageSelection and:[self selectedKeyRow notNil]) ifFalse:[^false].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2591
    ^true
2050
fm
parents: 2049
diff changeset
  2592
! !
fm
parents: 2049
diff changeset
  2593
fm
parents: 2049
diff changeset
  2594
!InternationalLanguageTranslationEditor methodsFor:'read/write resourceFile'!
fm
parents: 2049
diff changeset
  2595
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2596
encoderAt: lang
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2597
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2598
    self alwaysWriteUTF8Holder value ifTrue:[^CharacterEncoder encoderForUTF8].
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2599
    ^keyStringsToLanguageMappings encoderAt: lang.
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2600
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2601
2050
fm
parents: 2049
diff changeset
  2602
printEditingWarningOn: aStream
fm
parents: 2049
diff changeset
  2603
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2604
    aStream nextPutAll: ';';
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2605
	    cr;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2606
	    nextPutAll: '; WARNING:';
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2607
	    cr;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2608
	    nextPutAll: '; this file contains national characters.';
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2609
	    cr;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2610
	    nextPutAll: '; DO NOT EDIT this file with an old vi!!';
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2611
	    cr;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2612
	    nextPutAll: ';';
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2613
	    cr;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2614
	    cr.
2050
fm
parents: 2049
diff changeset
  2615
!
fm
parents: 2049
diff changeset
  2616
fm
parents: 2049
diff changeset
  2617
printEncoderFor: lang on: aStream
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2618
    |characterEncoder encoderString|
2050
fm
parents: 2049
diff changeset
  2619
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2620
    characterEncoder := self encoderAt: lang.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2621
    encoderString := characterEncoder isNil
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2622
	ifTrue:[self requestEncoderStringFor: lang]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2623
	ifFalse:[characterEncoder nameOfEncoding printString].
2050
fm
parents: 2049
diff changeset
  2624
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2625
    aStream nextPutAll: '#encoding';
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2626
	    space;
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2627
	    nextPutAll: encoderString;
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2628
	    cr;
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2629
	    cr.
2050
fm
parents: 2049
diff changeset
  2630
!
fm
parents: 2049
diff changeset
  2631
fm
parents: 2049
diff changeset
  2632
printLanguage: lang on: aStream
fm
parents: 2049
diff changeset
  2633
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2634
    self printEncoderFor: lang on: aStream.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2635
    self printEditingWarningOn: aStream.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2636
    self printLanguageMappingsFor: lang on: aStream.
2050
fm
parents: 2049
diff changeset
  2637
!
fm
parents: 2049
diff changeset
  2638
fm
parents: 2049
diff changeset
  2639
printLanguageMappingsFor: lang on: aStream
fm
parents: 2049
diff changeset
  2640
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2641
    |orderedAssociations maxKeySize characterEncoder|
2050
fm
parents: 2049
diff changeset
  2642
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2643
    characterEncoder := self encoderAt: lang.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2644
    characterEncoder isNil ifTrue:[ characterEncoder := CharacterEncoder::NullEncoder ].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2645
    orderedAssociations := keyStringsToLanguageMappings orderedLanguageMappingsAssociationsFor: lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2646
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2647
    maxKeySize := keyStringsToLanguageMappings maxKeySizeForLanguage: lang.
2050
fm
parents: 2049
diff changeset
  2648
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2649
    orderedAssociations do:[:association |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2650
	"use #basicStoreString to avoid implicit utf8Encoding for UnicodeStrings"
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2651
	aStream nextPutAll: ((characterEncoder encodeString:association key basicStoreString) paddedTo: maxKeySize) ;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2652
	    tab;
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2653
	    nextPutAll: (characterEncoder encodeString: association value basicStoreString);
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2654
	    cr.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2655
	].
2050
fm
parents: 2049
diff changeset
  2656
!
fm
parents: 2049
diff changeset
  2657
fm
parents: 2049
diff changeset
  2658
readResourceFile:aFilename asLanguage:lang
fm
parents: 2049
diff changeset
  2659
    |resourcePack inStream lineString encoding decoder sortedKeys remainingKeys|
fm
parents: 2049
diff changeset
  2660
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  2661
    aFilename exists ifFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2662
	Dialog information:(resources string:'Language file: "%1" does not exist' with:aFilename baseName).
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2663
	^ self
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  2664
    ].
2050
fm
parents: 2049
diff changeset
  2665
fm
parents: 2049
diff changeset
  2666
    resourcePack := ResourcePack new.
fm
parents: 2049
diff changeset
  2667
fm
parents: 2049
diff changeset
  2668
    inStream := aFilename readStream.
fm
parents: 2049
diff changeset
  2669
    [inStream atEnd] whileFalse:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2670
	lineString := inStream nextLine.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2671
	(lineString notEmpty
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2672
	and:[ (lineString startsWith:';') not and:[ (lineString startsWith:'"/') not]]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2673
	    ((lineString startsWith:'#') and:[(lineString startsWith:'#(') not]) ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2674
		lineString := (lineString copyFrom:2) withoutSeparators.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2675
		(lineString startsWith:'encoding ') ifTrue:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2676
		    encoding := ResourcePack extractEncodingFromLine:lineString.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2677
		    decoder := CharacterEncoder encoderFor:encoding ifAbsent:nil.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2678
		].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2679
	    ] ifFalse:[
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2680
		ResourcePack
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2681
		    processResourceLine:lineString
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2682
		    encoding:decoder
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2683
		    file:aFilename pathName
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2684
		    printErrorWith:[:msg | Transcript showCR:msg ]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2685
		    for:resourcePack
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2686
		    keepUselessTranslations:true.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2687
	    ].
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2688
	].
2050
fm
parents: 2049
diff changeset
  2689
    ].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2690
    inStream close.
2050
fm
parents: 2049
diff changeset
  2691
fm
parents: 2049
diff changeset
  2692
    sortedKeys := (resourcePack keys select:[:k | k isString]) asSortedCollection.
fm
parents: 2049
diff changeset
  2693
    remainingKeys := resourcePack keys select:[:k | k isString not].
fm
parents: 2049
diff changeset
  2694
fm
parents: 2049
diff changeset
  2695
    keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  2696
    keyStringsToLanguageMappings atLanguage: lang putEncoder: decoder.
2050
fm
parents: 2049
diff changeset
  2697
fm
parents: 2049
diff changeset
  2698
    sortedKeys do:[:k |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2699
	keyStringsToLanguageMappings at:k language:lang put:(resourcePack at:k) sendChange:false
2050
fm
parents: 2049
diff changeset
  2700
    ].
fm
parents: 2049
diff changeset
  2701
    remainingKeys do:[:k |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  2702
	keyStringsToLanguageMappings at:k language:lang put:(resourcePack at:k) sendChange:false
2050
fm
parents: 2049
diff changeset
  2703
    ].
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  2704
    keyStringsToLanguageMappings changed.
2050
fm
parents: 2049
diff changeset
  2705
!
fm
parents: 2049
diff changeset
  2706
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2707
saveLanguage: lang
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2708
"Saves the language in the fileName from where the language resource was obtained."
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2709
    |aFilename|
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2710
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2711
    lang isNil ifTrue:[^ self].
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2712
    aFilename := keyStringsToLanguageMappings filenameAt:lang.
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2713
    aFilename isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2714
	aFilename := self requestFilenameFor: lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2715
	aFilename isNil ifTrue:[^ self].
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2716
    ].
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2717
    self saveResourceFile:aFilename for:lang asSymbol
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2718
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  2719
2050
fm
parents: 2049
diff changeset
  2720
saveResourceFile: aFilename for: lang
fm
parents: 2049
diff changeset
  2721
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2722
    |aStream |
2050
fm
parents: 2049
diff changeset
  2723
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2724
    keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2725
    aStream := FileStream newFileNamed: aFilename.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2726
    self printLanguage: lang on: aStream.
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2727
    aStream flush;
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2728
	    close.
2163
641467b2f522 Search String
fm
parents: 2053
diff changeset
  2729
    DialogBox information: 'The resource file for the language ', lang printString storeString, ' was saved in the file: ', aFilename nameString
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2730
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2731
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2732
!InternationalLanguageTranslationEditor methodsFor:'searching'!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2733
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2734
ignoreCaseHolderChanged
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2735
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2736
    self searchNextTextIncludingCurrentSelection: true.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2737
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2738
    "Created: / 16-06-2007 / 09:33:33 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2739
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2740
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2741
searchNextText
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2742
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2743
    self searchNextTextIncludingCurrentSelection: false.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2744
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2745
    "Modified: / 16-06-2007 / 09:21:14 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2746
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2747
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2748
searchNextTextFromBeginning
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2749
    |searchText rowFoundIndex|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2750
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2751
    searchText := searchTextView contents.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2752
    searchText isEmptyOrNil ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2753
    self objectsList isEmpty ifTrue:[^self].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2754
    rowFoundIndex := self tableView findFirstRowWithString: searchText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2755
		from:1
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2756
		to:self objectsList size
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2757
		ignoreCase:self ignoreCaseHolder value.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2758
    rowFoundIndex isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2759
	self searchTextNotFound.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2760
	^self
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2761
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2762
    self selectListIndex: rowFoundIndex
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2763
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2764
    "Created: / 16-06-2007 / 10:54:51 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2765
    "Modified: / 19-06-2007 / 15:38:59 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2766
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2767
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2768
searchNextTextIncludingCurrentSelection: includeCurrentSelection
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2769
    |searchText currentSelectionIndex rowFoundIndex fromIndex listSize|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2770
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2771
    self searchTextStarted.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2772
    searchText := searchTextView contents.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2773
    searchText isEmptyOrNil ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2774
    self objectsList isEmpty ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2775
    currentSelectionIndex := self currentSelectionIndex.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2776
    (currentSelectionIndex isNil or:[currentSelectionIndex == 0]) ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2777
	self searchNextTextFromBeginning.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2778
	^self.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2779
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2780
    listSize := self objectsList size.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2781
    (currentSelectionIndex == listSize and:[includeCurrentSelection not]) ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2782
	self searchNextTextReachEnd.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2783
	^self.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2784
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2785
    fromIndex := includeCurrentSelection
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2786
	ifTrue:[currentSelectionIndex]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2787
	ifFalse:[currentSelectionIndex + 1].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2788
    rowFoundIndex := self tableView findFirstRowWithString: searchText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2789
		from:fromIndex
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2790
		to:listSize
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2791
		ignoreCase:self ignoreCaseHolder value.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2792
    rowFoundIndex isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2793
	self searchNextTextReachEnd.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2794
	^self
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2795
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2796
    self selectListIndex: rowFoundIndex
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2797
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2798
    "Created: / 16-06-2007 / 09:20:57 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2799
    "Modified: / 19-06-2007 / 15:38:06 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2800
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2801
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2802
searchNextTextReachEnd
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2803
    |message|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2804
    message := 'End of list reached, starting from the beginning'.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2805
    self searchTextRestarted: message.
2330
58ace5744c59 *** empty log message ***
fm
parents: 2329
diff changeset
  2806
    Smalltalk beep.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2807
    self searchNextTextFromBeginning.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2808
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2809
    "Created: / 16-06-2007 / 11:00:59 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2810
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2811
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2812
searchPreviousText
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2813
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2814
    |searchText currentSelectionIndex rowFoundIndex fromIndex|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2815
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2816
    self searchTextStarted.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2817
    searchText := searchTextView contents.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2818
    searchText isEmptyOrNil ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2819
    self objectsList isEmpty ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2820
    currentSelectionIndex := self currentSelectionIndex.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2821
    currentSelectionIndex == 1 ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2822
	self searchPreviousTextReachBeginning.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2823
	^self.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2824
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2825
    (currentSelectionIndex isNil or:[currentSelectionIndex == 0])
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2826
	ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2827
	    self searchPreviousTextFromEnd.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2828
	    ^self.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2829
	]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2830
	ifFalse:[fromIndex := currentSelectionIndex - 1].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2831
    rowFoundIndex := self tableView findFirstRowWithString: searchText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2832
		from: fromIndex
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2833
		to: 1
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2834
		by: -1
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2835
		ignoreCase:self ignoreCaseHolder value.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2836
    rowFoundIndex isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2837
	self searchPreviousTextReachBeginning.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2838
	^self
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2839
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2840
    self selectListIndex: rowFoundIndex.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2841
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2842
    "Modified: / 19-06-2007 / 15:38:16 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2843
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2844
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2845
searchPreviousTextFromEnd
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2846
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2847
    |searchText rowFoundIndex|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2848
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2849
    searchText := searchTextView contents.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2850
    searchText isEmptyOrNil ifTrue:[^self].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2851
    self objectsList isEmpty ifTrue:[^self].
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2852
    rowFoundIndex := self tableView findFirstRowWithString: searchText
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2853
		from: self objectsList size
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2854
		to: 1
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2855
		by: -1
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2856
		ignoreCase:self ignoreCaseHolder value.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2857
    rowFoundIndex isNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2858
	self searchTextNotFound.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2859
	^self
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2860
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2861
    self selectListIndex: rowFoundIndex.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2862
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2863
    "Created: / 16-06-2007 / 10:55:43 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2864
    "Modified: / 19-06-2007 / 15:38:26 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2865
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2866
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2867
searchPreviousTextReachBeginning
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2868
    |message|
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2869
    message := 'Beginning of list reached, starting from the end'.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2870
    self searchTextRestarted: message.
2330
58ace5744c59 *** empty log message ***
fm
parents: 2329
diff changeset
  2871
    Smalltalk beep.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2872
    self searchPreviousTextFromEnd.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2873
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2874
    "Created: / 16-06-2007 / 11:01:23 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2875
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2876
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2877
searchTextModifiedHolderChanged
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2878
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2879
    self searchNextTextIncludingCurrentSelection: true.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2880
    self searchTextModifiedHolder setValue: false.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2881
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2882
"/Transcript showCR: 'searchTextModifiedHolderChanged: ',(self searchTextHolder value ? '').
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2883
"/Transcript showCR: 'searchTextView contents: ',(searchTextView contents ? '').
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2884
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2885
    "Created: / 15-06-2007 / 18:07:57 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2886
    "Modified: / 16-06-2007 / 09:21:27 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2887
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2888
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2889
searchTextNotFound
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2890
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2891
    self selectListIndex: 0.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2892
    self searchBarImageInfoLabelHolder value: self warningSearchBarIcon.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2893
    self searchBarInfoLabelHolder value: 'Text not found'.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2894
    self setSearchTextNotFoundColors.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2895
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2896
    "Created: / 16-06-2007 / 06:51:01 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2897
    "Modified: / 16-06-2007 / 11:43:53 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2898
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2899
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2900
searchTextRestarted: message
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2901
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2902
    self searchBarImageInfoLabelHolder value: self restartSearchBarIcon.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2903
    self searchBarInfoLabelHolder value: message.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2904
"/    self setSearchTextNotFoundColors.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2905
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2906
    "Created: / 16-06-2007 / 11:02:06 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2907
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2908
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2909
searchTextStarted
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2910
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2911
    self searchBarImageInfoLabelHolder value: nil.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2912
    self searchBarInfoLabelHolder value: ''.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2913
    self setSearchTextFoundColors.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2914
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2915
    "Created: / 16-06-2007 / 06:54:03 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2916
    "Modified: / 16-06-2007 / 10:07:06 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2917
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2918
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2919
setSearchTextFoundColors
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2920
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2921
    searchTextView foregroundColor: Color black.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2922
    searchTextView backgroundColor: Color white.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2923
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2924
    "Created: / 16-06-2007 / 06:28:32 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2925
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2926
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2927
setSearchTextNotFoundColors
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2928
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2929
    searchTextView foregroundColor: Color white.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2930
    searchTextView backgroundColor: Color lightRed.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2931
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2932
    "Created: / 16-06-2007 / 06:29:00 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2933
! !
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2934
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2935
!InternationalLanguageTranslationEditor methodsFor:'specs-dynamic'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2936
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2937
columnInRow:row at:colIndex
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2938
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2939
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2940
    lang := self languageAtCol:colIndex.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2941
    ^ row atLanguage:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2942
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2943
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2944
getBackgroundForRow:row rowNr:rowNr col:colIndex
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2945
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2946
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2947
    colIndex == 1 ifTrue:[^ nil].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2948
    lang := self languageAtCol:colIndex.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2949
    ^ (row atLanguage:lang) isNil ifTrue:[Color red lightened] ifFalse:nil
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2950
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2951
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2952
keyStringAndLanguageSelectionTableColumnDescription
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2953
    |spec|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2954
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2955
    spec := OrderedCollection new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2956
2047
5f9b26862c57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2035
diff changeset
  2957
    spec add:(self class keyTableColumn first).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2958
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2959
    self shownLanguages do:[:lang |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2960
	|entry|
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2961
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2962
	entry := self class languageTableColumn first.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2963
	entry := entry copy replaceAll:#lang with:lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2964
	spec add: entry
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2965
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2966
    ^ spec
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2967
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2968
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2969
keyStringInRow:row
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2970
    ^ row keyString
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2971
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2972
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2973
!InternationalLanguageTranslationEditor methodsFor:'update'!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2974
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2975
updateToolVisibility
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2976
    | bottomOffset searchBarVisible |
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2977
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2978
    bottomOffset := 0.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2979
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2980
    searchBarVisible := self searchBoxVisible value.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2981
    searchBarVisible ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2982
	bottomOffset := bottomOffset - searchBoxView height.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2983
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2984
    translationsPanel layout bottomOffset:bottomOffset-1.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2985
    translationsPanel container notNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  2986
	translationsPanel containerChangedSize.
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2987
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2988
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2989
    "Created: / 16-06-2007 / 11:58:25 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2990
! !
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2991
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2992
!InternationalLanguageTranslationEditor methodsFor:'user actions'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2993
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2994
closeSearchBar
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2995
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2996
    self searchBoxVisible value: false.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2997
    self updateToolVisibility.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2998
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  2999
    "Created: / 15-06-2007 / 18:03:05 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3000
    "Modified: / 16-06-2007 / 11:58:52 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3001
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3002
2050
fm
parents: 2049
diff changeset
  3003
exampleLanguageSelectionChanged
fm
parents: 2049
diff changeset
  3004
fm
parents: 2049
diff changeset
  3005
   self updateExampleLanguageText.
fm
parents: 2049
diff changeset
  3006
!
fm
parents: 2049
diff changeset
  3007
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3008
languageTextAccepted
2416
98dbabd36558 changed #languageTextAccepted
Claus Gittinger <cg@exept.de>
parents: 2413
diff changeset
  3009
    |nextRowIndex selRow|
98dbabd36558 changed #languageTextAccepted
Claus Gittinger <cg@exept.de>
parents: 2413
diff changeset
  3010
98dbabd36558 changed #languageTextAccepted
Claus Gittinger <cg@exept.de>
parents: 2413
diff changeset
  3011
    selRow := self selectedKeyRow value.
98dbabd36558 changed #languageTextAccepted
Claus Gittinger <cg@exept.de>
parents: 2413
diff changeset
  3012
    selRow notNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3013
	keyStringsToLanguageMappings size = selRow
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3014
	    ifTrue:[ self updateLanguageTextModification.]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3015
	    ifFalse:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3016
		nextRowIndex := selRow + 1.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3017
		self selectedKeyRow value: nextRowIndex]
2416
98dbabd36558 changed #languageTextAccepted
Claus Gittinger <cg@exept.de>
parents: 2413
diff changeset
  3018
    ].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3019
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3020
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3021
pasteOriginalInLanguageText
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3022
    <resource: #uiCallback>
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3023
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3024
    | originalText|
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3025
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3026
    originalText := self selectedKey.
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3027
    languageEditor selectAll.
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3028
    languageEditor pasteOrReplace:originalText.
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3029
    self languageTextModifiedHolder value:true.
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3030
!
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3031
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3032
pastePreviousTranslationInLanguageText
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3033
    "Obtain the text from the previous translation and paste it into the languageTextEditor"
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3034
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3035
    | previousLanguageText previousLanguageRow|
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3036
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3037
    previousLanguageRow := dataSetView at:self selectedKeyRow value - 1
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3038
		ifAbsent:[^self].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3039
    previousLanguageText := previousLanguageRow atLanguage: self currentLanguage.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3040
    languageEditor selectAll.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3041
    languageEditor pasteOrReplace:previousLanguageText.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3042
    self languageTextModifiedHolder value:true.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3043
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3044
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3045
search
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3046
    "make the searchbox visible"
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3047
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3048
    self searchBoxVisible value: true.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3049
    self updateToolVisibility.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3050
    searchTextView takeFocus.
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3051
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3052
    "Modified: / 16-06-2007 / 11:58:44 / Administrador"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3053
!
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3054
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3055
selectionChanged
2048
dcec4e818069 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  3056
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3057
   self updateOriginalTextModification.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3058
   self updateLanguageTextModification.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3059
   self updateLanguageAndKeySelection.
2050
fm
parents: 2049
diff changeset
  3060
   self updateExampleLanguageText.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3061
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3062
   self updateCopyPreviousTranslationButtonEnabled.
2323
9b257cbd0ea9 *** empty log message ***
fm
parents: 2163
diff changeset
  3063
   self updatePasteOriginalButtonEnabled.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3064
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3065
   self originalTextModifiedHolder value:false.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3066
   self languageTextModifiedHolder value:false.
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3067
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3068
   self searchForSimilarTranslation.
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3069
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3070
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3071
showMissingTranslationsOnlyChanged
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3072
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3073
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3074
shownLanguagesChanged
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3075
    self keyStringAndLanguageSelectionTableColumnDescriptionHolder
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3076
	value:(self keyStringAndLanguageSelectionTableColumnDescription).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3077
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3078
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3079
stopApplication
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3080
    |p|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3081
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3082
    (p := monitoredApplication) notNil ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3083
	p terminate.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3084
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3085
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3086
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3087
!InternationalLanguageTranslationEditor::AccessCollectingPseudoResourcePack methodsFor:'accessing'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3088
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3089
realResourcePack:something
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3090
    realResourcePack := something.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3091
!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3092
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3093
watchingTranslationEditor:something
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3094
    watchingTranslationEditor := something.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3095
! !
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3096
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3097
!InternationalLanguageTranslationEditor::AccessCollectingPseudoResourcePack methodsFor:'resource pack protocol'!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3098
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3099
forwardFor:aString
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3100
    collectedKeys isNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3101
	collectedKeys := Set new.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3102
    ].
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3103
    collectedKeys add:aString.
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3104
    watchingTranslationEditor notNil ifTrue:[
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3105
	watchingTranslationEditor recordNewTranslation:aString.
3286
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3106
    ].
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3107
    ^ realResourcePack perform:(thisContext sender selector) withArguments:(thisContext sender args).
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3108
!
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3109
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3110
string:aString
1ea9a6fbe2b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3285
diff changeset
  3111
    ^ self forwardFor:aString
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3112
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3113
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3114
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings class methodsFor:'instance creation'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3115
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3116
new
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3117
    ^ self basicNew initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3118
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3119
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3120
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings methodsFor:'accessing'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3121
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3122
addKey:aKey
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3123
    self addKey:aKey sendChange:true
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3124
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3125
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3126
addKey:aKey sendChange:aBoolean
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3127
    (keys includes:aKey) ifFalse:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3128
	keys add:aKey.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3129
	aBoolean ifTrue:[ self changed ].
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3130
    ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3131
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3132
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3133
addKeys:aCollectionOfKey
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3134
    keys addAll:aCollectionOfKey.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3135
    self changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3136
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3137
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3138
addLanguage:lang
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3139
    (languages includes:lang) ifFalse:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3140
	languages add:lang.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3141
	perLanguageMappings at:lang put:(OrderedDictionary new).
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3142
    ]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3143
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3144
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3145
at:aKey language:language
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3146
    ^ (perLanguageMappings at:language) at:aKey ifAbsent:nil
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3147
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3148
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3149
at:aKey language:language put:value
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3150
    self addKey:aKey.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3151
    (perLanguageMappings at:language) at:aKey put:value.
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3152
    (self rowForKey:aKey) changed
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3153
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3154
2410
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3155
at:aKey language:language put:value sendChange:sendChange
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3156
    self addKey:aKey sendChange:sendChange.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3157
    (perLanguageMappings at:language) at:aKey put:value.
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3158
    (self rowForKey:aKey) changed
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3159
!
a3b53393dcf3 added open by project
Claus Gittinger <cg@exept.de>
parents: 2330
diff changeset
  3160
2050
fm
parents: 2049
diff changeset
  3161
atLanguage: lang putEncoder: aDecoder
fm
parents: 2049
diff changeset
  3162
fm
parents: 2049
diff changeset
  3163
^(self languageInfoAt: lang) at: self encoderKey put: aDecoder
fm
parents: 2049
diff changeset
  3164
!
fm
parents: 2049
diff changeset
  3165
fm
parents: 2049
diff changeset
  3166
atLanguage: lang putFilename: aFilename
fm
parents: 2049
diff changeset
  3167
fm
parents: 2049
diff changeset
  3168
^(self languageInfoAt: lang) at: self fileNameKey put: aFilename
fm
parents: 2049
diff changeset
  3169
!
fm
parents: 2049
diff changeset
  3170
fm
parents: 2049
diff changeset
  3171
decoderKey
fm
parents: 2049
diff changeset
  3172
   ^#decoder
fm
parents: 2049
diff changeset
  3173
!
fm
parents: 2049
diff changeset
  3174
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3175
encoderAt:lang
2050
fm
parents: 2049
diff changeset
  3176
    ^ (self languageInfoAt:lang) at: self encoderKey ifAbsent:[nil]
fm
parents: 2049
diff changeset
  3177
!
fm
parents: 2049
diff changeset
  3178
fm
parents: 2049
diff changeset
  3179
encoderKey
fm
parents: 2049
diff changeset
  3180
   ^#encoder
fm
parents: 2049
diff changeset
  3181
!
fm
parents: 2049
diff changeset
  3182
fm
parents: 2049
diff changeset
  3183
fileNameKey
fm
parents: 2049
diff changeset
  3184
    ^ #filename
fm
parents: 2049
diff changeset
  3185
!
fm
parents: 2049
diff changeset
  3186
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3187
filenameAt:lang
2050
fm
parents: 2049
diff changeset
  3188
    ^ (self languageInfoAt:lang) at: self fileNameKey ifAbsent:[nil]
fm
parents: 2049
diff changeset
  3189
!
fm
parents: 2049
diff changeset
  3190
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3191
keyAt:index
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3192
    ^ keys at:index ifAbsent:[nil].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3193
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3194
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3195
keyAt:index ifAbsent:exceptionalValue
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3196
    ^ keys at:index ifAbsent:exceptionalValue.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3197
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3198
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3199
keys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3200
    ^ keys
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3201
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3202
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3203
languageInfoAt: lang
2050
fm
parents: 2049
diff changeset
  3204
fm
parents: 2049
diff changeset
  3205
^self perLanguageInfo at: lang ifAbsentPut:[Dictionary new]
fm
parents: 2049
diff changeset
  3206
!
fm
parents: 2049
diff changeset
  3207
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3208
languages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3209
    ^ languages
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3210
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3211
2053
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3212
languagesInUse
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3213
"Returns a collection of symbols for the languages that have mappings"
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3214
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3215
^self languages select:[:each | (self atLanguage: each) notEmpty]
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3216
!
8440fcd83b7b 2.1 felix
fm
parents: 2051
diff changeset
  3217
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3218
orderedLanguageMappingsAssociationsFor: language
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3219
"Returns a collection of languageMappings associations (alphabetically ordered by keys) "
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3220
    ^(self atLanguage: language) associations
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3221
	    asSortedCollection:[:a :b | a key isArray or:[b key isArray or:[a key < b key]]].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3222
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3223
2050
fm
parents: 2049
diff changeset
  3224
perLanguageInfo
fm
parents: 2049
diff changeset
  3225
    ^ perLanguageInfo
fm
parents: 2049
diff changeset
  3226
!
fm
parents: 2049
diff changeset
  3227
fm
parents: 2049
diff changeset
  3228
perLanguageInfo:something
fm
parents: 2049
diff changeset
  3229
    perLanguageInfo := something.
fm
parents: 2049
diff changeset
  3230
!
fm
parents: 2049
diff changeset
  3231
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3232
removeKey:aKey
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3233
    keys remove:aKey ifAbsent:[].
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3234
    perLanguageMappings do:[:eachMapping |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3235
	eachMapping removeKey:aKey ifAbsent:[].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3236
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3237
    self changed.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3238
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3239
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3240
rowForKey:aKey
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3241
    ^ rowPerKey
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3242
	    at:aKey
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3243
	    ifAbsentPut:[InternationalLanguageTranslationEditor::LanguageMappingRow new
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3244
			    key:aKey; mappings:self].
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3245
!
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3246
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3247
size
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3248
    ^ keys size
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3249
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3250
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3251
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings methodsFor:'enumerating'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3252
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3253
do:aBlock
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3254
    keys do:[:eachKey |
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3255
	aBlock value:(self rowForKey:eachKey).
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3256
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3257
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3258
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3259
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings methodsFor:'initialization'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3260
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3261
initialize
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3262
    super initialize.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3263
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3264
    keys := OrderedSet new.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3265
    languages := OrderedCollection new.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3266
    perLanguageMappings := Dictionary new.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3267
    perLanguageInfo := Dictionary new.
2049
d10762e5d924 *** empty log message ***
fm
parents: 2048
diff changeset
  3268
    rowPerKey := Dictionary new.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3269
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3270
    self addLanguage:#'de'.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3271
    self addLanguage:#'fr'.
3077
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
  3272
    self addLanguage:#'en'.
48211023a3c7 class: Tools::InternationalLanguageTranslationEditor
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
  3273
    self addLanguage:#'it'.
2031
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3274
    self addLanguage:#'es'.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3275
    self addLanguage:(Smalltalk language).
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3276
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3277
    "/ self initializeDemoMappings.
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3278
!
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3279
85947c4c6502 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2015
diff changeset
  3280
initializeDemoMappings
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3281
    keys add:'open'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3282
    keys add:'close'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3283
    keys add:'yes'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3284
    keys add:'no'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3285
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3286
    self addLanguage:#'de'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3287
    self addLanguage:#'fr'.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3288
3455
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  3289
    self at:'open' language:#'de' put:'öffnen'.
4ba13182f80f #BUGFIX by mawalch
mawalch
parents: 3454
diff changeset
  3290
    self at:'close' language:#'de' put:'schließen'.
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3291
    self at:'yes' language:#'de' put:'ja'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3292
    self at:'no' language:#'de' put:'nein'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3293
    self at:'cancel' language:#'de' put:'abbrechen'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3294
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3295
    self at:'open' language:#'fr' put:'ouvrir'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3296
    self at:'close' language:#'fr' put:'fermer'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3297
    self at:'yes' language:#'fr' put:'oui'.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3298
    self at:'no' language:#'fr' put:'non'.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3299
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3300
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3301
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings methodsFor:'private'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3302
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3303
atLanguage:lang
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3304
    ^ perLanguageMappings at:lang
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3305
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3306
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3307
atLanguageIndex:idx
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3308
    |lang|
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3309
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3310
    lang := languages at:idx.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3311
    ^ self atLanguage:lang.
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3312
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3313
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3314
mappingAtLanguage:lang
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3315
    ^ perLanguageMappings at:lang
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3316
!
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3317
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3318
mappingAtLanguageIndex:idx
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3319
    |lang|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3320
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3321
    lang := languages at:idx.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3322
    ^ self mappingAtLanguage:lang.
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3323
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3324
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3325
!InternationalLanguageTranslationEditor::KeyStringsToLanguageMappings methodsFor:'queries'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3326
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3327
includesKey:aKey
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3328
    ^ keys includes:aKey
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3329
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3330
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3331
includesLanguage:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3332
    ^ languages includes:lang
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3333
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3334
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3335
indexOfKey:aKey
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3336
    ^ keys indexOf:aKey
2050
fm
parents: 2049
diff changeset
  3337
!
fm
parents: 2049
diff changeset
  3338
fm
parents: 2049
diff changeset
  3339
maxKeySizeForLanguage: lang
fm
parents: 2049
diff changeset
  3340
fm
parents: 2049
diff changeset
  3341
^(self atLanguage: lang) keys inject: 0 into:[:maxSize :each |
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3342
    (maxSize < each size and:[each size < 100])
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3343
	ifTrue:[each size]
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3344
	ifFalse:[maxSize].].
2051
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3345
!
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3346
88d16a7d0bd9 felix' fixes and additions
fm
parents: 2050
diff changeset
  3347
searchForSimilarTranslation: aKey in: language
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3348
    "Returns a collection of translation associations that corresponds to a quite similar key comparing with aKey"
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3349
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3350
    |similarAssociations|
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3351
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3352
    similarAssociations:=
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3353
    (self mappingAtLanguage: language) associationsSelect:[:each |
3522
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3354
	|eachKey|
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3355
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3356
	eachKey := eachKey.
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3357
	eachKey isString
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3358
	and:[(eachKey sameAs: aKey)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3359
	     or:[(aKey asUppercase startsWith: eachKey asUppercase)
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3360
	     or:[((eachKey asUppercase levenshteinTo: aKey asUppercase)/ eachKey size) < 0.3
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3361
	 ]]]
2a319ce12319 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3455
diff changeset
  3362
	 and:[each value notEmptyOrNil]
2327
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3363
    ].
a1db8e464b02 *** empty log message ***
fm
parents: 2323
diff changeset
  3364
    ^similarAssociations
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3365
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3366
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3367
!InternationalLanguageTranslationEditor::LanguageMappingRow methodsFor:'accessing'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3368
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3369
atLanguage:language
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3370
    |translation|
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3371
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3372
    translation := (mappings mappingAtLanguage:language) at:key ifAbsent:nil.
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3373
    ^ translation isNil ifTrue:nil ifFalse:[translation printString]
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3374
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3375
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3376
columnAt:columnNr
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3377
    ^ (mappings mappingAtLanguageIndex:columnNr-1) at: key ifAbsent:nil
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3378
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3379
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3380
key:something
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3381
    key := something.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3382
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3383
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3384
keyString
2032
cc2edbb9ebfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2031
diff changeset
  3385
    ^ key printString
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3386
!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3387
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3388
mappings:something
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3389
    mappings := something.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3390
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3391
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3392
!InternationalLanguageTranslationEditor::UISpecVisitor methodsFor:'accessing'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3393
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3394
translatedLabels
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3395
    ^ translatedLabels ? #()
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3396
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3397
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3398
!InternationalLanguageTranslationEditor::UISpecVisitor methodsFor:'visiting'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3399
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3400
visitObject:anObject with:aParameter
2033
2c1264ae2c1c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
  3401
    |l|
2c1264ae2c1c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
  3402
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3403
    (anObject isKindOf:UISpecification) ifTrue:[
2434
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3404
	(anObject respondsTo:#translateLabel) ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3405
	    anObject translateLabel == true ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3406
		translatedLabels isNil ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3407
		    translatedLabels := Set new.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3408
		].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3409
		l := anObject perform:#label ifNotUnderstood:nil.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3410
		l notNil ifTrue:[
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3411
		    translatedLabels add:l.
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3412
		].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3413
	    ].
6ad1f853d2e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2433
diff changeset
  3414
	].
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3415
    ].
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3416
    self visitChildrenOf:anObject.
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3417
! !
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3418
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3419
!InternationalLanguageTranslationEditor class methodsFor:'documentation'!
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3420
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3421
version
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3422
    ^ '$Header$'
3246
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  3423
!
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  3424
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  3425
version_CVS
034fe0de47bd #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 3245
diff changeset
  3426
    ^ '$Header$'
2015
8f226ff9b5e6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3427
! !