# HG changeset patch # User fm # Date 1206971104 -7200 # Node ID a1db8e464b02ff071fd822341c32f0ae7b3b95c4 # Parent f23fac3766219699cb2cbec912388ba9748c1950 *** empty log message *** diff -r f23fac376621 -r a1db8e464b02 Tools__InternationalLanguageTranslationEditor.st --- a/Tools__InternationalLanguageTranslationEditor.st Mon Mar 31 15:31:21 2008 +0200 +++ b/Tools__InternationalLanguageTranslationEditor.st Mon Mar 31 15:45:04 2008 +0200 @@ -16,7 +16,11 @@ selectedColIndexHolder exampleLanguageSelectionHolder exampleLanguageTextHolder pastePreviousTranslationEnableHolder searchForSimilarTranslationEnableHolder alwaysWriteUTF8Holder - lastNameSpace pasteOriginalEnableHolder' + lastNameSpace pasteOriginalEnableHolder ignoreCaseHolder + closeSearchBar searchTextModifiedHolder searchNextText + searchBarImageInfoLabelHolder searchPreviousText searchBoxVisible + searchBarInfoLabelHolder searchTextHolder searchTextView + searchBoxView translationsPanel lastPackage' classVariableNames:'LastExtractedClass LastExtractedApplicationClass LastExtractedProject' poolDictionaries:'' @@ -90,6 +94,193 @@ "Created: / 04-03-2006 / 09:07:19 / cg" ! ! +!InternationalLanguageTranslationEditor class methodsFor:'image specs'! + +closeSearchBarIcon + "This resource specification was automatically generated + by the ImageEditor of ST/X." + + "Do not manually edit this!! If it is corrupted, + the ImageEditor may not be able to read the specification." + + " + self closeSearchBar inspect + ImageEditor openOnClass:self andSelector:#closeSearchBar + Icon flushCachedIcons + " + + + + ^Icon + constantNamed:#'Psiware::SystemManagement class closeSearchBar' + ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@GQ\SD1LSD1LSD1LSD1LWGP@@@@@@ +@ATGA@HA@PDA@PDA@PHDA1T@@@@@@@@TAENG!!(VB XA?_''57QPPT@@@@@@@@E NJ^V)&X%)UTT5IV7 KE @@@@@@@A A"7Q,#&9VS%^MQ$ER$9JR$9ION''(PF0@@@@@@@A + + ^Icon + constantNamed:#'Psiware::SystemManagement class restartSearchBarIcon' + ifAbsentPut:[(Depth24Image new) width: 20; height: 20; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@?>SX?>''V?>;)?>O!!?>G]?>WY@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=3\:[>''5;JF/Y-.+XY),(U. +6JZK?=J1?>V<>.+I@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>?'':+:!!19]U6*-Q?]Y/?>RC?>*!!?>F_>+=939UL2Y!!L>MJT??W[@@@@@@@@@@@@@@@@@@@@ +@@@@??[-=\^&1IEP=1/?=5$?=52?>NT?=^Q?>BP?>FG>;1]6JEO8;^H?]3I@@@@@@@@@@@@@@@@@@@@?\*95Y-)<+!!$??.F?>)17+-U8,E40Y-.09I) +:Z1-?=I??=)8?<1.>K597;NL??K,@@@@@@@@@@@@?=#M6I>B>+:@?>2U=,]]5[IN7,^C5LB[;Y[??FP?=>O1YEW8,"%8Z:A?>N#?>._5KA$9-JW7=+FX6M+V%U3"''*T0Y>V4ZA7595T=;1"?=&D?=&L,W(93IU\:KE9=LBG9[Q9;K17?=?/? +>^_''3*.M0YAUZO?=>G?+U(69YI3:IG?=Z@?>NU5:=19,6%@@@@@@@@OU5*2.+7;O??5-KF2;JS?=*&?>&"?=.E?>2R?=&F?>"X8I-N5)ED +29$&?>M:?=*F3:E&>]/A@@@@@@@@O5=.7O??5^/(?O++0I-/;LNE??2)?=&B?>^%,W)A8:14?=FX3)TR?>U/?=Q:3IAZ?=?T@@@@@@@@P5Y68_#?7.70 +??[1??C_:,F%6;A=>MJA?>6":,6+&G91?>+^?>+]79<$?<1\?=:C5IM[?<;F@@@@@@@@Q$1>6N_?3*??S(=,.(2Z!!#=-:^+9>P4,[P<>''46=O^ +=+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''? +>/C???K??NK/??[1???#9M?B??3;(IV#/[WD;^_5@@@@;KR]<[10?=Q68[9,8,>W@@@@TU9&;/??9__9:.;/?_#?[==?79>_?=<_S9T5M[0,WN7^G* +@@@@@@@@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 +U5AWV5%.U5);R5M:Q5M;S%-=TE]*[GI>):696M;*@@@@@@@@@@@@6\F[2Y914)9.;[VF?L"!!8[^_3J>''0KB:0;?V0,_''-3))5/II9+9FF+9> 0;7I5-#-7NO?7^#?8^/?:/G?7NK07>W3@@@@@@@@@@@@@@@@@@@@@@@@?>N;?>N;?=:9?>7T?>#X +>^_%=N?6O???O?????_??>_??>_??>_??>_??>_??>_??__??O???O???G???A??/A? O') ; yourself); yourself] +! + +searchNextIcon + "This resource specification was automatically generated + by the ImageEditor of ST/X." + + "Do not manually edit this!! If it is corrupted, + the ImageEditor may not be able to read the specification." + + " + self searchNextIcon inspect + ImageEditor openOnClass:self andSelector:#searchNextIcon + Icon flushCachedIcons + " + + + + ^Icon + constantNamed:#'Psiware::SystemManagement class searchNextIcon' + ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@ +@@@@@@AFF XA@PXUQ @@@@@@@@@@@@@@@@@*@Q5G^WX6E0D*@@@@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@A[@U==\F-"VUQOUSLAV0@@@@@@@@@@ +G19-D N2 H# @@@@@@@@@''GG)*Y2$9NRIDO4DQHP@@@@@@@@@@!!@EP[6U]I"UIQTL.@XP@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@@@@EDA +FSQ!!VC@T@UD@@@@@@@@@@@@@@@@@#R,I@PDIJ84@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@?CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@? + + ^Icon + constantNamed:#'Psiware::SystemManagement class searchPreviousIcon' + ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@ +@@@@@@BMJ0$A@P$+#P@@@@@@@@@@@@@@@@AQ@Q$4XU 0E@EQ@@@@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@BD@UA/YU4&IT%EP28A!!@@@@@@@@@@@ +I11:Z&\)NS$"QC=ADRD@@@@@@@@@# !!H]F$N2 H# @@@@@@@H,A GE\FI"Y&Y VMS)@@X,@@@@@@@BG@XE3HIJY&Y&Y$!!,=P FG@@@@@@@@ ]M +T5JY&Y&Y&Y%RLR4G @@@@@@@@@_G&4RC08MC@,JDC\SG0@@@@@@@@@@V0E__WA+X%%TS5T3@U,@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@@@@B(A +GT]9]#XW@R(@@@@@@@@@@@@@@@@@Q!!(F@PDFETX@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@?CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@? + + ^Icon + constantNamed:#'Psiware::SystemManagement class searchToolBarIcon' + ifAbsentPut:[(Depth24Image new) width: 22; height: 22; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>4][>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@;>#8/L#+!!:KS!!:KS/,'',;>''9@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2];>^)WH +NE:+KU*:J5&9NE6*_I#K4^S>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>RV3DLER"SWR6$K#0#;[.SGJ4L5"''UG_N4][>@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*K''\JT*,U6Z7:^S?>/C*;.3,6>C>RFF(KEZ"3-_-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@&Z''HFTF &Z7">N#:7NK?7NK?6=W>!!Y''YH4N -+3T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%I>;FDV)#ZWU??''57NK? +7NK?:>_?\8WKFCN".K#T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1L;.A#V[O5")3=W;=/[4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?-;#%ND&KC">BYV.*4=;>7.+>-==O;8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@7NK? (J9GB1SZV>W:M3?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5MS&++3H6M/#@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@A C@G8C@OC@_>C@_>C@_>C@_>C@?>CA? + + ^Icon + constantNamed:#'Psiware::SystemManagement class warningSearchBarIcon' + ifAbsentPut:[(Depth24Image new) width: 22; height: 19; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?:.+_;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@?]SZ)5]X.6!! -HM2??''*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>39-7*B4H&G>[N+%%MJ>\#A@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<+R?*U1&?=CN?>W^4HJ@+FY$?>+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@?>G_)U!!^>Z^->,B><+"4?*^-%C8?;;Z+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@??#1-(E;.65+?<#H +?=_T?=GP?::65W-=(EQF?>WQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?\#D*VAY?;61<;"0;,C@6J^+;*"0>ZN$&CX)6(-:@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>#+/7Q148E6?<"4K^>(M=1S8;)$ID8Y6^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;HNR4U%%<)&S?<^9??_(??;3REEN@P,J2<[C??K/?:R!!/C8?&R(0(T-N?>GZ@@@@ +@@@@@@@@@@@@@@@@@@@@?<;H,31B3T9U2'')1?L3@?>3&=^7*XWE0@@=WL??_:<>33[G:@D2T%;^/,??#8??K19Y6^&R(0!!QPX#S8:;K22@@@@@@@@@@@@@@@@<*RZ+5I@*$D+*T48<[N&?>C_7,+U??3?7N''/(J.-?/+;??W5 +;.O!!?>G_3&]+ 0(O#B8.(U9X@@@@@@@@@@@@?W"?:*+*3@3$R\)^R ''2)^T@@@@ +?>K2;(ZO2DQ@-SP!!,5H/?7:)72EUBT+<,GD?>?,]GO?<#J8VM& P4P_A0^ C(:?>+''?:"+34%H13L/02("13T(13\,5$H>3S<= +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 +(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@?CC??CC??CC??#G??#O??3O??3_??;????????????????') ; yourself); yourself] +! ! + !InternationalLanguageTranslationEditor class methodsFor:'interface specs'! windowSpec @@ -115,7 +306,7 @@ label: 'InternationalLanguageTranslationEditor' name: 'InternationalLanguageTranslationEditor' min: (Point 10 10) - bounds: (Rectangle 0 0 778 614) + bounds: (Rectangle 0 0 774 610) menu: mainMenu ) component: @@ -128,8 +319,8 @@ textDefault: true ) (VariableVerticalPanelSpec - name: 'VariableVerticalPanel2' - layout: (LayoutFrame 0 0 30 0 0 1 0 1) + name: 'TranslationsVariableVerticalPanel' + layout: (LayoutFrame 0 0 30 0 0 1 -32 1) component: (SpecCollection collection: ( @@ -264,6 +455,86 @@ ) handles: (Any 0.5 1.0) + postBuildCallback: postBuildTranslationsPanel: + ) + (ViewSpec + name: 'SearchBox' + layout: (LayoutFrame 0 0 -32 1 0 1 0 1) + level: -1 + visibilityChannel: searchBoxVisible + component: + (SpecCollection + collection: ( + (ActionButtonSpec + label: 'closeSearchBarIcon' + name: 'closeSearchBarButton' + layout: (LayoutFrame 4 0 5 0 25 0 26 0) + hasCharacterOrientedLabel: false + translateLabel: true + model: closeSearchBar + ) + (LabelSpec + label: 'Search:' + name: 'SearchLabel' + layout: (LayoutFrame 30 0 5 0 81 0 27 0) + translateLabel: true + adjust: right + ) + (InputFieldSpec + name: 'SearchEntryField' + layout: (LayoutFrame 87 0 5 0 244 0 27 0) + model: searchTextHolder + immediateAccept: true + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: true + modifiedChannel: searchTextModifiedHolder + acceptOnPointerLeave: false + postBuildCallback: postBuildSearchTextView: + ) + (ActionButtonSpec + label: 'searchNextIcon' + name: 'SearchNextButton' + layout: (LayoutFrame 251 0 5 0 272 0 26 0) + hasCharacterOrientedLabel: false + translateLabel: true + model: searchNextText + ) + (ActionButtonSpec + label: 'searchPreviousIcon' + name: 'searchPreviousButton' + layout: (LayoutFrame 279 0 5 0 300 0 26 0) + hasCharacterOrientedLabel: false + translateLabel: true + model: searchPreviousText + ) + (CheckBoxSpec + label: 'Ignore case' + name: 'IgnoreCaseCheckBox' + layout: (LayoutFrame 309 0 5 0 434 0 27 0) + model: ignoreCaseHolder + translateLabel: true + ) + (LabelSpec + label: 'SearchBarImageInfoLabel' + name: 'SearchBarImageInfoLabel' + layout: (LayoutFrame 436 0 5 0 460 0 27 0) + hasCharacterOrientedLabel: false + translateLabel: true + labelChannel: searchBarImageInfoLabelHolder + ) + (LabelSpec + label: 'SearchBarInfoLabel' + name: 'SearchBarInfoLabel' + layout: (LayoutFrame 463 0 5 0 741 0 27 0) + translateLabel: true + labelChannel: searchBarInfoLabelHolder + adjust: left + ) + ) + + ) + postBuildCallback: postBuildSearchBoxView: ) ) @@ -291,15 +562,31 @@ #(Menu ( (MenuItem - label: 'Current NameSpace:' + label: 'Set Current NameSpace' itemValue: changeLastNameSpace translateLabel: true ) (MenuItem - label: 'Search String in Current NameSpace:' + label: 'Search String in Current NameSpace' itemValue: searchStringInLastNameSpace translateLabel: true ) + (MenuItem + label: '-' + isVisible: #false + ) + (MenuItem + label: 'Set Current Package' + itemValue: changeLastPackage + translateLabel: true + isVisible: #false + ) + (MenuItem + label: 'Search String in Current Package' + itemValue: searchStringInLastPackage + translateLabel: true + isVisible: #false + ) ) nil nil @@ -364,11 +651,25 @@ label: '-' ) (MenuItem - label: 'Current NameSpace:' + label: 'Import existing tranlations from file...' + itemValue: importExistingTranslationsFromFile + translateLabel: true + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Set Current NameSpace' itemValue: changeLastNameSpace translateLabel: true ) (MenuItem + label: 'Set Current Package' + itemValue: changeLastPackage + translateLabel: true + isVisible: #false + ) + (MenuItem label: '-' ) (MenuItem @@ -599,6 +900,16 @@ labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon) ) (MenuItem + label: '-' + ) + (MenuItem + label: 'Search' + itemValue: search + translateLabel: true + shortcutKey: Ctrlf + labelImage: (ResourceRetriever #'Tools::InternationalLanguageTranslationEditor' searchToolBarIcon) + ) + (MenuItem label: '' ) (MenuItem @@ -666,6 +977,28 @@ !InternationalLanguageTranslationEditor methodsFor:'accessing'! +currentSelectionIndex + + ^ self selectedKeyRow value + + "Created: / 16-06-2007 / 09:04:11 / Administrador" + "Modified: / 19-06-2007 / 17:28:38 / Administrador" +! + +exists: anObject + + ^self objectsList includes: anObject + + "Created: / 19-06-2007 / 16:42:22 / Administrador" +! + +indexOf: anObject + + ^self objectsList indexOf: anObject + + "Created: / 19-06-2007 / 16:39:44 / Administrador" +! + newLanguageText "/ languageEditor accept ^self languageTextHolder value isNil @@ -673,6 +1006,22 @@ ifFalse:[self languageTextHolder value asCollectionOfLines first.] ! +objectsList + + ^ keyStringsToLanguageMappings +! + +selectListIndex: rowIndex +"/ |selection list| +"/ list := self objectsList. +"/ list isEmpty ifTrue:[^self]. +"/ selection := list at:rowIndex ifAbsent:nil. + self selectedKeyRow value: rowIndex. + + "Created: / 16-06-2007 / 09:06:46 / Administrador" + "Modified: / 22-06-2007 / 13:45:54 / Administrador" +! + selectedKey "Returns the current selected key if there is one row seleted. Otherwise, returns nil" |rowSelectionIndex | @@ -682,17 +1031,26 @@ rowSelectionIndex := self selectedKeyRow value. rowSelectionIndex == 0 ifTrue:[^nil]. ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex. +! + +tableView + + ^dataSetView scrolledView + + "Created: / 15-06-2007 / 18:59:51 / Administrador" ! ! !InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'! searchForSimilarTranslation "Looks for a quite similar translation for the key and display a dialog with available options" - |similarTranslationsAssociations selectedTranslation| + |similarTranslationsAssociations selectedTranslation key| self shouldSearchForSimilarTranslation ifFalse:[^self]. - similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: self selectedKey in: self currentLanguage. + key := self selectedKey. + key isNil ifTrue:[^ self.]. + similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: key in: self currentLanguage. similarTranslationsAssociations isEmpty ifTrue:[^self]. similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association | @@ -702,7 +1060,7 @@ selectedTranslation := Dialog choose:'Choose one if you consider itīs usefull to translate: ', - '<', self selectedKey, '> ', (self currentExampleLanguageText ifNil:['']) + '<', key, '> ', (self currentExampleLanguageText ifNil:['']) fromList: (similarTranslationsAssociations collect:[:each | '<', each key, '> ', each value]) values: (similarTranslationsAssociations collect:[:each | each value]) lines:10 @@ -738,6 +1096,21 @@ ^ exampleLanguageTextHolder. ! +ignoreCaseHolder + + ignoreCaseHolder isNil ifTrue:[ + ignoreCaseHolder := false asValue. +"/ if your app needs to be notified of changes, uncomment one of the lines below: +"/ ignoreCaseHolder addDependent:self. + ignoreCaseHolder onChangeSend:#ignoreCaseHolderChanged to:self. + + ]. + ^ ignoreCaseHolder. + + "Created: / 16-06-2007 / 06:45:04 / Administrador" + "Modified: / 16-06-2007 / 19:32:15 / Administrador" +! + keyStringAndLanguageSelectionTable keyStringsToLanguageMappings isNil ifTrue:[ keyStringsToLanguageMappings := KeyStringsToLanguageMappings new. @@ -833,12 +1206,68 @@ ^ pastePreviousTranslationEnableHolder ! +searchBarImageInfoLabelHolder + + searchBarImageInfoLabelHolder isNil ifTrue:[ + searchBarImageInfoLabelHolder := nil asValue . + ]. + ^ searchBarImageInfoLabelHolder. + + "Created: / 16-06-2007 / 10:06:28 / Administrador" +! + +searchBarInfoLabelHolder + + searchBarInfoLabelHolder isNil ifTrue:[ + searchBarInfoLabelHolder := '' asValue . + ]. + ^ searchBarInfoLabelHolder. + + "Created: / 16-06-2007 / 06:20:49 / Administrador" +! + +searchBoxVisible + + searchBoxVisible isNil ifTrue:[ + searchBoxVisible := false asValue. + ]. + ^ searchBoxVisible. + + "Created: / 15-06-2007 / 18:15:52 / Administrador" +! + searchForSimilarTranslationEnableHolder searchForSimilarTranslationEnableHolder isNil ifTrue:[searchForSimilarTranslationEnableHolder := true asValue]. ^ searchForSimilarTranslationEnableHolder ! +searchTextHolder + + searchTextHolder isNil ifTrue:[ + searchTextHolder := ValueHolder new. +"/ if your app needs to be notified of changes, uncomment one of the lines below: +"/ userSelectedHolder addDependent:self. +"/ userSelectedHolder onChangeSend:#searchTextHolderChanged to:self. + ]. + ^ searchTextHolder. + + "Created: / 15-06-2007 / 18:06:08 / Administrador" +! + +searchTextModifiedHolder + + searchTextModifiedHolder isNil ifTrue:[ + searchTextModifiedHolder := false asValue . +"/ if your app needs to be notified of changes, uncomment one of the lines below: +"/ searchTextModifiedHolder addDependent:self. + searchTextModifiedHolder onChangeSend:#searchTextModifiedHolderChanged to:self. + ]. + ^ searchTextModifiedHolder. + + "Created: / 15-06-2007 / 18:07:19 / Administrador" +! + selectedKeyRow selectedKeyRow isNil ifTrue:[ selectedKeyRow := ValueHolder new. @@ -1021,12 +1450,29 @@ ! requestLanguage + + ^ Dialog choose:'For which language ?' fromList:languagesList lines:10. +! + +requestLanguageToSave ^ Dialog choose:'Which language do you want to save?' fromList:languagesList lines:10 ! ! +!InternationalLanguageTranslationEditor methodsFor:'images'! + +restartSearchBarIcon + + ^ self class restartSearchBarIcon +! + +warningSearchBarIcon + + ^ self class warningSearchBarIcon +! ! + !InternationalLanguageTranslationEditor methodsFor:'initialization & release'! closeRequest @@ -1058,6 +1504,33 @@ aView selectedColIndexHolder onChangeSend:#selectionChanged to:self. ! ! +!InternationalLanguageTranslationEditor methodsFor:'initialize'! + +postBuildSearchBoxView: aBoxView + + searchBoxView := aBoxView + + "Created: / 15-06-2007 / 18:02:38 / Administrador" +! + +postBuildSearchTextView: anEditFieldView + + searchTextView := anEditFieldView + + "Created: / 15-06-2007 / 18:17:15 / Administrador" +! + +postBuildTranslationsPanel: aPanel + + translationsPanel := aPanel +! + +postBuildWith:aBuilder + + super postBuildWith:aBuilder. + self updateToolVisibility. +! ! + !InternationalLanguageTranslationEditor methodsFor:'menu actions'! addLanguage @@ -1096,11 +1569,26 @@ nameSpace isNil ifTrue:[^self]. nameSpace := Smalltalk at:nameSpace asSymbol. nameSpace isNil ifTrue:[ - ^Dialog information:(resources string:'No such nameSpace exists.?') + ^Dialog information:(resources string:'No such nameSpace exists.') ]. lastNameSpace := nameSpace. ! +changeLastPackage + + |package defaultPackage| + + lastPackage notNil ifTrue:[defaultPackage := lastPackage]. + package := Dialog + requestProject:'Package:' + initialAnswer:defaultPackage + suggestions:#('foo' 'bar' 'baz'). + package isNil ifTrue:[ + ^Dialog information:(resources string:'No such package exists.') + ]. + lastPackage := package. +! + extractTranslationsFromClass |aClass newTranslations| @@ -1161,6 +1649,9 @@ self addAllTranslations:newTranslations. ! +importExistingTranslationsFromFile +! + inspectCanvasMissingStrings |spec nameSpace missingStrings| @@ -1219,7 +1710,7 @@ "Saves the language selected in the fileName from where the language resource was obtained." |lang| - lang := self requestLanguage. + lang := self requestLanguageToSave. lang isNil ifTrue:[^ self]. self saveLanguage: lang ! @@ -1233,7 +1724,7 @@ "Saves the language selected in the specified fileName." |lang aFilename| - lang := self requestLanguage. + lang := self requestLanguageToSave. lang isNil ifTrue:[^ self]. aFilename := self requestFilenameFor:lang. aFilename isNil ifTrue:[^ self]. @@ -1265,7 +1756,7 @@ readResourceFile:aFilename |lang| - lang := Dialog choose:'For which language ?' fromList:languagesList lines:10. + lang := self requestLanguage. lang isNil ifTrue:[^ self ]. self readResourceFile:aFilename asLanguage:lang asSymbol @@ -1367,6 +1858,7 @@ (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[ browser lastSearchPatterns addFirst: selectedKey ]. + SearchDialog lastStringSearchArea: #currentNameSpace. lastNameSpace isNil ifTrue:[ self changeLastNameSpace. ]. @@ -1378,6 +1870,32 @@ self withWaitCursorDo:[ browser browseMenuMethodsWithString ]. +! + +searchStringInLastPackage + + | selectedKey browser lastSearchPatterns| + + selectedKey := self selectedKey. + selectedKey isNil ifTrue:[^Dialog information: 'No selected key']. + browser := NewSystemBrowser new "open". + browser allButOpen. + lastSearchPatterns := browser lastSearchPatterns. + (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[ + browser lastSearchPatterns addFirst: selectedKey + ]. + SearchDialog lastStringSearchArea: #currentPackage. + lastPackage isNil ifTrue:[ + self changeLastPackage. + ]. + lastPackage notNil ifTrue:[ +"/ browser navigationState selectedClasses value: lastNameSpace allClasses. + browser navigationState packageFilter value: (OrderedCollection with:lastPackage). + browser navigationState selectedProjects value: (OrderedCollection with:lastPackage). + ]. + self withWaitCursorDo:[ + browser browseMenuMethodsWithString + ]. ! ! !InternationalLanguageTranslationEditor methodsFor:'menus dynamic'! @@ -1889,6 +2407,207 @@ DialogBox information: 'The resource file for the language ', lang printString storeString, ' was saved in the file: ', aFilename nameString ! ! +!InternationalLanguageTranslationEditor methodsFor:'searching'! + +ignoreCaseHolderChanged + + self searchNextTextIncludingCurrentSelection: true. + + "Created: / 16-06-2007 / 09:33:33 / Administrador" +! + +searchNextText + + self searchNextTextIncludingCurrentSelection: false. + + "Modified: / 16-06-2007 / 09:21:14 / Administrador" +! + +searchNextTextFromBeginning + |searchText rowFoundIndex| + + searchText := searchTextView contents. + searchText isEmptyOrNil ifTrue:[^self]. + self objectsList isEmpty ifTrue:[^self]. + rowFoundIndex := self tableView findFirstRowWithString: searchText + from:1 + to:self objectsList size + ignoreCase:self ignoreCaseHolder value. + rowFoundIndex isNil ifTrue:[ + self searchTextNotFound. + ^self + ]. + self selectListIndex: rowFoundIndex + + "Created: / 16-06-2007 / 10:54:51 / Administrador" + "Modified: / 19-06-2007 / 15:38:59 / Administrador" +! + +searchNextTextIncludingCurrentSelection: includeCurrentSelection + |searchText currentSelectionIndex rowFoundIndex fromIndex listSize| + + self searchTextStarted. + searchText := searchTextView contents. + searchText isEmptyOrNil ifTrue:[^self]. + self objectsList isEmpty ifTrue:[^self]. + currentSelectionIndex := self currentSelectionIndex. + (currentSelectionIndex isNil or:[currentSelectionIndex == 0]) ifTrue:[ + self searchNextTextFromBeginning. + ^self. + ]. + listSize := self objectsList size. + (currentSelectionIndex == listSize and:[includeCurrentSelection not]) ifTrue:[ + self searchNextTextReachEnd. + ^self. + ]. + fromIndex := includeCurrentSelection + ifTrue:[currentSelectionIndex] + ifFalse:[currentSelectionIndex + 1]. + rowFoundIndex := self tableView findFirstRowWithString: searchText + from:fromIndex + to:listSize + ignoreCase:self ignoreCaseHolder value. + rowFoundIndex isNil ifTrue:[ + self searchNextTextReachEnd. + ^self + ]. + self selectListIndex: rowFoundIndex + + "Created: / 16-06-2007 / 09:20:57 / Administrador" + "Modified: / 19-06-2007 / 15:38:06 / Administrador" +! + +searchNextTextReachEnd + |message| + message := 'End of list reached, starting from the beginning'. + self searchTextRestarted: message. + self searchNextTextFromBeginning. + + "Created: / 16-06-2007 / 11:00:59 / Administrador" +! + +searchPreviousText + + |searchText currentSelectionIndex rowFoundIndex fromIndex| + + self searchTextStarted. + searchText := searchTextView contents. + searchText isEmptyOrNil ifTrue:[^self]. + self objectsList isEmpty ifTrue:[^self]. + currentSelectionIndex := self currentSelectionIndex. + currentSelectionIndex == 1 ifTrue:[ + self searchPreviousTextReachBeginning. + ^self. + ]. + (currentSelectionIndex isNil or:[currentSelectionIndex == 0]) + ifTrue:[ + self searchPreviousTextFromEnd. + ^self. + ] + ifFalse:[fromIndex := currentSelectionIndex - 1]. + rowFoundIndex := self tableView findFirstRowWithString: searchText + from: fromIndex + to: 1 + by: -1 + ignoreCase:self ignoreCaseHolder value. + rowFoundIndex isNil ifTrue:[ + self searchPreviousTextReachBeginning. + ^self + ]. + self selectListIndex: rowFoundIndex. + + "Modified: / 19-06-2007 / 15:38:16 / Administrador" +! + +searchPreviousTextFromEnd + + |searchText rowFoundIndex| + + searchText := searchTextView contents. + searchText isEmptyOrNil ifTrue:[^self]. + self objectsList isEmpty ifTrue:[^self]. + rowFoundIndex := self tableView findFirstRowWithString: searchText + from: self objectsList size + to: 1 + by: -1 + ignoreCase:self ignoreCaseHolder value. + rowFoundIndex isNil ifTrue:[ + self searchTextNotFound. + ^self + ]. + self selectListIndex: rowFoundIndex. + + "Created: / 16-06-2007 / 10:55:43 / Administrador" + "Modified: / 19-06-2007 / 15:38:26 / Administrador" +! + +searchPreviousTextReachBeginning + |message| + message := 'Beginning of list reached, starting from the end'. + self searchTextRestarted: message. + self searchPreviousTextFromEnd. + + "Created: / 16-06-2007 / 11:01:23 / Administrador" +! + +searchTextModifiedHolderChanged + + self searchNextTextIncludingCurrentSelection: true. + self searchTextModifiedHolder setValue: false. + +"/Transcript showCR: 'searchTextModifiedHolderChanged: ',(self searchTextHolder value ? ''). +"/Transcript showCR: 'searchTextView contents: ',(searchTextView contents ? ''). + + "Created: / 15-06-2007 / 18:07:57 / Administrador" + "Modified: / 16-06-2007 / 09:21:27 / Administrador" +! + +searchTextNotFound + + self selectListIndex: 0. + self searchBarImageInfoLabelHolder value: self warningSearchBarIcon. + self searchBarInfoLabelHolder value: 'Text not found'. + self setSearchTextNotFoundColors. + + "Created: / 16-06-2007 / 06:51:01 / Administrador" + "Modified: / 16-06-2007 / 11:43:53 / Administrador" +! + +searchTextRestarted: message + + self searchBarImageInfoLabelHolder value: self restartSearchBarIcon. + self searchBarInfoLabelHolder value: message. +"/ self setSearchTextNotFoundColors. + + "Created: / 16-06-2007 / 11:02:06 / Administrador" +! + +searchTextStarted + + self searchBarImageInfoLabelHolder value: nil. + self searchBarInfoLabelHolder value: ''. + self setSearchTextFoundColors. + + "Created: / 16-06-2007 / 06:54:03 / Administrador" + "Modified: / 16-06-2007 / 10:07:06 / Administrador" +! + +setSearchTextFoundColors + + searchTextView foregroundColor: Color black. + searchTextView backgroundColor: Color white. + + "Created: / 16-06-2007 / 06:28:32 / Administrador" +! + +setSearchTextNotFoundColors + + searchTextView foregroundColor: Color white. + searchTextView backgroundColor: Color lightRed. + + "Created: / 16-06-2007 / 06:29:00 / Administrador" +! ! + !InternationalLanguageTranslationEditor methodsFor:'specs-dynamic'! columnInRow:row at:colIndex @@ -1927,8 +2646,36 @@ ^ row keyString ! ! +!InternationalLanguageTranslationEditor methodsFor:'update'! + +updateToolVisibility + | bottomOffset searchBarVisible | + + bottomOffset := 0. + + searchBarVisible := self searchBoxVisible value. + searchBarVisible ifTrue:[ + bottomOffset := bottomOffset - searchBoxView height. + ]. + translationsPanel layout bottomOffset:bottomOffset-1. + translationsPanel container notNil ifTrue:[ + translationsPanel containerChangedSize. + ]. + + "Created: / 16-06-2007 / 11:58:25 / Administrador" +! ! + !InternationalLanguageTranslationEditor methodsFor:'user actions'! +closeSearchBar + + self searchBoxVisible value: false. + self updateToolVisibility. + + "Created: / 15-06-2007 / 18:03:05 / Administrador" + "Modified: / 16-06-2007 / 11:58:52 / Administrador" +! + exampleLanguageSelectionChanged self updateExampleLanguageText. @@ -1967,6 +2714,15 @@ self languageTextModifiedHolder value:true. ! +search + + self searchBoxVisible value: true. + self updateToolVisibility. + searchTextView takeFocus. + + "Modified: / 16-06-2007 / 11:58:44 / Administrador" +! + selectionChanged self updateOriginalTextModification. @@ -2226,18 +2982,20 @@ ! searchForSimilarTranslation: aKey in: language -"Returns a collection of translation associations that corresponds to a quite similar key comparing with aKey" -|similarAssociations| -similarAssociations:= -(self mappingAtLanguage: language) associationsSelect:[:each | - ((each key sameAs: aKey) - or:[(aKey asUppercase startsWith: each key asUppercase) - or:[((each key asUppercase levenshteinTo: aKey asUppercase)/ each key size) < 0.3 - ]]) - and:[each value notNil - and:[each value notEmpty]] -]. -^similarAssociations + "Returns a collection of translation associations that corresponds to a quite similar key comparing with aKey" + + |similarAssociations| + + similarAssociations:= + (self mappingAtLanguage: language) associationsSelect:[:each | + ((each key sameAs: aKey) + or:[(aKey asUppercase startsWith: each key asUppercase) + or:[((each key asUppercase levenshteinTo: aKey asUppercase)/ each key size) < 0.3 + ]]) + and:[each value notNil + and:[each value notEmpty]] + ]. + ^similarAssociations ! ! !InternationalLanguageTranslationEditor::LanguageMappingRow methodsFor:'accessing'!