Photivo uses Qt’s built-in translation capabilities. That makes it easy and convenient to translate but needs a bit of setting up at first. In this article we walk you through all the installation steps. If you run into problems or have any questions, contact Brother John.
It’s probably a good idea to get in touch anyway to avoid multiple people doing the same language in parallel.
From Qt you need Qt Linguist to do the actual translation and the lupdate tool to create and update the translation file for your language. Also you need the Mercurial version control software to get the Photivo source code.
C:\ptTranslate
in this article but you can use any folder you like.C:\ptTranslate
folder.C:\ptTranslate
folder.(Probably works the same or very similar for Mac.)
~/ptTranslate
for this article~/ptTranslate
directory.Now you are ready to get your translation started. First you get a copy of Photivo’s source code, then you tell Photivo about the new language and generate the translation file.
hg clone https://photivo.googlecode.com/hg/ photivo cd photivo hg update default
Leave the window open.
photivoProject.pro
in the photivoProject
subfolder with a text editor and at the very end of the file add a new translation line for your language (just below the other translation lines). TRANSLATIONS += ../Translations/photivo_LANGNAME.ts
Replace the LANGNAME with the English name of your language, e.g. “German” or “Italian”. Photivo uses the LANGNAME part of the file name to display the available translations on the Settings tab.
lupdate
: "C:\ptTranslate\lupdate.exe" photivo.pro
Linux:
lupdate photivo.pro
photivo_LANGNAME.ts
file in Photivo’s Translations
subfolder.lupdate
will produce some errors or warnings. As long as the .ts
file is created you don’t need to worry about them.
photivo_LANGNAME.ts
with Qt Linguist and start translating.You can test your translation with your normal Photivo installation.
File › Release
in Qt Linguist). That produces photivo_LANGNAME.qm
in the same folder as your photivo_LANGNAME.ts
..qm
file to~/.photivo/translations
C:\Users\username\AppData\Roaming\Photivo\Translations
(the path might appear translated into your Windows’s language in Explorer)C:\Documents and Settings\username\Application Data\Photivo\Translations
(the path is translated into your Windows’s language).
To get your translation officially into Photivo we only need the completed .ts
file – but if you can provide a final .qm
as well, we won’t complain. The translation needs to be licensed under the GNU GPL version 3 like the rest of Photivo. Also tell us how you’d like to be credited. Full name? Nickname only? E-mail address? The person to get in touch with is again Brother John.
Of course with time text in Photivo’s GUI will change and new text will appear. That’s no immediate problem, because if Photivo cannot find a translation for a certain item it will just use the default English text.
Updating the translation is easy:
photivo.pro
is located).hg pull hg update default
lupdate
to add the new strings to your photivo_LANGNAME.ts
: "C:\ptTranslate\lupdate.exe" photivo.pro
Linux:
lupdate photivo.pro