User Tools

Site Tools


tutorials:other:translation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:other:translation [2014/10/09 10:12] – [Do the actual work] twtutorials:other:translation [2019/07/09 16:18] (current) – external edit 127.0.0.1
Line 47: Line 47:
 While ''.po'' files are plain text files and could be edited with any text editor, we recommend that you use a dedicated po file editor. Our favorite is //poEdit//, which is available for download here (the free version is fine, you don't have to pay for the Pro version if you don't want to): http://poedit.net/ While ''.po'' files are plain text files and could be edited with any text editor, we recommend that you use a dedicated po file editor. Our favorite is //poEdit//, which is available for download here (the free version is fine, you don't have to pay for the Pro version if you don't want to): http://poedit.net/
  
-When you run poEdit for the first time, it will probably ask you to enter your name and e-mail addressThat information will be stored in your translation files later and displayed to the useras the credits for the translation.+When you're editing the ''mAirList.po'' file inside the mAirList program folder, it is necessary to run poEdit as Administrator, or you won't be able to save your workTo do soadjust the security settings of ''poEdit.exe'' so that it always runs as Administrator: 
 + 
 +{{ :tutorials:other:pasted:20141009-121529.png?300 }} 
 + 
 +(Sorry, no English screenshot available.
 ====== Do the actual work ====== ====== Do the actual work ======
  
Line 66: Line 71:
 {{ :tutorials:other:pasted:20141009-120935.png?400 }} {{ :tutorials:other:pasted:20141009-120935.png?400 }}
  
-Click a line, and enter the translation into the text field at the bottom. You can now also use the arrow keys to move to the next string.+Click a line, and enter the translation into the text field at the bottom. You can now also use the arrow keys to move to the next string. Untranslated strings are in bold and at the top of the list, finished translations are in normal text and move down to the bottom when you save the file.
  
-Remember to click //Save// once in a while to save your work! 
  
-<WRAP alert+<WRAP tip
-mAirList must not be running at the time you save the translation in poEdit, because otherwise the ''.mo'' file cannot be written. If this is an issue for you, you can copy the ''mAirList.po'' and ''mAirList.mo'' files to another location, edit them from there, and copy them back to the ''LC_MESSAGES'' folder when you're done.+**Remember to click //Save// once in a while to save your work!** 
 + 
 +However, mAirList must not be running at the time you save the translation in poEdit, because otherwise the ''.mo'' file cannot be written. If this is an issue for you, you can copy the ''mAirList.po'' and ''mAirList.mo'' files to another location, edit them from there, and copy them back to the ''LC_MESSAGES'' folder when you're done.
 </WRAP> </WRAP>
 +
 +When you save the ''.po'' file, you will notice that poEdit also created the ''mAirList.mo'' file in the same folder:
 +
 +{{ :tutorials:other:pasted:20141009-122539.png?400 }}
 +
 +So everything is in place now, and if the language is the same as your Windows language, mAirList should automatically detect and use the file. Otherwise run mAirList Configuration, go to //GUI -> General//, and set the language code accordingly:
 +
 +{{ :tutorials:other:pasted:20141009-123053.png?400 }}
 +===== Important hints =====
 +
 +There are a couple of things that you have to take special care of when doing the translation.
 +
 +==== Variables ====
 +
 +You will notice that some of the English texts contain special placeholders starting with a ''%'' sign, like this:
 +
 +  Importing file %d of %d (%d errors). Estimated time remaining: %s
 +  
 +These are variables which will be filled with the actual text or data by mAirList. In particular, you will come accross the following placeholders:
 +
 +  * ''%d'' - number
 +  * ''%<format>f'' - number with decimal point
 +  * ''%s'' - string/text
 +
 +**It is important that the translated text uses the exact same variables, in the exact same order!** Otherwise software will crash later. For example. the above text would be translated to German like this:
 +
 +  Importiere Datei %d von %d (%d Fehler). Verbleibende Zeit: %s
 +  
 +Note that the variables ''%d'', ''%d'', ''%d'', ''%s'' appear in the same order. Again, this is very important!
 +==== Quotation marks ====
 +
 +Inside the ''.po'' file (remember that it's a text file) double quotes ("") are used to delimit the strings. Now when a double quote appears in one of the English strings, it will have a backslash (\) sign before it, to "escape" it:
 +
 +  \"A\" and \"B\" Buttons (left to right)
 +  
 +Again it is very important that you also use a backslash sign before any double quote in the translated text:  
 +  
 +  \"A\"- und \"B\"-Taster (links nach rechts) 
 ====== New program versions ====== ====== New program versions ======
  
 +When you install a new version of mAirList, it may happen that there are new strings that must be translated. The installer will put a new ''default.pot'' file into the program folder. Your task is to merge that new template into your exisiting translation.
 +
 +In order to do so, open your ''mAirList.po'' file in poEdit, then click //Catalogue -> Update from POT file// from the menu. Select the new ''default.pot'' file and click //Open//.
 +
 +poEdit will read the new template and add any new strings to your translation (and remove obsolete ones).
 +
 +Sometimes poEdit will also make a **suggestion** based on your existing translations; these **fuzzy** translations are marked with a green star in the translation table. You can accept the suggestion by unchecking //Edit -> Translation is fuzzy// in the menu, or pressing ''Ctrl+U''. Or just enter a new one.
 +
 +====== Make your translation available to the public ======
 +
 +When you have finished a translation for a language that is not yet supported out of the box by mAirList, we will be happy to receive your translation files and included in the official distribution from now on.
 +
 +For details please contact us at [[mailto:info@mairlist.com|info@mairlist.com]].
tutorials/other/translation.1412849564.txt.gz · Last modified: 2019/07/09 16:19 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki