Tools__InternationalLanguageTranslationEditor.st
changeset 3863 e13a7d334bb1
parent 3857 87004a92aba2
equal deleted inserted replaced
3862:bbe57509fc55 3863:e13a7d334bb1
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 2018 by eXept Software AG
     2  COPYRIGHT (c) 2018 by eXept Software AG
     5               All Rights Reserved
     3               All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
  2483             ] ifFalse:[ (oldKey endsWith:'...') ifTrue:[
  2481             ] ifFalse:[ (oldKey endsWith:'...') ifTrue:[
  2484                 newKey := oldKey copyButLast:3.
  2482                 newKey := oldKey copyButLast:3.
  2485             ] ifFalse:[ ('\.:?=,!! ' includes:oldKey last) ifTrue:[
  2483             ] ifFalse:[ ('\.:?=,!! ' includes:oldKey last) ifTrue:[
  2486                 newKey := oldKey copyButLast:1.
  2484                 newKey := oldKey copyButLast:1.
  2487             ] ifFalse:[ ((oldKey first == $() and:[ oldKey last == $) ]) ifTrue:[
  2485             ] ifFalse:[ ((oldKey first == $() and:[ oldKey last == $) ]) ifTrue:[
  2488                 newKey := oldKey copyFrom:2 to:oldKey size - 1
  2486                 newKey := oldKey copyButFirstAndLast
  2489             ] ifFalse:[ ((oldKey first == $[) and:[ oldKey last == $] ]) ifTrue:[
  2487             ] ifFalse:[ ((oldKey first == $[) and:[ oldKey last == $] ]) ifTrue:[
  2490                 newKey := oldKey copyFrom:2 to:oldKey size - 1
  2488                 newKey := oldKey copyButFirstAndLast
  2491             ] ifFalse:[
  2489             ] ifFalse:[
  2492                 newKey :=oldKey
  2490                 newKey :=oldKey
  2493             ]]]]].
  2491             ]]]]].
  2494             "/ must attach oldKey-methods to newKey
  2492             "/ must attach oldKey-methods to newKey
  2495             methods := methodsUsingKey at:oldKey ifAbsent:nil.
  2493             methods := methodsUsingKey at:oldKey ifAbsent:nil.
  3048     similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
  3046     similarTranslationsAssociations := similarTranslationsAssociations associations inject: OrderedCollection new into:[:collection :association |
  3049         collection detect:[:selectedAssociation |
  3047         collection detect:[:selectedAssociation |
  3050             selectedAssociation value sameAs: association value] ifNone:[collection add: association].
  3048             selectedAssociation value sameAs: association value] ifNone:[collection add: association].
  3051         collection].
  3049         collection].
  3052     selectedTranslation := Dialog
  3050     selectedTranslation := Dialog
  3053         choose:'Choose one if you consider it´s usefull to translate:
  3051         choose:'Choose one if you consider it´s usefull to translate:
  3054     ',
  3052     ',
  3055         '<', key, '>  ', (self currentExampleLanguageText ifNil:[''])
  3053         '<', key, '>  ', (self currentExampleLanguageText ifNil:[''])
  3056         fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
  3054         fromList: (similarTranslationsAssociations collect:[:each |  '<', each key, '>  ', each value])
  3057         values: (similarTranslationsAssociations collect:[:each | each value])
  3055         values: (similarTranslationsAssociations collect:[:each | each value])
  3058         lines:10
  3056         lines:10
  3610     keys add:'no'.
  3608     keys add:'no'.
  3611 
  3609 
  3612     self addLanguage:#'de'.
  3610     self addLanguage:#'de'.
  3613     self addLanguage:#'fr'.
  3611     self addLanguage:#'fr'.
  3614 
  3612 
  3615     self at:'open' language:#'de' put:'öffnen'.
  3613     self at:'open' language:#'de' put:'öffnen'.
  3616     self at:'close' language:#'de' put:'schließen'.
  3614     self at:'close' language:#'de' put:'schließen'.
  3617     self at:'yes' language:#'de' put:'ja'.
  3615     self at:'yes' language:#'de' put:'ja'.
  3618     self at:'no' language:#'de' put:'nein'.
  3616     self at:'no' language:#'de' put:'nein'.
  3619     self at:'cancel' language:#'de' put:'abbrechen'.
  3617     self at:'cancel' language:#'de' put:'abbrechen'.
  3620 
  3618 
  3621     self at:'open' language:#'fr' put:'ouvrir'.
  3619     self at:'open' language:#'fr' put:'ouvrir'.