The RecordEditor now support Foreign Language Translations using the GetText Utility (see Windows or Linux). Currently the help screens are all in English, I will be looking at that in the future.
There are number of packages / services for PO files:
Supplied Files:
File | Description |
ReMsgs_*.class | Sample Translations that can be selected in the RecordEditor. ReMsgs_tst.class is for my testing |
ReMsgs_*.po | Sample Translations source files created using Google Translate.
These all need updating. The RecordEditor can now has a very basic po file parser (po file must use encoding=utf8) and can use po file
directly. Due to limitation with the po parser, the RecordEditor may not display the text correctly, but it should be good enough
for a translator to work with. If there is both a class and po file, the RecordEditor will use the
most recent file.
Problems with the Google Translation include
Note: There is now a special message TranslationStatus where you can give status of the Translation. This is displayed when the RecordEditor starts. Once you are happy with the translation, set it to "". |
msgfmt_GenerateResourceBundle.rexx/bat/sh | Rexx / bat / shell scripts to convert ReMsgs_*.po
to ReMsgs_*.class. This step requires a java compiler !!!. The options are:
The gettext msgfmt program will call the Java Compiler (javac - SDK) program to compile the generated "Resource Bundle". There are sample rexx/bat/bash scripts to convert the po file into a java class file. Basically the scripts do (where tst is the foreign-language being generated and TextItems.tst.po is the input file) : msgfmt --java -d . -r ReMsgs -l tst TextItems.tst.po |
Each text translation will consist of:
Following are 2 sample Text entries:
378 379 # Use: Field_Hint 380 # id: Panel: 381 # RecordBtns 3 382 msgid "Last Record" 383 msgstr "!!Last Record!!" 384 385 # Use: External 386 # id: Copybook_Writers_0 Panel: 387 # 388 # English: RecordEditor (Tab) CSV 389 msgid "Copybook_Writers_0" 390 msgstr "!!RecordEditor (Tab) CSV!!"
See GetText po Format for a description of PO files. There are many Text editors that can highlight po files (e.g. jEdit + some unix editors).
To select your new language definition:
The RecordEditor can now edit GetText po files. At this stage the po-editor still needs work. It can be used to edit the RecordEditor po files. Use the RecordLayout of GetText_PO.
There are many other GetText editors (i.e poedit) offer a number of functions not offered by the RecordEditor (like Translation). At this stage the RecordEditor should be viewed as an addition to another Po-Editor rather than an alternative. The RecordEditor offer's several features of it own:
At this stage, the RecordEditor is an additional tool for editing po-files rather than as a replacement for existing tools like poedit
When opening a file, 2 views are available - Full File and Fuzzy / blank records. Each view has a list of translations down the left hand side and on the right the currently selected record is displayed.
If you right click on a tab (or in the top left hand corner if there is no tab), you can move the record display to the bottom of the screen, remove / add the selected-record-display.
You can use Edit >>>> Show / Hide Fields option to display other columns like msgctxt, fuzzy, obsolete, msgidPlural etc.
In the properties editor, you can