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