How to test your translation (obsolete)

Help translate Linux Mint to other languages
Forum rules
No support questions here please. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
clem
Level 12
Level 12
Posts: 4303
Joined: Wed Nov 15, 2006 8:34 am
Contact:

How to test your translation (obsolete)

Post by clem »

Edit: Translations have moved to Launchpad. The content below is now obsolete.

There's nothing better than testing your own translation, i.e. running the software you just translated with your own brand new translation. And that's actually very easy to do.

Let's say we're translating mintDesktop in Spanish..

Create the folder:

The first step is to create a new folder for Spanish translations in mintDesktop (if it doesn't exist already).

- Open a terminal and type:

Code: Select all

sudo mkdir -p /usr/lib/linuxmint/mintDesktop/locale/es/LC_MESSAGES
Note: "es" stands for "Spanish", so replace this appropriately ("it" for Italian.. etc etc..).

Create the PO file:

The second step is to create the translation file in the right place:

- In the terminal type:

Code: Select all

gksu gedit /usr/lib/linuxmint/mintDesktop/locale/es/LC_MESSAGES/messages.po
- Then paste the content of your translation:
msgid "Desktop Items"
msgstr "Icônes sur le bureau"

msgid "Computer"
msgstr "Poste de travail"

msgid "Home"
msgstr "Dossier personnel"

msgid "Network"
msgstr "Serveurs réseaux"

msgid "Trash"
msgstr "Corbeille"

msgid "Mounted Volumes"
msgstr "Volumes de stockage"
Note: That's supposed to be Spanish.. but I'm not that good at Spanish so the example above is actually French.. just don't mind that too much :)

Compile the translation:

- In a terminal, type:

Code: Select all

apt install gettext

Code: Select all

cd /usr/lib/linuxmint/mintDesktop/locale/es/LC_MESSAGES

Code: Select all

sudo msgfmt messages.po
Test your application:

- In a terminal, type:

Code: Select all

LANGUAGE=es mintdesktop
- Check that everything is in Spanish.

- Eventually reopen Gedit the same way as before, make extra modifications, recompile the file with msgfmt and rerun the application until you're fully happy with everything.

This example above was for mintDesktop and "es" (Spanish), it works in the exact same way for other languages and other mint tools.

Questions are welcome, don't hesitate to ask by replying to this thread.

Clem.
Image
kvaju

Re: How to test your translation

Post by kvaju »

locale es stands for spanish, what shortcut is for Croatian? cr? hr? or there is some rule?

thanks
emorrp1

Re: How to test your translation

Post by emorrp1 »

I found the following list of acronyms: http://www.zenphoto.org/svn/trunk/zp-co ... s-i18n.php
Croatian is hr.
User avatar
clem
Level 12
Level 12
Posts: 4303
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Re: How to test your translation

Post by clem »

Another way to know that is to look in Synaptic for "Croatian" and you'll see packages like language-pack-hr

Clem
Image
emorrp1

Re: How to test your translation

Post by emorrp1 »

abhilashkumar: try the command in all lowercase as in the mintDesktop example clem gives above. mintBackup is strange in that it provides both a lowercase version and a camelCase version. To be sure, you can see a list of all the mint commands by typing "mint" and hitting tab twice in the terminal.
emorrp1

Re: How to test your translation

Post by emorrp1 »

Are you by any chance running mint 6 felicia? You can only really test the Gloria translations with the Gloria versions of the mintTools, which you get by installing Gloria. Nevertheless, you can still test the translations to a certain extent e.g. spanish mintUpload (and it should be similar for some other mintTools too:

Code: Select all

LANGUAGE=es /usr/lib/linuxmint/mintUpload/mintUpload.py
Locked

Return to “Translations”