YajHFC uses GNU gettext for translation, so to translate the application's messages, you will have to enter the translation into the .po files for your language (messages_xy.po and CommandLineOpts_xy.po where xy stands for the language code of your language (e.g. de for German, fr for French, ...)).
To get template .po files for your language, please write a short mail to support@yajhfc.de.
You can edit the .po files by using a editor like poedit (http://www.poedit.net/), kbabel (http://kbabel.kde.org/) or simply a plain text editor (although I do not recommend the latter, because it is easy to make syntax errors that way).
In any case, after you are done with your translation, please contact the author of YajHFC at support@yajhfc.de to integrate your translation in the newest developer version of YajHFC (which usually can be found at http://download.yajhfc.de/betas/).
You are also encouraged to subscribe to the yajhfc-translators mailing list to receive announcements about the translations and to discuss with the other translators.
Quick Summary
In short, adding a new translation of YajHFC to your language involves the following steps:
- Write to support@yajhfc.de to get the necessary template .po files
- Edit the translation
- Optionally: Test your translation (see Testing messages_xy.po for details)
- After you are done, notify YajHFC's author at support@yajhfc.de to integrate your translation into YajHFC
- Test your translation and repeat the steps before if necessary.
Editing messages_xy.po
Editing the files should mostly be pretty self-explanatory for messages_xy.po (simply enter the translation of the "original string" (msgid) as "translation" (msgstr)).
For CommandLineOpts_xy.po, the meaning of the original string is a bit different (please see Editing CommandLineOpts_xy.po below).
Things like {0} are place holders for numbers, file names or single words, so that these can appear at a different position in the translation (for example Displaying fax {0} is translated as Zeige Fax {0} an in German).
A special case is the date format (dd/MM/yyyy, HH:mm:ss). Here you should only change the order and the separator of the fields to represent the correct localized date format, but not the field names themselves (dd, MM, yyyy, ... should stay the same, but you can change their order and the separator (e.g. things like yyyy-MM-dd HH-mm-ss or dd.MM.yyyy HH:mm:ss are valid here); also see the screen shot below).
Another special case are the values $TRANSLATOR$ and $LANGUAGE$.
These can be replaced by your name and the translated name of your language and will show up in the about dialog as translation by... (see the first screen shot). If you don't change these values, nothing will show up there.
Testing messages_xy.po
Starting with YajHFC 0.5.0 you can interactively test your translation.
What you will need are the following things:
- YajHFC version >= 0.5.0
- The "Custom translation" plugin from http://download.yajhfc.de/misc/yajhfc-customtrans.jar
- msgcat from GNU gettext. For Windows, you can get it from http://gnuwin32.sourceforge.net/packages/gettext.htm. For Linux, just install the respective package (usually it will be called gettext or similar).
- Of course your translation in .po format
After downloading the plugin, open YajHFC, go to Options→Plugins & JDBC and add the downloaded jar file using the Add Plugin button.
Restart YajHFC.
Go to Options→Custom translations and add your translation to the list. You can both add new languages and override existing languages here.
When adding a new language, you will need to re-open the Options dialog in order to be able to select the language under Options→General→Language.
When overriding an existing language, please note that the default (system default) language will always load the translation included with YajHFC, i.e. to test your new translation, you will need to explicitely select your language under Options→General→Language.
After adding the translation and selecting it at Options→General→Language, restart YajHFC. It should start showing your new translation.
A list of the possible language codes can be found at http://www.loc.gov/standards/iso639-2/php/English_list.php (in column ISO 639-1). You can also enter language/country combinations (like de_CH for Swiss German).
The translation file is only read on start up and not monitored for changes. So, after making changes to the translation, you will need to restart YajHFC to be able to see your changes.
Editing CommandLineOpts_xy.po
This file includes the descriptions for the command line options YajHFC supports (to localize the output of java -jar yajhfc.jar --help and the corresponding FAQ section).
The message "identifier" is not the full English text here, but the name of the long command line option with -desc appended (e.g. help-desc is the description of the --help parameter).
If the option takes an argument, there also is a message id with -arg appended, which is a single word giving a short description of the argument (e.g. help-arg is the description of the argument for the --help option).
Additionally, there are a few general entries which contain the translation of phrases like Usage or Argument description.
The English text is included in the comments for the messages. So, if you use poedit, it is probably a good idea to check View → Show comment window.
Example:
The output of YajHFC for the English locale will look like this:
Usage: java -jar yajhfc.jar [OPTIONS]... [FILES TO SEND]... Argument description: -r, --recipient=RECIPIENT Specifies a recipient to send the fax to. You may specify either a fax number or detailed cover page information (see the FAQ for the format in the latter case). You may specify --recipient multiple times for multiple recipients. -C, --use-cover[=yes|no] Use a cover page for sending a fax. -s, --subject=SUBJECT The fax subject for the cover page. --comment=COMMENT The comment for the cover page. ...
For English subject-arg is SUBJECT and subject-desc is The fax subject for the cover page..
Similarly, comment-arg is COMMENT and comment-desc is The comment for the cover page.. And so on...
So, for the arg lines you should use a short form (preferably a single word), while the desc lines should contain a verbose description of what the parameter does.
Support/Questions
If you have any questions about translating (e.g. the meaning of some word, technical questions, ...), please write to the yajhfc-translators mailing list or to support@yajhfc.de.