The translation assistant can be opened from the dialog boxes by hiting the F2 function key or directly from the menu
It makes it possible to create and change the translation lexicons of the application in .properties files.
The translation assistant handles french (_fr) and english (_en).
The concerned dialogs are :
The technical dialogs like the Java FileChooser are not concerned.
We can find
.properties translation files in :
The translation assistant is a 4 columns table.
Thus, for one dialog, we can find keys from different translation files. We consider that a key should appear in all the files for the different supported languages (here FR and EN).
For example, The lexicon alisier.AlsLabels matches the two files alisier/AlsLabels_fr.properties and alisier/AlsLabels_en.properties. These two file should contain the same tranlsation keys.
Once the changes are done, the Save button alters the concerned .properties files and reloads them in the Capsis Translator. The changes will be visible at the next dialog opening.
The list of keys in the first column is made by reading the source code of the dialog box. This way, we are sure that the list in complete (technical note: looking for the keys used in “Translator.swap” occurrences). The translations in the two other columns are obtained by asking the Translator.
The keys which translation is just modified are written back in the lexicon where they were found (by asking the Translator).
If a translation is not found (in no .properties file), the matching table cell is let empty and the Translator can not give the source lexicon of the key. To find a lexicon for the keys without translations, we process in order this way:
Note: this detection method makes it possible to translate the keys once the Java source code written without having to open the .properties files with an editor.
When saving modification, The translation Assistant will check if a key is declared several times in different
.properties file. If it is the case, it will ask to remove those duplicated entry. By answering
the other found key will be deleted.
When a lexicon is created, it must be added and commited in SVN. When a lexicon is changed, it must also be commited in SVN. Take care to commit only the lexicons of your own (e.g.: your module / extensions).