Translating Gajim

NewTicket You want to spread Gajim to the world? You can translate Gajim easily in your language ! You can make new translations or just improve them. You will find in this page all you need in order to do that.

What to use to translate

You can use poedit or you favorite text editor.

PLEASE READ

WARNING

Please do not edit your po in the svn path''' Please first cp po/XX.po to ~/my_translations/gajim.po and edit that file. When POT is updated in svn and you may want to catch up with latest strings or comments. Make sure you do not have gajim.po open in your editr and do this: msgmerge -U ~/my_translations/gajim.po ~/gajim_svn/po/gajim.pot

Then reopen ~/my_translations/gajim.po in your editor and continue your work

What is fuzzy?

Fuzzy is a translation made to a new string by the PC. You should look carefully because it's wrong or incomplete. When it's ok you remove the #, fuzzy line

What is #, python-format

It means that string is from python code (and not from glade). There is no problem removing that comment when you're done. (It will be readded automatically when we update the po with new strings). So if you have #, fuzzy, python-format you can safely remove the whole line and not care about only removing the fuzzy part

What is #. comment

Most of the times it is a comment to help translators. If you do not undertand what the comment says then chances are that text was not meant to be a comment :$

What to do with string like ?vcard:Unknown

You translate only the Unknown part. The ?vcard: part is there to help you with the gender (masculine, feminin, neutral). More on why it is needed

What to do with string that have stuff like %(nick)s ?

So you see:

"%(nick)s has been kicked by %(who)s: %(reason)s"

this gives you the power to control the syntax, you MUST NOT translate the strings in %()s and you MUST HAVE them in the translated string. So the correct translation is this (translate the normal text in your langague, here I do NOT do that so everyone can understand):

"%(who)s kicked %(nick)s: %(reason)s"

How can I see what is left to untranslated?

Open your po file with an editor (eg. gedit) and search for msgstr ""\n\n. WARNING: that is an ugly hack, so you're advised to have a look at your final po before commiting it to Gajim.

What are #~ strings I see in the end of the file

Those strings are no longer used. There are there to remind you how you translated no longer used strings. After a Gajim release you can remove them if you want

I don't know how to translate XXX word. Ideas?

Yeah, look how it is in Windows (the OS that most people use) http://msdn.microsoft.com/library/en-us/dnwue/html/FRE_word_list.htm

_ Explained

If you see _ in a string that means your translation must have it too most of the times in the same word. So if _File then you can Alt+F.

Be careful where you put . and when you don't

If you see a . (dot) in the end of the line put it in your translation too. If you don't see a dot do not put it in your translation

Layout

Please try your translation to be robust and that strings don't break the GNOME Human Interface Guidelines as those are provided for your language.

One small example of this means that if you see the english text state: "Help me Go Somewhere Nice", then your translation string should have the first letter in every word as Capital except if that word is to, me, you, your, from, by, the, a, an, [...] in your language. Please read http://developer.gnome.org/projects/gup/hig/2.0/ for more. Note: the HIG acknowledges that different languages have different capitalization rules; for example, Swedish and Russian don't have header capitalization. Consult the GNOME Translation Project when in doubt.

If you have found strings that are not translatable but should be please mention them in our room gajim@…

Before you start please contact us, when you're done you can send your po file in translators@… (you have to register first via Translators mailing list Info Page

What is Plural-Forms?

The Plural-Forms line tells gettext how many plural forms there are in the language and how to use them. For example:

msgid "file"
msgid_plural "files"
msgstr[0] "file" # your translation here
msgstr[1] "files" # your plural translation here (maybe more than one if you're polish etc..)

The English plural expression, n != 1 means "Use msgstr[0] if the count is 1, otherwise use msgstr[1]." If your language has 3 plural forms, you'll need msgstr[0], msgstr[1], and msgstr[2], and so on.

Sometimes the English strings might be the same. "%d selected" doesn't change whether it stands for "1 selected" or "99 selected". If it does in your language, you should translate them differently.

Is your translation ready?

this will check if your gajim.po is ready to be commited

msgfmt -c gajim.po

if you want to know some statistics about how much stirngs you have left

msgfmt -v gajim.po

Explaining some strings

MOTD (message of the day) must be kept as is. Tooltip on MOTD will inform the user on what that is.

translation-credits When you translate that message, you put your name(s) there. like this:

msgid "translator-credits"
msgstr ""
"Name FamilyName <someone@somewhere>\n"
"Name2 FamilyName2 <someoneelse@somewhere>"

Thank you

PS.

How do I...

Please contact us in our room (gajim@…) before. Thank you

If you want to create or modify a translation file, follow these steps:

  • get the latest svn version of Gajim
  • create a gajim.pot file and update po files by running make update-po in the po directory (after having done ./autogen.sh)
  • Now if you want to create a new translation file:
    • initialize it with msginit -l pt -i gajim.pot -o pt.po (pt is an example, put your locale here)
    • edit pt.po and translate the strings. (this file is plain text, yet we recommend to use a program like poedit or kbabel in order to take advantage of its translation memory and finish fater, but then plz open the .po file with an editor where you can see in what windows those strings below so you can adjust them and have a great and accurate translation)
    • send us this file so we can put it into Gajim on the mailing list: translators@gajim.org
  • Or if you want to update an existing file:
    • edit po/XX.po file (we recommend with a simple editor) and update the translation
    • send us the new file so we update it into Gajim on the mailing list: translators@gajim.org

If you want to try your translation:

  • Compile the translation file with: msgfmt -o po/pt.mo the_file_you_edited.po (replace pt by your locale)
  • Copy this file to /usr/share/locale/pt/LC_MESSAGES/gajim.mo (replace pt by your locale)
  • Launch gajim, it should use your translation file if your LANGUAGE environment variable is correctly configured

If you want to try gajim from svn: TranslatedOnSVN

PPS.

You do NOT need to do this, so do NOT do it

intltool-extract --type=gettext/glade src/gtkgui.glade

xgettext -k_ --c++ --sort-by-file -o msg.pot *.php --from-code utf-8

human memory is small, also scripta manent

(pls add yourself here and the way you prefer)

BE poEdit, Vim
BG GNU Emacs
DE poEdit, gedit
SWE Rosetta
FR Vim
IT GNU Emacs, poEdit
EL poEdit, Vim
LT gVim
PL Vim
SK gTranslator

Attachments