Translation Files
From PsiWiki
Contents |
[edit] Translations files
"xx" stands for your language code [1], e.g. "de" for germany, so the files are called in that case "qt_de.qm" and "psi_de.qm" or "qt_de.ts" and "psi_de.ts".
[edit] The psi_xx.qm file
If you want Psi to be translated you need a translation file. This file is called "psi_xx.qm" and if you are lucky someone has already done the work for you and has made his work available. Preferentially you can find this translation files in the download section [2] on the Psi homepage [3]. Then you only need to download the file and put it into the right folder (see the instructions below or the instructions that come with the translation). If there is no file provided you have to search for an incomplete start of the translation (or an outdated one) for your language (a psi_xx.ts file) in the forums or this wiki or here [4] or ask in the Psi groupchat (Psi Groupchat (MUC)! Room name: psi@conference.psi-im.org). A good person to contact is halr9000 [5], the webmaster of the Psi homepage, and ask if there is a .ts file for your language. Continue this translation with linguist [6] (really good documentation by the way) and when you are finished provide both your psi_xx.ts file and your psi_xx.qm file as described in [7]. When you are the first who wants to translate Psi to your language you have to create a new psi_xx.ts file [8] and start from the beginning. When you are finished (respect!) see again on [9] what to do.
[edit] Two Facilities
1. If you do not know if you have to translate strings like (sp) or (new line), which appear blue in linguist, then you should read [10].
Under "Translation hints" point five it is explained how to handle these strings.
2. Strings like "psi/addContact" are no "real" strings, so you do not have to translate them. They stand for an icon and you can mark it as translated so others (if you do not translate alone) know that these kinds of strings need not be translated. Every "psi/" string is such an icon.
[edit] The qt_xx.qm file
In order to have Psi completely translated (the context menu and "Cancel" buttons and so on) you need a qt_xx.qm file for your language. These files translate all visible widgets of Qt into your language. Qt provides them for many languages [11] and they can be found in Qt packages, downloadable from [12]. After extracting the archive the folder "translations" contains many files including qt_xx.qm. If you are lucky the file for your language is there too and you can copy it and put it into the right folder (see below or in the instructions that come with the translation for your language). If there is no such a file available for your language you unfortunately have to create one if you want to have a complete translation of Psi. In that case take the blank qt_untranslated.ts file, open it with linguist [13] and translate it. You do not have to translate every string, look what you need to avoid unnecessary work. After the translation save the file with the correct name (qt_languagecode.ts) click "release" and linguist will create a .qm file, which is the compiled file containing the translation. *.qm files cannot be modified anymore so it is very important to hand out the .ts file, as well.
To make sure your work (-> translation of psi_xx.qm or/and qt_xx.qm) is not wasted, you should make it public so that other users can benefit from it and improve it even if you do not have the time to work on Psi anymore.
[edit] Mac OS X distinctive features
On MAC OS X Qt is unable to control the complete application menu (and "Open File" dialogs) [14], so it is a bit tricky to translate it. In this case you first should read the link above and then a create a folder in your /Applications/Psi.app/Contents/Resources/ called "xx.lproj". (xx is you language code, de.lproj for german, see on top of the page and how you go to "Contents" is described below under "MAC OS X" in "Instructions how to place the translation files".) In this folder you create a textfile called "localisation.plist" (you can do that by creating it first on the desktop and then copy it into that folder. Notice, that you have to tell Textedit (in case you use it) to create textfiles instead of formattable texts (.txt instead of .rtf). Write the content described in [15] to that file and change the
[...]
<key>LprojLocale</key>
<string>no</string>
[...]
to
[...]
<key>LprojLocale</key>
<string>xx</string>
[...]
(xx = your language code)
After a restart of Psi the application menu and the file dialogs should be translated.
[edit] Instructions how to place the translation files
In [16] it is explained how to place the psi_xx.qm file for GNU/Linux and Windows (except Vista) and Mac OS X. I will try to give instructions for those last cases and when somebody can convert them to good English someone could add them to the link above.
[edit] Mac OS X
In Applications folder click with the right mouse key (or ctrl-click) on Psi and then click on "Show Package Contents", go into the folder "Contents" then into "Resources" and place your psi_xx.qm and your qt_xx.qm files there.
[edit] Windows Vista
I think you can put the psi_xx.qm in the folder where Psi is installed or without admin access in the folder that halr9000 wrote here: [17]
"I don't have Vista handy but I know the answer. It's <systemdrive>:\<localized string for "users">\<username>
e.g. c:\users\halr9000 "
So put your *.qm files into that folder and your Psi should be translated after a restart.
If someone can confirm that it works in that ways and put it into good english we can publish it in post #1 in the first link. Please note on this page if it works or what is wrong.
Here my first try of improving the instructions of [18] (feel free to improve, too!):
[edit] Example psi_en.html
<!-- Please do NOT translate this first part. Just state the information in a non-localised way. --> Language Pack: English<br /> Author: <a href="mailto:justin@affinix.com">Justin Karneges</a><br /> License: GPL<br /> <hr /> <!-- Start translating here. --> Language Pack: English<br /> Author: <a href="mailto:justin@affinix.com">Justin Karneges</a><br /> License: GPL<br /> <h3>Installation guide for the English language pack</h3> 1) Download the language pack by clicking the "Psi translation - Lang" link at the top of this page <br /><br /> 2) Place the file in the directory appropriate for your operating system: <br /><br /> <b>GNU/Linux</b> - Copy <i>psi_en.qm</i> to $HOME/.psi/ <br /><br /> <b>Mac OS X</b> - Copy <i>psi_en.qm</i> to Applications/Psi.app/Contents/Resources/<br /> <p>To do that right click on Psi in the application folder and then click on "Show Package Contents". Go into the folder "Contents" and then into "Resources" and now you should place your psi_en.qm there.</p> <br /><br /> <b>Windows 95/98/Me</b> - Copy <i>psi_en.qm</i> to C:\Program Files\Psi\psidata (if you installed Psi somewhere else, be sure to adjust that path). <br /><br /> <b>Windows 2000/XP</b> - There are two methods: <br /> <p class="sidebox"> <b>a)</b> Copy <i>psi_en.qm</i> to C:\Program Files\Psi (if you installed Psi somewhere else, be sure to adjust that path). <br /> <b>b)</b> If you don't have administrator access on your system, copy <i>psi_en.qm</i> to C:\Documents and Settings\USERNAME\psidata (be sure to put your real username in there). </p> <br /> <b>Windows Vista</b> - There are also two methods: <br /> <p class="sidebox"> <b>a)</b> Copy <i>psi_en.qm</i> to C:\Program Files\Psi (if you installed Psi somewhere else, be sure to adjust that path). <br /> <b>b)</b> If you don't have administrator access on your system, copy <i>psi_en.qm</i> to C:\users\USERNAME\psidata (be sure to put your real username in there). <br /> The language is set automatically because Psi looks for your system variable for your language. If you want (or must) change Psi to your language by hand you do that in "Profiles". </p>
Note: The install html file should be converted to UTF-8 format using the iconv program before sending it to the Psi team for inclusion on the download page
So that was my suggestion. But I may repeat me: I am not sure if these methods work in that way. It would be great if someone could test if it works in that way works and notice it here (and of course improve those sentences, I think my English grammar could be better). Thanks!
Linux: works
Mac OS X: works
Win 95/98:
Win 2000/XP method 1: works
Win 2000/XP method 2:
Win Vista method 1:
Win Vista method 2:

