|
|
# Translating Gajim
|
|
|
|
|
|
![Nuvola_Esperanto_flag](/uploads/52eebdfebf0f95a94b47d929b03bacd8/Nuvola_Esperanto_flag.png) You want to spread Gajim to the world? Gajim can easily be translated to your language!
|
|
|
\[\[_TOC_\]\]
|
|
|
|
|
|
You want to spread Gajim to the world? Gajim can easily be translated to your language!
|
|
|
|
|
|
You can create new translations or just improve existing translations. On this page, you will find all the information you need in order to do just that. Also please register to [translator mailing list](https://lists.gajim.org/cgi-bin/listinfo/translators) if you like, so you know when updates are needed before a release.
|
|
|
|
... | ... | @@ -12,15 +14,15 @@ Translations are done on the [translation website](https://translate.gajim.org). |
|
|
|
|
|
## How should I translate and what should I keep in mind while translating
|
|
|
|
|
|
**What is "Needs work" (or fuzzy in .po file)?**
|
|
|
### What is "Needs work" (or fuzzy in .po file)?
|
|
|
|
|
|
This means the originally translated english string has been modified. You should look carefully because the translation is wrong or incomplete in this case. Have a look at the punctuation in particular. When the string is translated correctly, uncheck the "Needs work" checkbox (or remove the #, fuzzy line in .po file).
|
|
|
|
|
|
**What to do with strings like ?vcard:Unknown**
|
|
|
### What to do with strings like ?vcard:Unknown
|
|
|
|
|
|
You only have to translate the 'Unknown' part of the string. The '?vcard:' part is there to help you with the gender (masculine, feminin, neutral). See #675 for more on why it is needed.
|
|
|
|
|
|
**What to do with strings that have stuff like %(nick)s ?**
|
|
|
### What to do with strings that have stuff like %(nick)s ?
|
|
|
|
|
|
For example you see a string formed like this:
|
|
|
|
... | ... | @@ -31,15 +33,15 @@ It gives you the power to control the syntax, you MUST NOT translate the strings |
|
|
`%(who)s kicked %(nick)s: %(reason)s`
|
|
|
|
|
|
|
|
|
**_ Explained**
|
|
|
### _ Explained
|
|
|
|
|
|
If you see _ in a string, it means your translation must have it too. Most of the times in the same word. If the original string says '_File', you can access this item via <kbd>Alt</kbd> + <kbd>F</kbd> in Gajim's user interface.
|
|
|
|
|
|
**Be careful where you put . and where you don't**
|
|
|
### Be careful where you put . and where you don't
|
|
|
|
|
|
If you see a . (dot) at 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**
|
|
|
### Layout
|
|
|
|
|
|
Please try your translation to be robust. Be careful that strings don't break the [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/stable/writing-style.html), those are provided for your language.
|
|
|
|
... | ... | @@ -55,7 +57,7 @@ If you have found strings that are not translatable but should be, please mentio |
|
|
|
|
|
If you want to start translating Gajim into a new language, don't hesitate to ask us to add it.
|
|
|
|
|
|
**What are Plural-Forms?**
|
|
|
### What are Plural-Forms?
|
|
|
|
|
|
The Plural-Forms line tells `gettext` (used by Gajim for translations) how many plural forms there are in the language and how to use them. For example:
|
|
|
|
... | ... | @@ -66,11 +68,11 @@ The Plural-Forms line tells `gettext` (used by Gajim for translations) how many |
|
|
|
|
|
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 change in your language, you should translate the plural form differently.
|
|
|
|
|
|
**Is your translation ready?**
|
|
|
### Is your translation ready?
|
|
|
|
|
|
Check if there are no critical errors on [the website](https://translate.gajim.org).
|
|
|
|
|
|
**Some strings explained**
|
|
|
### Some strings explained
|
|
|
|
|
|
_MOTD_: (message of the day) must be kept as is. A tooltip on MOTD will inform the user on what the 'message of the day' is.
|
|
|
|
... | ... | @@ -81,12 +83,28 @@ _translation-credits_: When translating this special message, you put your name( |
|
|
"Name FamilyName <someone@somewhere>\n"
|
|
|
"Name2 FamilyName2 <someoneelse@somewhere>"
|
|
|
|
|
|
**Testing your translation**
|
|
|
### Testing your translation
|
|
|
|
|
|
* download the .po file from the website
|
|
|
* compile the translation file with: `msgfmt -o po/pt.mo the_file_you_edited.po` (replace `pt` by your locale)
|
|
|
* copy the compiled 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](help/gajimfaq#configuration).
|
|
|
|
|
|
*Thank you very much!*
|
|
|
|
|
|
## Compiling plugin translations
|
|
|
|
|
|
In order to apply translations to plugins, Gajim’s [Plugins Translations](https://dev.gajim.org/gajim/gajim-plugins/-/wikis/pluginstranslationsplugin) plugin is needed. The plugin provides compiled .mo files containing the translations.
|
|
|
|
|
|
### How to compile
|
|
|
|
|
|
Gajim offers a script to compile the translations. For this to work, a symlink to the plugins repository is needed.
|
|
|
|
|
|
cd gajim-repository/scripts/dev
|
|
|
ln -s gajim-plugins-repository ./community_plugins
|
|
|
|
|
|
Copy the donwloaded .po files from the appropriate translation project (e.g. Gajim Plugins master for plugins master branch) to gajim-repository/scripts/dev and execute the following command for each .po file (here, de.po gets compiled to de.mo):
|
|
|
|
|
|
./plugins_translate make_mo de
|
|
|
|
|
|
*Thank you very much!* |
|
|
\ No newline at end of file |
|
|
After that, all .mo files can be copied to gajim-plugins-repository/plugins-translations and after restarting Gajim, translations will be available. |
|
|
\ No newline at end of file |