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
Next revisionBoth sides next revision
tutorials:other:translation [2014/10/09 09:43] – [How translation works] twtutorials:other:translation [2014/10/09 10:15] – [Download and install poEdit] tw
Line 14: Line 14:
  
 ====== Preparing the translation ====== ====== Preparing the translation ======
 +
 +===== Locate translation template =====
 +
 +Before we can start the translation, we first need to locate the translation template ''default.pot''. It is included with every installtion of mAirList. Open Windows Explorer and navigate to the mAirList program folder, then go to the ''locale'' subfolder, and you should see it:
 +
 +{{ :tutorials:other:pasted:20141009-114616.png?400 }}
 +
 +===== Create language folder =====
 +
 +Inside the ''locale'' folder, you see a couple of subfolders, one for each translation that is already included by default: ''de'' (German), ''en_GB'' (British English), ''fr'' (French).
 +
 +To start a new translation, you must first create a folder that matches the two-letter ISO 639-1 code of the language, e.g. ''da'' for Danish. For a list of all language codes see here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
 +
 +If you're creating a translation for a special variant of a language for a particular country, you can also add the two-digit country code, separated by an underscore sign, to the language code, e.g. ''en_AR'' for Argentinian Spanish.
 +
 +**Important**: Inside the "language code" folder you created, you must create another folder named ''LC_MESSAGES''. This is where the translation file goes in the next step.
 +
 +In the end it should look like this:
 +
 +{{ :tutorials:other:pasted:20141009-115429.png?400 }}
 +
 +===== Copy and rename translation template =====
 +
 +Finally we have to copy the translation template ''default.pot'' to our newly created ''LC_MESSAGES'' folder, and rename it to ''mAirList.po'':
 +
 +{{ :tutorials:other:pasted:20141009-115646.png?400 }}
 +
 +Now we're almost ready to start the translation.
 +
 +===== Download and install poEdit =====
 +
 +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'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 work. To do so, adjust 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 ======
  
 +Having installed poEdit, you can double-click the ''mAirList.po'' file and poEdit will open it.
 +
 +===== Set project name =====
 +
 +The first time open the ''.po'' file, poEdit will display a message saying //Translation's project name isn't set//, and show a button //Set name// which displays the following dialog: 
 +
 +{{ :tutorials:other:pasted:20141009-120154.png }}
 +
 +Enter //mAirList// as the project name, your name and e-mail as the team name/e-mail (it will give you the credits for the translation in the //About// dialog later), and both charsets to //UTF-8//. Then click //OK// to save.
 +
 +===== Enter translations =====
 +
 +Now you're ready to enter the translation strings. In the poEdit main window, there is a table that displays the English strings on the left, and the translations on the right (initially empty):
 +
 +{{ :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.
 +
 +Remember to click //Save// once in a while to save your work!
 +
 +<WRAP alert>
 +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>
 ====== New program versions ====== ====== New program versions ======
  
tutorials/other/translation.txt · Last modified: 2019/07/09 16:18 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki