Tools__InternationalLanguageTranslationEditor.st
changeset 2327 a1db8e464b02
parent 2323 9b257cbd0ea9
child 2329 a9d39ef2c8aa
equal deleted inserted replaced
2326:f23fac376621 2327:a1db8e464b02
    14 		inSingleFileMode lastExtractedProject lastLanguage
    14 		inSingleFileMode lastExtractedProject lastLanguage
    15 		lastSelectedKey autoAcceptHolder languageEditor
    15 		lastSelectedKey autoAcceptHolder languageEditor
    16 		selectedColIndexHolder exampleLanguageSelectionHolder
    16 		selectedColIndexHolder exampleLanguageSelectionHolder
    17 		exampleLanguageTextHolder pastePreviousTranslationEnableHolder
    17 		exampleLanguageTextHolder pastePreviousTranslationEnableHolder
    18 		searchForSimilarTranslationEnableHolder alwaysWriteUTF8Holder
    18 		searchForSimilarTranslationEnableHolder alwaysWriteUTF8Holder
    19 		lastNameSpace pasteOriginalEnableHolder'
    19 		lastNameSpace pasteOriginalEnableHolder ignoreCaseHolder
       
    20 		closeSearchBar searchTextModifiedHolder searchNextText
       
    21 		searchBarImageInfoLabelHolder searchPreviousText searchBoxVisible
       
    22 		searchBarInfoLabelHolder searchTextHolder searchTextView
       
    23 		searchBoxView translationsPanel lastPackage'
    20 	classVariableNames:'LastExtractedClass LastExtractedApplicationClass
    24 	classVariableNames:'LastExtractedClass LastExtractedApplicationClass
    21 		LastExtractedProject'
    25 		LastExtractedProject'
    22 	poolDictionaries:''
    26 	poolDictionaries:''
    23 	category:'Interface-UIPainter'
    27 	category:'Interface-UIPainter'
    24 !
    28 !
    86 "
    90 "
    87 !
    91 !
    88 
    92 
    89 history
    93 history
    90     "Created: / 04-03-2006 / 09:07:19 / cg"
    94     "Created: / 04-03-2006 / 09:07:19 / cg"
       
    95 ! !
       
    96 
       
    97 !InternationalLanguageTranslationEditor class methodsFor:'image specs'!
       
    98 
       
    99 closeSearchBarIcon
       
   100     "This resource specification was automatically generated
       
   101      by the ImageEditor of ST/X."
       
   102 
       
   103     "Do not manually edit this!! If it is corrupted,
       
   104      the ImageEditor may not be able to read the specification."
       
   105 
       
   106     "
       
   107      self closeSearchBar inspect
       
   108      ImageEditor openOnClass:self andSelector:#closeSearchBar
       
   109      Icon flushCachedIcons
       
   110     "
       
   111 
       
   112     <resource: #image>
       
   113 
       
   114     ^Icon
       
   115         constantNamed:#'Psiware::SystemManagement class closeSearchBar'
       
   116         ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
   117 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@GQ\SD1LSD1LSD1LSD1LWGP@@@@@@
       
   118 @ATGA@HA@PDA@PDA@PHDA1T@@@@@@@@TAENG!!(VB XA?_''57QPPT@@@@@@@@E NJ^V)&X%)UTT5IV7 KE @@@@@@@A A"7Q,#&9VS%^MQ$E<DQ @@@@@@@@Z
       
   119 @X%-#9NRX52R$80:^1@Z@@@@@@@@F0FHY6>R$9JR$9ION''(PF0@@@@@@@A<A 5ABT)FS$9D=KR13C1<@@@@@@@@)@WUCND*Q$9NQM"T!!XP8)@@@@@@@@K E2
       
   120 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%(
       
   121 YVQ W59]VU 4CD @@@@@@@AGFP4F@PDA@PDA@PDFCQ%G@@@@@@@@K41TUEQTUEQTUEQTUEQLK0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   122 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
       
   123 
       
   124     "Created: / 15-06-2007 / 18:04:38 / Administrador"
       
   125 !
       
   126 
       
   127 restartSearchBarIcon
       
   128     "This resource specification was automatically generated
       
   129      by the ImageEditor of ST/X."
       
   130 
       
   131     "Do not manually edit this!! If it is corrupted,
       
   132      the ImageEditor may not be able to read the specification."
       
   133 
       
   134     "
       
   135      self restartSearchBarIcon inspect
       
   136      ImageEditor openOnClass:self andSelector:#restartSearchBarIcon
       
   137      Icon flushCachedIcons
       
   138     "
       
   139 
       
   140     <resource: #image>
       
   141 
       
   142     ^Icon
       
   143         constantNamed:#'Psiware::SystemManagement class restartSearchBarIcon'
       
   144         ifAbsentPut:[(Depth24Image new) width: 20; height: 20; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
       
   145 @@@@@@@@@@@@@@@@@@@@@@@@?>SX?>''V?>;)?>O!!?>G]?>WY@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=3\:[>''5;JF/Y-.+XY),(U.
       
   146 6JZK?=J1?>V<>.+I@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>?'':+:!!19]U6*-Q?]Y/?>RC?>*!!?>F_>+=939UL2Y!!L>MJT??W[@@@@@@@@@@@@@@@@@@@@
       
   147 @@@@??[-=\^&1IEP=<Q[?>1/?=5$?=52?>NT?=^Q?>BP?>FG>;1]6JEO8;^H?]3I@@@@@@@@@@@@@@@@@@@@?\*95Y-)<+!!$??.F?>)17+-U8,E40Y-.09I)
       
   148 :Z1-?=I??=)8?<1.>K597;NL??K,@@@@@@@@@@@@?=#M6I>B>+:@?>2U=,]]5[IN7,^C5LB[<MWL?]#O=,BZ7)=\>;Y[??FP?=>O1YEW8<B$;=WH@@@@@@@@
       
   149 >,"%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?=?/?
       
   150 >^_''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
       
   151 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
       
   152 ??[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^
       
   153 =+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''?
       
   154 >/C???K??NK/??[1???#9M?B??3;(IV#/[WD;^_5@@@@;KR]<[10?=Q68[9,8,>W@@@@TU9&;/??9__9:.;/?_#<??/?>?[==?79>_?=<_S9T5M[0,WN7^G*
       
   155 @@@@@@@@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
       
   156 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
       
   157 @@@@@@@@@@@@@@@@@@@@?\*_7*]>3))5/II9+9FF+9> 0;7I5-#-7NO?7^#?8^/?:/G?7NK07>W3@@@@@@@@@@@@@@@@@@@@@@@@?>N;?>N;?=:9?>7T?>#X
       
   158 >^_%=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]
       
   159 !
       
   160 
       
   161 searchNextIcon
       
   162     "This resource specification was automatically generated
       
   163      by the ImageEditor of ST/X."
       
   164 
       
   165     "Do not manually edit this!! If it is corrupted,
       
   166      the ImageEditor may not be able to read the specification."
       
   167 
       
   168     "
       
   169      self searchNextIcon inspect
       
   170      ImageEditor openOnClass:self andSelector:#searchNextIcon
       
   171      Icon flushCachedIcons
       
   172     "
       
   173 
       
   174     <resource: #image>
       
   175 
       
   176     ^Icon
       
   177         constantNamed:#'Psiware::SystemManagement class searchNextIcon'
       
   178         ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
   179 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@
       
   180 @@@@@@AFF XA@PXUQ @@@@@@@@@@@@@@@@@*@Q5G^WX6E0D*@@@@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@A[@U==\F-"VUQOUSLAV0@@@@@@@@@@
       
   181 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
       
   182 ]F$<II&YH3H>N2 H# @@@@@@@@@''GG)*Y2$9NRIDO4DQHP@@@@@@@@@@!!@EP[6U]I"UIQTL.@XP@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@@@@EDA
       
   183 FSQ!!VC@T@UD@@@@@@@@@@@@@@@@@#R,I@PDIJ84@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   184 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
       
   185 !
       
   186 
       
   187 searchPreviousIcon
       
   188     "This resource specification was automatically generated
       
   189      by the ImageEditor of ST/X."
       
   190 
       
   191     "Do not manually edit this!! If it is corrupted,
       
   192      the ImageEditor may not be able to read the specification."
       
   193 
       
   194     "
       
   195      self searchPreviousIcon inspect
       
   196      ImageEditor openOnClass:self andSelector:#searchPreviousIcon
       
   197      Icon flushCachedIcons
       
   198     "
       
   199 
       
   200     <resource: #image>
       
   201 
       
   202     ^Icon
       
   203         constantNamed:#'Psiware::SystemManagement class searchPreviousIcon'
       
   204         ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
   205 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@
       
   206 @@@@@@BMJ0$A@P$+#P@@@@@@@@@@@@@@@@AQ@Q$4XU 0E@EQ@@@@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@BD@UA/YU4&IT%EP28A!!@@@@@@@@@@@
       
   207 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
       
   208 T5JY&Y&Y&Y%RLR4G  @@@@@@@@@_G&4RC08MC@,JDC\SG0@@@@@@@@@@V0E__WA+X%%TS5T3@U,@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@@@@B(A
       
   209 GT]9]#XW@R(@@@@@@@@@@@@@@@@@Q!!(F@PDFETX@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   210 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
       
   211 !
       
   212 
       
   213 searchToolBarIcon
       
   214     "This resource specification was automatically generated
       
   215      by the ImageEditor of ST/X."
       
   216 
       
   217     "Do not manually edit this!! If it is corrupted,
       
   218      the ImageEditor may not be able to read the specification."
       
   219 
       
   220     "
       
   221      self searchToolBarIcon inspect
       
   222      ImageEditor openOnClass:self andSelector:#searchToolBarIcon
       
   223      Icon flushCachedIcons
       
   224     "
       
   225 
       
   226     <resource: #image>
       
   227 
       
   228     ^Icon
       
   229         constantNamed:#'Psiware::SystemManagement class searchToolBarIcon'
       
   230         ifAbsentPut:[(Depth24Image new) width: 22; height: 22; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
       
   231 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   232 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   233 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>4][>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   234 @@@@@@@@@@@@@@@@@@@@@@@@@@@@;>#8/L#+!!:KS!!:KS/,'',;>''9@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2];>^)WH
       
   235 NE:+KU*:J5&9NE6*_I#K4^S>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4][>RV3DLER"SWR6$K#0#;[.SGJ4L5"''UG_N4][>@@@@
       
   236 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*K''\JT*,U6Z7:^S?>/C*;.3,6>C>RFF(KEZ"3-_-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   237 @@@@@@@@@@@@&Z''HFTF &Z7">N#:7NK?7NK?6=W>!!Y''YH4N -+3T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%I>;FDV)#ZWU??''57NK?
       
   238 7NK?:>_?\8WKFCN".K#T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1L;.A#V[O5")3=W;=/[4</W:1,??K$JVI4Z\7-''4@@@@@@@@@@@@
       
   239 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?-,[1E#:&C"ZZH3F U6_EU63FHS^XHS.K JOX7-''4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?
       
   240 ,K_*O5ZTCRBLPU&0FCBHDB&RDR6RH$NI Y#I4][>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?-;#%ND&KC">BYV.*4=;>7.+>-<K!!,K/!!7NK?
       
   241 :^C;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?/K3^PT%<CBI/NE>==O;8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   242 @@@@@@@@@@@@7NK? (J9GB1SZV>W:M3?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5MS&++3H6M/#@@@@
       
   243 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7NK?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   244 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   245 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   246 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   247 @@@@@@@@@@@@@@@@') ; 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]
       
   248 !
       
   249 
       
   250 warningSearchBarIcon
       
   251     "This resource specification was automatically generated
       
   252      by the ImageEditor of ST/X."
       
   253 
       
   254     "Do not manually edit this!! If it is corrupted,
       
   255      the ImageEditor may not be able to read the specification."
       
   256 
       
   257     "
       
   258      self warningSearchBarIcon inspect
       
   259      ImageEditor openOnClass:self andSelector:#warningSearchBarIcon
       
   260      Icon flushCachedIcons
       
   261     "
       
   262 
       
   263     <resource: #image>
       
   264 
       
   265     ^Icon
       
   266         constantNamed:#'Psiware::SystemManagement class warningSearchBarIcon'
       
   267         ifAbsentPut:[(Depth24Image new) width: 22; height: 19; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
       
   268 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?:.+<Y"P??C\@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@>_;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   269 @@@@?]SZ)5]X.6!! -HM2??''*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>39-7*B4H&G>[N+%%MJ>\#A@@@@@@@@
       
   270 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<+R?*U1&?=CN?>W^4HJ@+FY$?>+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   271 @@@@@@@@@@@@@@@@@@@@?>G_)U!!^>Z^->,B><+"4?*^-%C8?;;Z+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@??#1-(E;.65+?<#H
       
   272 ?=_T?=GP?::65W-=(EQF?>WQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?\#D*VAY?;61<;"0;,C@6J^+;*"0>ZN$&CX)6(-:@@@@@@@@
       
   273 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>#+/7Q148E6?<"4<L&:W#(:G@@@392!!48^G9WM(%24_?=WN@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   274 ??C?7Y&$.E5\?;V*=<:8??K_R3X5DP@@4+R49ZZ!!7VIZ/#85)%UR??G/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=7.2&)6=IJQ?;..=]W@??7*PS$7E@,N
       
   275 4<OC?>K^>(M=1S8;)$ID8Y6^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;HNR4U%%<)&S?<^9??_(??;3REEN@P,J2<[C??K/?:R!!/C8?&R(0(T-N?>GZ@@@@
       
   276 @@@@@@@@@@@@@@@@@@@@?<;H,31B3T9U2'')1?L3@?>3&=^7*XWE0@@<M7=;\??S3?=_U46-,#Q(!!$B,/18"A@@@@@@@@@@@@@@@@@@@@??G&1G!!*,S03)SP,
       
   277 3()?>=WL??_:<>33[G:@D2T%;^/,??#8??K19Y6^&R(0!!QPX#S8:;K22@@@@@@@@@@@@@@@@<*RZ+5I@*$D+*T48<[N&?>C_7,+U??3?7N''/(J.-?/+;??W5
       
   278 ;.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@@@@
       
   279 ?>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<=
       
   280 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
       
   281 (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]
    91 ! !
   282 ! !
    92 
   283 
    93 !InternationalLanguageTranslationEditor class methodsFor:'interface specs'!
   284 !InternationalLanguageTranslationEditor class methodsFor:'interface specs'!
    94 
   285 
    95 windowSpec
   286 windowSpec
   113         window: 
   304         window: 
   114        (WindowSpec
   305        (WindowSpec
   115           label: 'InternationalLanguageTranslationEditor'
   306           label: 'InternationalLanguageTranslationEditor'
   116           name: 'InternationalLanguageTranslationEditor'
   307           name: 'InternationalLanguageTranslationEditor'
   117           min: (Point 10 10)
   308           min: (Point 10 10)
   118           bounds: (Rectangle 0 0 778 614)
   309           bounds: (Rectangle 0 0 774 610)
   119           menu: mainMenu
   310           menu: mainMenu
   120         )
   311         )
   121         component: 
   312         component: 
   122        (SpecCollection
   313        (SpecCollection
   123           collection: (
   314           collection: (
   126               layout: (LayoutFrame 0 0 0 0 0 1 30 0)
   317               layout: (LayoutFrame 0 0 0 0 0 1 30 0)
   127               menu: menuToolBar
   318               menu: menuToolBar
   128               textDefault: true
   319               textDefault: true
   129             )
   320             )
   130            (VariableVerticalPanelSpec
   321            (VariableVerticalPanelSpec
   131               name: 'VariableVerticalPanel2'
   322               name: 'TranslationsVariableVerticalPanel'
   132               layout: (LayoutFrame 0 0 30 0 0 1 0 1)
   323               layout: (LayoutFrame 0 0 30 0 0 1 -32 1)
   133               component: 
   324               component: 
   134              (SpecCollection
   325              (SpecCollection
   135                 collection: (
   326                 collection: (
   136                  (DataSetSpec
   327                  (DataSetSpec
   137                     name: 'KeyStringAndLanguageSelectionTable'
   328                     name: 'KeyStringAndLanguageSelectionTable'
   262                   )
   453                   )
   263                  )
   454                  )
   264                
   455                
   265               )
   456               )
   266               handles: (Any 0.5 1.0)
   457               handles: (Any 0.5 1.0)
       
   458               postBuildCallback: postBuildTranslationsPanel:
       
   459             )
       
   460            (ViewSpec
       
   461               name: 'SearchBox'
       
   462               layout: (LayoutFrame 0 0 -32 1 0 1 0 1)
       
   463               level: -1
       
   464               visibilityChannel: searchBoxVisible
       
   465               component: 
       
   466              (SpecCollection
       
   467                 collection: (
       
   468                  (ActionButtonSpec
       
   469                     label: 'closeSearchBarIcon'
       
   470                     name: 'closeSearchBarButton'
       
   471                     layout: (LayoutFrame 4 0 5 0 25 0 26 0)
       
   472                     hasCharacterOrientedLabel: false
       
   473                     translateLabel: true
       
   474                     model: closeSearchBar
       
   475                   )
       
   476                  (LabelSpec
       
   477                     label: 'Search:'
       
   478                     name: 'SearchLabel'
       
   479                     layout: (LayoutFrame 30 0 5 0 81 0 27 0)
       
   480                     translateLabel: true
       
   481                     adjust: right
       
   482                   )
       
   483                  (InputFieldSpec
       
   484                     name: 'SearchEntryField'
       
   485                     layout: (LayoutFrame 87 0 5 0 244 0 27 0)
       
   486                     model: searchTextHolder
       
   487                     immediateAccept: true
       
   488                     acceptOnReturn: true
       
   489                     acceptOnTab: true
       
   490                     acceptOnLostFocus: true
       
   491                     modifiedChannel: searchTextModifiedHolder
       
   492                     acceptOnPointerLeave: false
       
   493                     postBuildCallback: postBuildSearchTextView:
       
   494                   )
       
   495                  (ActionButtonSpec
       
   496                     label: 'searchNextIcon'
       
   497                     name: 'SearchNextButton'
       
   498                     layout: (LayoutFrame 251 0 5 0 272 0 26 0)
       
   499                     hasCharacterOrientedLabel: false
       
   500                     translateLabel: true
       
   501                     model: searchNextText
       
   502                   )
       
   503                  (ActionButtonSpec
       
   504                     label: 'searchPreviousIcon'
       
   505                     name: 'searchPreviousButton'
       
   506                     layout: (LayoutFrame 279 0 5 0 300 0 26 0)
       
   507                     hasCharacterOrientedLabel: false
       
   508                     translateLabel: true
       
   509                     model: searchPreviousText
       
   510                   )
       
   511                  (CheckBoxSpec
       
   512                     label: 'Ignore case'
       
   513                     name: 'IgnoreCaseCheckBox'
       
   514                     layout: (LayoutFrame 309 0 5 0 434 0 27 0)
       
   515                     model: ignoreCaseHolder
       
   516                     translateLabel: true
       
   517                   )
       
   518                  (LabelSpec
       
   519                     label: 'SearchBarImageInfoLabel'
       
   520                     name: 'SearchBarImageInfoLabel'
       
   521                     layout: (LayoutFrame 436 0 5 0 460 0 27 0)
       
   522                     hasCharacterOrientedLabel: false
       
   523                     translateLabel: true
       
   524                     labelChannel: searchBarImageInfoLabelHolder
       
   525                   )
       
   526                  (LabelSpec
       
   527                     label: 'SearchBarInfoLabel'
       
   528                     name: 'SearchBarInfoLabel'
       
   529                     layout: (LayoutFrame 463 0 5 0 741 0 27 0)
       
   530                     translateLabel: true
       
   531                     labelChannel: searchBarInfoLabelHolder
       
   532                     adjust: left
       
   533                   )
       
   534                  )
       
   535                
       
   536               )
       
   537               postBuildCallback: postBuildSearchBoxView:
   267             )
   538             )
   268            )
   539            )
   269          
   540          
   270         )
   541         )
   271       )
   542       )
   289 
   560 
   290     ^ 
   561     ^ 
   291      #(Menu
   562      #(Menu
   292         (
   563         (
   293          (MenuItem
   564          (MenuItem
   294             label: 'Current NameSpace:'
   565             label: 'Set Current NameSpace'
   295             itemValue: changeLastNameSpace
   566             itemValue: changeLastNameSpace
   296             translateLabel: true
   567             translateLabel: true
   297           )
   568           )
   298          (MenuItem
   569          (MenuItem
   299             label: 'Search String in Current NameSpace:'
   570             label: 'Search String in Current NameSpace'
   300             itemValue: searchStringInLastNameSpace
   571             itemValue: searchStringInLastNameSpace
   301             translateLabel: true
   572             translateLabel: true
       
   573           )
       
   574          (MenuItem
       
   575             label: '-'
       
   576             isVisible: #false
       
   577           )
       
   578          (MenuItem
       
   579             label: 'Set Current Package'
       
   580             itemValue: changeLastPackage
       
   581             translateLabel: true
       
   582             isVisible: #false
       
   583           )
       
   584          (MenuItem
       
   585             label: 'Search String in Current Package'
       
   586             itemValue: searchStringInLastPackage
       
   587             translateLabel: true
       
   588             isVisible: #false
   302           )
   589           )
   303          )
   590          )
   304         nil
   591         nil
   305         nil
   592         nil
   306       )
   593       )
   362                 )
   649                 )
   363                (MenuItem
   650                (MenuItem
   364                   label: '-'
   651                   label: '-'
   365                 )
   652                 )
   366                (MenuItem
   653                (MenuItem
   367                   label: 'Current NameSpace:'
   654                   label: 'Import existing tranlations from file...'
       
   655                   itemValue: importExistingTranslationsFromFile
       
   656                   translateLabel: true
       
   657                 )
       
   658                (MenuItem
       
   659                   label: '-'
       
   660                 )
       
   661                (MenuItem
       
   662                   label: 'Set Current NameSpace'
   368                   itemValue: changeLastNameSpace
   663                   itemValue: changeLastNameSpace
   369                   translateLabel: true
   664                   translateLabel: true
       
   665                 )
       
   666                (MenuItem
       
   667                   label: 'Set Current Package'
       
   668                   itemValue: changeLastPackage
       
   669                   translateLabel: true
       
   670                   isVisible: #false
   370                 )
   671                 )
   371                (MenuItem
   672                (MenuItem
   372                   label: '-'
   673                   label: '-'
   373                 )
   674                 )
   374                (MenuItem
   675                (MenuItem
   597             itemValue: removeTranslation
   898             itemValue: removeTranslation
   598             translateLabel: true
   899             translateLabel: true
   599             labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
   900             labelImage: (ResourceRetriever XPToolbarIconLibrary removeRowIcon)
   600           )
   901           )
   601          (MenuItem
   902          (MenuItem
       
   903             label: '-'
       
   904           )
       
   905          (MenuItem
       
   906             label: 'Search'
       
   907             itemValue: search
       
   908             translateLabel: true
       
   909             shortcutKey: Ctrlf
       
   910             labelImage: (ResourceRetriever #'Tools::InternationalLanguageTranslationEditor' searchToolBarIcon)
       
   911           )
       
   912          (MenuItem
   602             label: ''
   913             label: ''
   603           )
   914           )
   604          (MenuItem
   915          (MenuItem
   605             label: 'Stop Application'
   916             label: 'Stop Application'
   606             itemValue: stopApplication
   917             itemValue: stopApplication
   664       )
   975       )
   665 ! !
   976 ! !
   666 
   977 
   667 !InternationalLanguageTranslationEditor methodsFor:'accessing'!
   978 !InternationalLanguageTranslationEditor methodsFor:'accessing'!
   668 
   979 
       
   980 currentSelectionIndex 
       
   981 
       
   982     ^ self selectedKeyRow value
       
   983 
       
   984     "Created: / 16-06-2007 / 09:04:11 / Administrador"
       
   985     "Modified: / 19-06-2007 / 17:28:38 / Administrador"
       
   986 !
       
   987 
       
   988 exists: anObject
       
   989 
       
   990     ^self objectsList includes: anObject
       
   991 
       
   992     "Created: / 19-06-2007 / 16:42:22 / Administrador"
       
   993 !
       
   994 
       
   995 indexOf: anObject
       
   996 
       
   997     ^self objectsList indexOf: anObject
       
   998 
       
   999     "Created: / 19-06-2007 / 16:39:44 / Administrador"
       
  1000 !
       
  1001 
   669 newLanguageText
  1002 newLanguageText
   670 "/   languageEditor accept
  1003 "/   languageEditor accept
   671     ^self languageTextHolder value isNil 
  1004     ^self languageTextHolder value isNil 
   672         ifTrue:['']
  1005         ifTrue:['']
   673         ifFalse:[self languageTextHolder value asCollectionOfLines first.]
  1006         ifFalse:[self languageTextHolder value asCollectionOfLines first.]
   674 !
  1007 !
   675 
  1008 
       
  1009 objectsList
       
  1010 
       
  1011     ^ keyStringsToLanguageMappings 
       
  1012 !
       
  1013 
       
  1014 selectListIndex: rowIndex
       
  1015 "/    |selection list|
       
  1016 "/    list := self objectsList.
       
  1017 "/    list isEmpty ifTrue:[^self].
       
  1018 "/    selection := list at:rowIndex ifAbsent:nil.
       
  1019     self selectedKeyRow value: rowIndex.
       
  1020 
       
  1021     "Created: / 16-06-2007 / 09:06:46 / Administrador"
       
  1022     "Modified: / 22-06-2007 / 13:45:54 / Administrador"
       
  1023 !
       
  1024 
   676 selectedKey  
  1025 selectedKey  
   677    "Returns the current selected key if there is one row seleted. Otherwise, returns nil"
  1026    "Returns the current selected key if there is one row seleted. Otherwise, returns nil"
   678      |rowSelectionIndex |
  1027      |rowSelectionIndex |
   679 
  1028 
   680     keyStringsToLanguageMappings isNil ifTrue:[^nil].
  1029     keyStringsToLanguageMappings isNil ifTrue:[^nil].
   681     self selectedKeyRow value isNil ifTrue:[^nil].
  1030     self selectedKeyRow value isNil ifTrue:[^nil].
   682     rowSelectionIndex := self selectedKeyRow value.
  1031     rowSelectionIndex := self selectedKeyRow value.
   683     rowSelectionIndex == 0 ifTrue:[^nil].
  1032     rowSelectionIndex == 0 ifTrue:[^nil].
   684     ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex.
  1033     ^ keyStringsToLanguageMappings keyAt:rowSelectionIndex.
       
  1034 !
       
  1035 
       
  1036 tableView
       
  1037 
       
  1038     ^dataSetView scrolledView
       
  1039 
       
  1040     "Created: / 15-06-2007 / 18:59:51 / Administrador"
   685 ! !
  1041 ! !
   686 
  1042 
   687 !InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'!
  1043 !InternationalLanguageTranslationEditor methodsFor:'additionalFuncionalities'!
   688 
  1044 
   689 searchForSimilarTranslation
  1045 searchForSimilarTranslation
   690     "Looks for a quite similar translation for the key and display a dialog with available options"
  1046     "Looks for a quite similar translation for the key and display a dialog with available options"
   691     |similarTranslationsAssociations selectedTranslation|
  1047     |similarTranslationsAssociations selectedTranslation key|
   692 
  1048 
   693     self shouldSearchForSimilarTranslation ifFalse:[^self]. 
  1049     self shouldSearchForSimilarTranslation ifFalse:[^self]. 
   694 
  1050 
   695     similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: self selectedKey in: self currentLanguage.
  1051     key := self selectedKey.
       
  1052     key isNil ifTrue:[^ self.].
       
  1053     similarTranslationsAssociations := keyStringsToLanguageMappings searchForSimilarTranslation: key in: self currentLanguage.
   696     similarTranslationsAssociations isEmpty ifTrue:[^self].    
  1054     similarTranslationsAssociations isEmpty ifTrue:[^self].    
   697 
  1055 
   698     similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
  1056     similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
   699         collection detect:[:selectedAssociation |
  1057         collection detect:[:selectedAssociation |
   700             selectedAssociation value sameAs: association value] ifNone:[collection add: association].
  1058             selectedAssociation value sameAs: association value] ifNone:[collection add: association].
   701         collection].
  1059         collection].
   702     selectedTranslation := Dialog 
  1060     selectedTranslation := Dialog 
   703         choose:'Choose one if you consider it´s usefull to translate: 
  1061         choose:'Choose one if you consider it´s usefull to translate: 
   704     ', 
  1062     ', 
   705         '<', self selectedKey, '>  ', (self currentExampleLanguageText ifNil:[''])
  1063         '<', key, '>  ', (self currentExampleLanguageText ifNil:[''])
   706         fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
  1064         fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
   707         values: (similarTranslationsAssociations collect:[:each | each value])
  1065         values: (similarTranslationsAssociations collect:[:each | each value])
   708         lines:10
  1066         lines:10
   709         cancel: nil.      
  1067         cancel: nil.      
   710 
  1068 
   734 exampleLanguageTextHolder
  1092 exampleLanguageTextHolder
   735     exampleLanguageTextHolder isNil ifTrue:[
  1093     exampleLanguageTextHolder isNil ifTrue:[
   736         exampleLanguageTextHolder := '' asValue.
  1094         exampleLanguageTextHolder := '' asValue.
   737     ].
  1095     ].
   738     ^ exampleLanguageTextHolder.
  1096     ^ exampleLanguageTextHolder.
       
  1097 !
       
  1098 
       
  1099 ignoreCaseHolder
       
  1100 
       
  1101     ignoreCaseHolder isNil ifTrue:[
       
  1102         ignoreCaseHolder := false asValue.
       
  1103 "/ if your app needs to be notified of changes, uncomment one of the lines below:
       
  1104 "/       ignoreCaseHolder addDependent:self.
       
  1105         ignoreCaseHolder onChangeSend:#ignoreCaseHolderChanged to:self.
       
  1106 
       
  1107     ].
       
  1108     ^ ignoreCaseHolder.
       
  1109 
       
  1110     "Created: / 16-06-2007 / 06:45:04 / Administrador"
       
  1111     "Modified: / 16-06-2007 / 19:32:15 / Administrador"
   739 !
  1112 !
   740 
  1113 
   741 keyStringAndLanguageSelectionTable
  1114 keyStringAndLanguageSelectionTable
   742     keyStringsToLanguageMappings isNil ifTrue:[
  1115     keyStringsToLanguageMappings isNil ifTrue:[
   743         keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
  1116         keyStringsToLanguageMappings := KeyStringsToLanguageMappings new.
   831 pastePreviousTranslationEnableHolder
  1204 pastePreviousTranslationEnableHolder
   832    pastePreviousTranslationEnableHolder isNil ifTrue:[pastePreviousTranslationEnableHolder := false asValue]. 
  1205    pastePreviousTranslationEnableHolder isNil ifTrue:[pastePreviousTranslationEnableHolder := false asValue]. 
   833     ^ pastePreviousTranslationEnableHolder
  1206     ^ pastePreviousTranslationEnableHolder
   834 !
  1207 !
   835 
  1208 
       
  1209 searchBarImageInfoLabelHolder
       
  1210 
       
  1211     searchBarImageInfoLabelHolder isNil ifTrue:[
       
  1212         searchBarImageInfoLabelHolder := nil asValue .
       
  1213     ].
       
  1214     ^ searchBarImageInfoLabelHolder.
       
  1215 
       
  1216     "Created: / 16-06-2007 / 10:06:28 / Administrador"
       
  1217 !
       
  1218 
       
  1219 searchBarInfoLabelHolder
       
  1220 
       
  1221     searchBarInfoLabelHolder isNil ifTrue:[
       
  1222         searchBarInfoLabelHolder := '' asValue .
       
  1223     ].
       
  1224     ^ searchBarInfoLabelHolder.
       
  1225 
       
  1226     "Created: / 16-06-2007 / 06:20:49 / Administrador"
       
  1227 !
       
  1228 
       
  1229 searchBoxVisible
       
  1230 
       
  1231     searchBoxVisible isNil ifTrue:[
       
  1232         searchBoxVisible := false asValue.
       
  1233     ].
       
  1234     ^ searchBoxVisible.
       
  1235 
       
  1236     "Created: / 15-06-2007 / 18:15:52 / Administrador"
       
  1237 !
       
  1238 
   836 searchForSimilarTranslationEnableHolder
  1239 searchForSimilarTranslationEnableHolder
   837    searchForSimilarTranslationEnableHolder isNil 
  1240    searchForSimilarTranslationEnableHolder isNil 
   838         ifTrue:[searchForSimilarTranslationEnableHolder := true asValue]. 
  1241         ifTrue:[searchForSimilarTranslationEnableHolder := true asValue]. 
   839     ^ searchForSimilarTranslationEnableHolder
  1242     ^ searchForSimilarTranslationEnableHolder
       
  1243 !
       
  1244 
       
  1245 searchTextHolder
       
  1246 
       
  1247     searchTextHolder isNil ifTrue:[
       
  1248         searchTextHolder := ValueHolder new.
       
  1249 "/ if your app needs to be notified of changes, uncomment one of the lines below:
       
  1250 "/       userSelectedHolder addDependent:self.
       
  1251 "/       userSelectedHolder onChangeSend:#searchTextHolderChanged to:self.
       
  1252     ].
       
  1253     ^ searchTextHolder.
       
  1254 
       
  1255     "Created: / 15-06-2007 / 18:06:08 / Administrador"
       
  1256 !
       
  1257 
       
  1258 searchTextModifiedHolder
       
  1259 
       
  1260     searchTextModifiedHolder isNil ifTrue:[
       
  1261         searchTextModifiedHolder := false asValue .
       
  1262 "/ if your app needs to be notified of changes, uncomment one of the lines below:
       
  1263 "/       searchTextModifiedHolder addDependent:self.
       
  1264        searchTextModifiedHolder onChangeSend:#searchTextModifiedHolderChanged to:self.
       
  1265     ].
       
  1266     ^ searchTextModifiedHolder.
       
  1267 
       
  1268     "Created: / 15-06-2007 / 18:07:19 / Administrador"
   840 !
  1269 !
   841 
  1270 
   842 selectedKeyRow
  1271 selectedKeyRow
   843     selectedKeyRow isNil ifTrue:[
  1272     selectedKeyRow isNil ifTrue:[
   844         selectedKeyRow := ValueHolder new.
  1273         selectedKeyRow := ValueHolder new.
  1019     keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
  1448     keyStringsToLanguageMappings atLanguage: lang putFilename: aFilename.
  1020     ^aFilename asFilename
  1449     ^aFilename asFilename
  1021 !
  1450 !
  1022 
  1451 
  1023 requestLanguage
  1452 requestLanguage
       
  1453 
       
  1454     ^ Dialog choose:'For which language ?' fromList:languagesList lines:10.
       
  1455 !
       
  1456 
       
  1457 requestLanguageToSave
  1024     ^ Dialog 
  1458     ^ Dialog 
  1025         choose:'Which language do you want to save?'
  1459         choose:'Which language do you want to save?'
  1026         fromList:languagesList
  1460         fromList:languagesList
  1027         lines:10
  1461         lines:10
       
  1462 ! !
       
  1463 
       
  1464 !InternationalLanguageTranslationEditor methodsFor:'images'!
       
  1465 
       
  1466 restartSearchBarIcon
       
  1467 
       
  1468     ^ self class restartSearchBarIcon
       
  1469 !
       
  1470 
       
  1471 warningSearchBarIcon
       
  1472 
       
  1473     ^ self class warningSearchBarIcon
  1028 ! !
  1474 ! !
  1029 
  1475 
  1030 !InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
  1476 !InternationalLanguageTranslationEditor methodsFor:'initialization & release'!
  1031 
  1477 
  1032 closeRequest
  1478 closeRequest
  1056 postBuildDataSet:aView
  1502 postBuildDataSet:aView
  1057     dataSetView := aView.
  1503     dataSetView := aView.
  1058     aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
  1504     aView selectedColIndexHolder onChangeSend:#selectionChanged to:self.
  1059 ! !
  1505 ! !
  1060 
  1506 
       
  1507 !InternationalLanguageTranslationEditor methodsFor:'initialize'!
       
  1508 
       
  1509 postBuildSearchBoxView: aBoxView
       
  1510 
       
  1511     searchBoxView := aBoxView
       
  1512 
       
  1513     "Created: / 15-06-2007 / 18:02:38 / Administrador"
       
  1514 !
       
  1515 
       
  1516 postBuildSearchTextView: anEditFieldView
       
  1517 
       
  1518     searchTextView := anEditFieldView
       
  1519 
       
  1520     "Created: / 15-06-2007 / 18:17:15 / Administrador"
       
  1521 !
       
  1522 
       
  1523 postBuildTranslationsPanel: aPanel
       
  1524 
       
  1525     translationsPanel := aPanel
       
  1526 !
       
  1527 
       
  1528 postBuildWith:aBuilder
       
  1529 
       
  1530     super postBuildWith:aBuilder.
       
  1531     self updateToolVisibility.
       
  1532 ! !
       
  1533 
  1061 !InternationalLanguageTranslationEditor methodsFor:'menu actions'!
  1534 !InternationalLanguageTranslationEditor methodsFor:'menu actions'!
  1062 
  1535 
  1063 addLanguage
  1536 addLanguage
  1064     |lang|
  1537     |lang|
  1065 
  1538 
  1094     lastNameSpace notNil ifTrue:[defaultNameSpace := lastNameSpace name].
  1567     lastNameSpace notNil ifTrue:[defaultNameSpace := lastNameSpace name].
  1095     nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Search String in Name Space:' initialAnswer:defaultNameSpace.
  1568     nameSpace := Dialog requestNameSpace:'NameSpace:' title:'Search String in Name Space:' initialAnswer:defaultNameSpace.
  1096     nameSpace isNil ifTrue:[^self].
  1569     nameSpace isNil ifTrue:[^self].
  1097     nameSpace := Smalltalk at:nameSpace asSymbol.
  1570     nameSpace := Smalltalk at:nameSpace asSymbol.
  1098     nameSpace isNil ifTrue:[
  1571     nameSpace isNil ifTrue:[
  1099         ^Dialog information:(resources string:'No such nameSpace exists.?') 
  1572         ^Dialog information:(resources string:'No such nameSpace exists.') 
  1100     ].
  1573     ].
  1101     lastNameSpace := nameSpace.
  1574     lastNameSpace := nameSpace.
       
  1575 !
       
  1576 
       
  1577 changeLastPackage
       
  1578 
       
  1579     |package defaultPackage|
       
  1580 
       
  1581     lastPackage notNil ifTrue:[defaultPackage := lastPackage].
       
  1582     package := Dialog
       
  1583             requestProject:'Package:'
       
  1584             initialAnswer:defaultPackage 
       
  1585             suggestions:#('foo' 'bar' 'baz').
       
  1586     package isNil ifTrue:[
       
  1587         ^Dialog information:(resources string:'No such package exists.') 
       
  1588     ].
       
  1589     lastPackage := package.
  1102 !
  1590 !
  1103 
  1591 
  1104 extractTranslationsFromClass
  1592 extractTranslationsFromClass
  1105     |aClass newTranslations|
  1593     |aClass newTranslations|
  1106 
  1594 
  1157             newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
  1645             newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
  1158         ]
  1646         ]
  1159     ].
  1647     ].
  1160 
  1648 
  1161     self addAllTranslations:newTranslations.
  1649     self addAllTranslations:newTranslations.
       
  1650 !
       
  1651 
       
  1652 importExistingTranslationsFromFile
  1162 !
  1653 !
  1163 
  1654 
  1164 inspectCanvasMissingStrings
  1655 inspectCanvasMissingStrings
  1165 
  1656 
  1166     |spec nameSpace missingStrings|
  1657     |spec nameSpace missingStrings|
  1217 
  1708 
  1218 menuSave
  1709 menuSave
  1219 "Saves the language selected in the fileName from where the language resource was obtained."
  1710 "Saves the language selected in the fileName from where the language resource was obtained."
  1220     |lang|
  1711     |lang|
  1221 
  1712 
  1222     lang := self requestLanguage.
  1713     lang := self requestLanguageToSave.
  1223     lang isNil ifTrue:[^ self].
  1714     lang isNil ifTrue:[^ self].
  1224     self saveLanguage: lang
  1715     self saveLanguage: lang
  1225 !
  1716 !
  1226 
  1717 
  1227 menuSaveAll
  1718 menuSaveAll
  1231 
  1722 
  1232 menuSaveAs
  1723 menuSaveAs
  1233 "Saves the language selected in the specified fileName."
  1724 "Saves the language selected in the specified fileName."
  1234      |lang aFilename|
  1725      |lang aFilename|
  1235 
  1726 
  1236     lang := self requestLanguage.
  1727     lang := self requestLanguageToSave.
  1237     lang isNil ifTrue:[^ self]. 
  1728     lang isNil ifTrue:[^ self]. 
  1238     aFilename := self requestFilenameFor:lang.
  1729     aFilename := self requestFilenameFor:lang.
  1239     aFilename isNil ifTrue:[^ self].
  1730     aFilename isNil ifTrue:[^ self].
  1240     self saveResourceFile:aFilename for:lang asSymbol
  1731     self saveResourceFile:aFilename for:lang asSymbol
  1241 !
  1732 !
  1263 !
  1754 !
  1264 
  1755 
  1265 readResourceFile:aFilename
  1756 readResourceFile:aFilename
  1266     |lang|
  1757     |lang|
  1267 
  1758 
  1268     lang := Dialog choose:'For which language ?' fromList:languagesList lines:10.
  1759     lang := self requestLanguage.
  1269     lang isNil ifTrue:[^ self ].
  1760     lang isNil ifTrue:[^ self ].
  1270 
  1761 
  1271     self readResourceFile:aFilename asLanguage:lang asSymbol
  1762     self readResourceFile:aFilename asLanguage:lang asSymbol
  1272 !
  1763 !
  1273 
  1764 
  1365     browser allButOpen.
  1856     browser allButOpen.
  1366     lastSearchPatterns := browser lastSearchPatterns.
  1857     lastSearchPatterns := browser lastSearchPatterns.
  1367     (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[
  1858     (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[
  1368         browser lastSearchPatterns addFirst: selectedKey
  1859         browser lastSearchPatterns addFirst: selectedKey
  1369     ].
  1860     ].
       
  1861     SearchDialog lastStringSearchArea: #currentNameSpace.
  1370     lastNameSpace isNil ifTrue:[
  1862     lastNameSpace isNil ifTrue:[
  1371         self changeLastNameSpace.
  1863         self changeLastNameSpace.
  1372     ].
  1864     ].
  1373     lastNameSpace notNil ifTrue:[
  1865     lastNameSpace notNil ifTrue:[
  1374 "/        browser navigationState selectedClasses value: lastNameSpace allClasses.
  1866 "/        browser navigationState selectedClasses value: lastNameSpace allClasses.
  1375         browser navigationState nameSpaceFilter value: (OrderedCollection with:lastNameSpace name).
  1867         browser navigationState nameSpaceFilter value: (OrderedCollection with:lastNameSpace name).
  1376         browser navigationState selectedNamespaces value: (OrderedCollection with:lastNameSpace name).
  1868         browser navigationState selectedNamespaces value: (OrderedCollection with:lastNameSpace name).
       
  1869     ].
       
  1870     self withWaitCursorDo:[
       
  1871         browser browseMenuMethodsWithString
       
  1872     ].
       
  1873 !
       
  1874 
       
  1875 searchStringInLastPackage
       
  1876 
       
  1877     | selectedKey browser lastSearchPatterns|
       
  1878 
       
  1879     selectedKey := self selectedKey.
       
  1880     selectedKey isNil ifTrue:[^Dialog information: 'No selected key'].
       
  1881     browser := NewSystemBrowser new "open".
       
  1882     browser allButOpen.
       
  1883     lastSearchPatterns := browser lastSearchPatterns.
       
  1884     (lastSearchPatterns notNil and:[lastSearchPatterns first ~= selectedKey]) ifTrue:[
       
  1885         browser lastSearchPatterns addFirst: selectedKey
       
  1886     ].
       
  1887     SearchDialog lastStringSearchArea: #currentPackage.
       
  1888     lastPackage isNil ifTrue:[
       
  1889         self changeLastPackage.
       
  1890     ].
       
  1891     lastPackage notNil ifTrue:[
       
  1892 "/        browser navigationState selectedClasses value: lastNameSpace allClasses.
       
  1893         browser navigationState packageFilter value: (OrderedCollection with:lastPackage).
       
  1894         browser navigationState selectedProjects value: (OrderedCollection with:lastPackage).
  1377     ].
  1895     ].
  1378     self withWaitCursorDo:[
  1896     self withWaitCursorDo:[
  1379         browser browseMenuMethodsWithString
  1897         browser browseMenuMethodsWithString
  1380     ].
  1898     ].
  1381 ! !
  1899 ! !
  1887     aStream flush;
  2405     aStream flush;
  1888             close.
  2406             close.
  1889     DialogBox information: 'The resource file for the language ', lang printString storeString, ' was saved in the file: ', aFilename nameString
  2407     DialogBox information: 'The resource file for the language ', lang printString storeString, ' was saved in the file: ', aFilename nameString
  1890 ! !
  2408 ! !
  1891 
  2409 
       
  2410 !InternationalLanguageTranslationEditor methodsFor:'searching'!
       
  2411 
       
  2412 ignoreCaseHolderChanged
       
  2413 
       
  2414     self searchNextTextIncludingCurrentSelection: true.
       
  2415 
       
  2416     "Created: / 16-06-2007 / 09:33:33 / Administrador"
       
  2417 !
       
  2418 
       
  2419 searchNextText
       
  2420 
       
  2421     self searchNextTextIncludingCurrentSelection: false.
       
  2422 
       
  2423     "Modified: / 16-06-2007 / 09:21:14 / Administrador"
       
  2424 !
       
  2425 
       
  2426 searchNextTextFromBeginning
       
  2427     |searchText rowFoundIndex|
       
  2428 
       
  2429     searchText := searchTextView contents.
       
  2430     searchText isEmptyOrNil ifTrue:[^self].
       
  2431     self objectsList isEmpty ifTrue:[^self].
       
  2432     rowFoundIndex := self tableView findFirstRowWithString: searchText 
       
  2433                 from:1
       
  2434                 to:self objectsList size
       
  2435                 ignoreCase:self ignoreCaseHolder value.
       
  2436     rowFoundIndex isNil ifTrue:[
       
  2437         self searchTextNotFound.
       
  2438         ^self
       
  2439     ].
       
  2440     self selectListIndex: rowFoundIndex
       
  2441 
       
  2442     "Created: / 16-06-2007 / 10:54:51 / Administrador"
       
  2443     "Modified: / 19-06-2007 / 15:38:59 / Administrador"
       
  2444 !
       
  2445 
       
  2446 searchNextTextIncludingCurrentSelection: includeCurrentSelection
       
  2447     |searchText currentSelectionIndex rowFoundIndex fromIndex listSize|
       
  2448 
       
  2449     self searchTextStarted.
       
  2450     searchText := searchTextView contents.
       
  2451     searchText isEmptyOrNil ifTrue:[^self].
       
  2452     self objectsList isEmpty ifTrue:[^self].
       
  2453     currentSelectionIndex := self currentSelectionIndex.
       
  2454     (currentSelectionIndex isNil or:[currentSelectionIndex == 0]) ifTrue:[
       
  2455         self searchNextTextFromBeginning.
       
  2456         ^self.
       
  2457     ].
       
  2458     listSize := self objectsList size.
       
  2459     (currentSelectionIndex == listSize and:[includeCurrentSelection not]) ifTrue:[
       
  2460         self searchNextTextReachEnd.
       
  2461         ^self.
       
  2462     ].
       
  2463     fromIndex := includeCurrentSelection
       
  2464         ifTrue:[currentSelectionIndex]
       
  2465         ifFalse:[currentSelectionIndex + 1].
       
  2466     rowFoundIndex := self tableView findFirstRowWithString: searchText 
       
  2467                 from:fromIndex
       
  2468                 to:listSize
       
  2469                 ignoreCase:self ignoreCaseHolder value.
       
  2470     rowFoundIndex isNil ifTrue:[
       
  2471         self searchNextTextReachEnd.
       
  2472         ^self
       
  2473     ].
       
  2474     self selectListIndex: rowFoundIndex
       
  2475 
       
  2476     "Created: / 16-06-2007 / 09:20:57 / Administrador"
       
  2477     "Modified: / 19-06-2007 / 15:38:06 / Administrador"
       
  2478 !
       
  2479 
       
  2480 searchNextTextReachEnd
       
  2481     |message|
       
  2482     message := 'End of list reached, starting from the beginning'.
       
  2483     self searchTextRestarted: message.
       
  2484     self searchNextTextFromBeginning.
       
  2485 
       
  2486     "Created: / 16-06-2007 / 11:00:59 / Administrador"
       
  2487 !
       
  2488 
       
  2489 searchPreviousText
       
  2490 
       
  2491     |searchText currentSelectionIndex rowFoundIndex fromIndex|
       
  2492 
       
  2493     self searchTextStarted.
       
  2494     searchText := searchTextView contents.
       
  2495     searchText isEmptyOrNil ifTrue:[^self].
       
  2496     self objectsList isEmpty ifTrue:[^self].
       
  2497     currentSelectionIndex := self currentSelectionIndex.
       
  2498     currentSelectionIndex == 1 ifTrue:[
       
  2499         self searchPreviousTextReachBeginning.
       
  2500         ^self.
       
  2501     ].
       
  2502     (currentSelectionIndex isNil or:[currentSelectionIndex == 0])
       
  2503         ifTrue:[
       
  2504             self searchPreviousTextFromEnd.
       
  2505             ^self.
       
  2506         ]
       
  2507         ifFalse:[fromIndex := currentSelectionIndex - 1].
       
  2508     rowFoundIndex := self tableView findFirstRowWithString: searchText 
       
  2509                 from: fromIndex
       
  2510                 to: 1
       
  2511                 by: -1
       
  2512                 ignoreCase:self ignoreCaseHolder value.
       
  2513     rowFoundIndex isNil ifTrue:[
       
  2514         self searchPreviousTextReachBeginning.
       
  2515         ^self
       
  2516     ].
       
  2517     self selectListIndex: rowFoundIndex.
       
  2518 
       
  2519     "Modified: / 19-06-2007 / 15:38:16 / Administrador"
       
  2520 !
       
  2521 
       
  2522 searchPreviousTextFromEnd
       
  2523 
       
  2524     |searchText rowFoundIndex|
       
  2525 
       
  2526     searchText := searchTextView contents.
       
  2527     searchText isEmptyOrNil ifTrue:[^self].
       
  2528     self objectsList isEmpty ifTrue:[^self].
       
  2529     rowFoundIndex := self tableView findFirstRowWithString: searchText 
       
  2530                 from: self objectsList size
       
  2531                 to: 1
       
  2532                 by: -1
       
  2533                 ignoreCase:self ignoreCaseHolder value.
       
  2534     rowFoundIndex isNil ifTrue:[
       
  2535         self searchTextNotFound.
       
  2536         ^self
       
  2537     ].
       
  2538     self selectListIndex: rowFoundIndex.
       
  2539 
       
  2540     "Created: / 16-06-2007 / 10:55:43 / Administrador"
       
  2541     "Modified: / 19-06-2007 / 15:38:26 / Administrador"
       
  2542 !
       
  2543 
       
  2544 searchPreviousTextReachBeginning
       
  2545     |message|
       
  2546     message := 'Beginning of list reached, starting from the end'.
       
  2547     self searchTextRestarted: message.
       
  2548     self searchPreviousTextFromEnd.
       
  2549 
       
  2550     "Created: / 16-06-2007 / 11:01:23 / Administrador"
       
  2551 !
       
  2552 
       
  2553 searchTextModifiedHolderChanged
       
  2554 
       
  2555     self searchNextTextIncludingCurrentSelection: true.
       
  2556     self searchTextModifiedHolder setValue: false.
       
  2557 
       
  2558 "/Transcript showCR: 'searchTextModifiedHolderChanged: ',(self searchTextHolder value ? '').
       
  2559 "/Transcript showCR: 'searchTextView contents: ',(searchTextView contents ? '').
       
  2560 
       
  2561     "Created: / 15-06-2007 / 18:07:57 / Administrador"
       
  2562     "Modified: / 16-06-2007 / 09:21:27 / Administrador"
       
  2563 !
       
  2564 
       
  2565 searchTextNotFound
       
  2566 
       
  2567     self selectListIndex: 0.
       
  2568     self searchBarImageInfoLabelHolder value: self warningSearchBarIcon.
       
  2569     self searchBarInfoLabelHolder value: 'Text not found'.
       
  2570     self setSearchTextNotFoundColors.
       
  2571 
       
  2572     "Created: / 16-06-2007 / 06:51:01 / Administrador"
       
  2573     "Modified: / 16-06-2007 / 11:43:53 / Administrador"
       
  2574 !
       
  2575 
       
  2576 searchTextRestarted: message
       
  2577 
       
  2578     self searchBarImageInfoLabelHolder value: self restartSearchBarIcon.
       
  2579     self searchBarInfoLabelHolder value: message.
       
  2580 "/    self setSearchTextNotFoundColors.
       
  2581 
       
  2582     "Created: / 16-06-2007 / 11:02:06 / Administrador"
       
  2583 !
       
  2584 
       
  2585 searchTextStarted
       
  2586 
       
  2587     self searchBarImageInfoLabelHolder value: nil.
       
  2588     self searchBarInfoLabelHolder value: ''.
       
  2589     self setSearchTextFoundColors.
       
  2590 
       
  2591     "Created: / 16-06-2007 / 06:54:03 / Administrador"
       
  2592     "Modified: / 16-06-2007 / 10:07:06 / Administrador"
       
  2593 !
       
  2594 
       
  2595 setSearchTextFoundColors
       
  2596 
       
  2597     searchTextView foregroundColor: Color black.
       
  2598     searchTextView backgroundColor: Color white.
       
  2599 
       
  2600     "Created: / 16-06-2007 / 06:28:32 / Administrador"
       
  2601 !
       
  2602 
       
  2603 setSearchTextNotFoundColors
       
  2604 
       
  2605     searchTextView foregroundColor: Color white.
       
  2606     searchTextView backgroundColor: Color lightRed.
       
  2607 
       
  2608     "Created: / 16-06-2007 / 06:29:00 / Administrador"
       
  2609 ! !
       
  2610 
  1892 !InternationalLanguageTranslationEditor methodsFor:'specs-dynamic'!
  2611 !InternationalLanguageTranslationEditor methodsFor:'specs-dynamic'!
  1893 
  2612 
  1894 columnInRow:row at:colIndex
  2613 columnInRow:row at:colIndex
  1895     |lang|
  2614     |lang|
  1896 
  2615 
  1925 
  2644 
  1926 keyStringInRow:row
  2645 keyStringInRow:row
  1927     ^ row keyString
  2646     ^ row keyString
  1928 ! !
  2647 ! !
  1929 
  2648 
       
  2649 !InternationalLanguageTranslationEditor methodsFor:'update'!
       
  2650 
       
  2651 updateToolVisibility
       
  2652     | bottomOffset searchBarVisible |
       
  2653 
       
  2654     bottomOffset := 0.
       
  2655 
       
  2656     searchBarVisible := self searchBoxVisible value.
       
  2657     searchBarVisible ifTrue:[
       
  2658         bottomOffset := bottomOffset - searchBoxView height.
       
  2659     ].
       
  2660     translationsPanel layout bottomOffset:bottomOffset-1.
       
  2661     translationsPanel container notNil ifTrue:[
       
  2662         translationsPanel containerChangedSize.
       
  2663     ].
       
  2664 
       
  2665     "Created: / 16-06-2007 / 11:58:25 / Administrador"
       
  2666 ! !
       
  2667 
  1930 !InternationalLanguageTranslationEditor methodsFor:'user actions'!
  2668 !InternationalLanguageTranslationEditor methodsFor:'user actions'!
       
  2669 
       
  2670 closeSearchBar
       
  2671 
       
  2672     self searchBoxVisible value: false.
       
  2673     self updateToolVisibility.
       
  2674 
       
  2675     "Created: / 15-06-2007 / 18:03:05 / Administrador"
       
  2676     "Modified: / 16-06-2007 / 11:58:52 / Administrador"
       
  2677 !
  1931 
  2678 
  1932 exampleLanguageSelectionChanged
  2679 exampleLanguageSelectionChanged
  1933 
  2680 
  1934    self updateExampleLanguageText.
  2681    self updateExampleLanguageText.
  1935 !
  2682 !
  1965     languageEditor selectAll.
  2712     languageEditor selectAll.
  1966     languageEditor pasteOrReplace:previousLanguageText.
  2713     languageEditor pasteOrReplace:previousLanguageText.
  1967     self languageTextModifiedHolder value:true.
  2714     self languageTextModifiedHolder value:true.
  1968 !
  2715 !
  1969 
  2716 
       
  2717 search
       
  2718 
       
  2719     self searchBoxVisible value: true.
       
  2720     self updateToolVisibility.
       
  2721     searchTextView takeFocus.
       
  2722 
       
  2723     "Modified: / 16-06-2007 / 11:58:44 / Administrador"
       
  2724 !
       
  2725 
  1970 selectionChanged                
  2726 selectionChanged                
  1971 
  2727 
  1972    self updateOriginalTextModification.
  2728    self updateOriginalTextModification.
  1973    self updateLanguageTextModification.
  2729    self updateLanguageTextModification.
  1974    self updateLanguageAndKeySelection.
  2730    self updateLanguageAndKeySelection.
  2224         ifTrue:[each size]
  2980         ifTrue:[each size]
  2225         ifFalse:[maxSize].].
  2981         ifFalse:[maxSize].].
  2226 !
  2982 !
  2227 
  2983 
  2228 searchForSimilarTranslation: aKey in: language
  2984 searchForSimilarTranslation: aKey in: language
  2229 "Returns a collection of translation associations that corresponds to a quite similar key comparing with aKey"
  2985     "Returns a collection of translation associations that corresponds to a quite similar key comparing with aKey"
  2230 |similarAssociations|
  2986 
  2231 similarAssociations:= 
  2987     |similarAssociations|
  2232 (self mappingAtLanguage: language) associationsSelect:[:each |
  2988     
  2233     ((each key sameAs: aKey) 
  2989     similarAssociations:= 
  2234         or:[(aKey asUppercase startsWith: each key asUppercase)
  2990     (self mappingAtLanguage: language) associationsSelect:[:each |
  2235             or:[((each key asUppercase levenshteinTo: aKey asUppercase)/ each key size) < 0.3
  2991         ((each key sameAs: aKey) 
  2236             ]])
  2992             or:[(aKey asUppercase startsWith: each key asUppercase)
  2237      and:[each value notNil
  2993                 or:[((each key asUppercase levenshteinTo: aKey asUppercase)/ each key size) < 0.3
  2238             and:[each value notEmpty]]
  2994                 ]])
  2239 ].
  2995          and:[each value notNil
  2240 ^similarAssociations
  2996                 and:[each value notEmpty]]
       
  2997     ].
       
  2998     ^similarAssociations
  2241 ! !
  2999 ! !
  2242 
  3000 
  2243 !InternationalLanguageTranslationEditor::LanguageMappingRow methodsFor:'accessing'!
  3001 !InternationalLanguageTranslationEditor::LanguageMappingRow methodsFor:'accessing'!
  2244 
  3002 
  2245 atLanguage:language
  3003 atLanguage:language