How to test your translation (obsolete)

Help make Linux Mint support your language.
Forum rules
No support questions here please

How to test your translation (obsolete)

Postby clem on Wed May 06, 2009 10:13 am

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
User avatar
clem
Level 15
Level 15
 
Posts: 5580
Joined: Wed Nov 15, 2006 8:34 am

Linux Mint is funded by ads and donations.
 

Re: How to test your translation

Postby kvaju on Mon May 11, 2009 11:04 am

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

thanks
kvaju
Level 1
Level 1
 
Posts: 30
Joined: Tue Dec 02, 2008 6:32 pm
Location: Mostar

Re: How to test your translation

Postby emorrp1 on Mon May 11, 2009 12:21 pm

I found the following list of acronyms: http://www.zenphoto.org/svn/trunk/zp-co ... s-i18n.php
Croatian is hr.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How to test your translation

Postby clem on Wed May 13, 2009 4:50 am

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

Clem
Image
User avatar
clem
Level 15
Level 15
 
Posts: 5580
Joined: Wed Nov 15, 2006 8:34 am

Re: How to test your translation

Postby abhilashkumar on Thu May 14, 2009 10:15 am

I am trying to test my hindi translations for mintUpload, mintNanny. but i keep getting the message command not found. mintBackup ran properly but the rest havent run at all. any suggestions.
abhilashkumar
Level 1
Level 1
 
Posts: 19
Joined: Sat Jan 24, 2009 3:59 am

Re: How to test your translation

Postby emorrp1 on Thu May 14, 2009 11:11 am

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.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How to test your translation

Postby abhilashkumar on Thu May 14, 2009 11:36 am

This is the output of my mint tab tab

abhilash@abhilash-mintbox ~ $ mint
mintAssistant mint-compress mintInstall mint-md5sum
mintBackup mint-decompress mint-make mintWifi
mint-batch-make mint-fortune mint-make-cmd

The commands dont seem to be there, but I can run the programs from gnome do and also from the menu.
abhilashkumar
Level 1
Level 1
 
Posts: 19
Joined: Sat Jan 24, 2009 3:59 am

Re: How to test your translation

Postby emorrp1 on Thu May 14, 2009 11:58 am

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
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How to test your translation

Postby abhilashkumar on Thu May 14, 2009 12:00 pm

yeah i am on felicia... sorry about that... :D
abhilashkumar
Level 1
Level 1
 
Posts: 19
Joined: Sat Jan 24, 2009 3:59 am

Linux Mint is funded by ads and donations.
 

Return to Translations

Who is online

Users browsing this forum: No registered users and 2 guests