Gettext is based on a text-file-dictionary called pot or po files.
The primary one is called keys.pot, and contains all the "msgids" used by the program.
You can edit the .po files using your favourite po/pot editor, as listed below
Some Suggestions are:
Getting the keys.pot file
- Get a copy of the keys.pot file from GitHub
- Make a copy of the keys.pot file, and rename it to <language-code>.po
The language-code is the ISO-639-1 code, see a list what to use here
- Open the newly created .po file in a text-editor or a po-editor
- Edit the headers, with your texteditor (recommended is Notepad Plus Plus), to reflect the language and other state of the translation
- Make sure your texteditor is set to UTF-8 Things that are important to be filled in properly:
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
- "Language-Team: LANGUAGE <LL@li.org>\n"
- "Language: <your language code>\n"
msgid "" msgstr "" "Project-Id-Version: v2.4\n" "Report-Msgid-Bugs-To: https://github.com/rlf/uSkyBlock/issues\n" "POT-Creation-Date: 2015-04-17 08:45+0200\n" "PO-Revision-Date: 2015-04-20 22:16+0000\n" "Last-Translator: Mikey Mouse <Mikey.Mouse@Disney.Com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n"
After those fields, mentioned above, are filled in, you can use your favourite po-editor to translate all the `msgstr` entries in the .po file.
- Note: Never touch or translate the msgid`s.
Updating the language files
Each release of the plugin can have an update to the text, this means that the translations need to be updated too.
The keys.pot file you downloaded in the first section of this tutorial is updated by us automatic (you can check the date of creation (POT-Creation-Date:) about 10 lines from the top).
Download the new version and overwrite the keys.pot you already got from the first time translating the file (or create a new file called keys.pot).
Update keys.pot with Poedit
In Poedit (link is above) is an option in the "Catalog" tab to "update from .pot file...", click that and browse to the keys.pot file to update your current language.po file.
After updating there might be a chance that some translations have been changed, these lines are called "fuzzy" and will be highlighted in the Poedit.
After this you can translate the new added lines and correct the "fuzzy" lines.
- Loco - Free online po-editor does NOT have the option to update the keys.pot file (I couldn't find the option)
Updating the language.po files
As this system is very input intense we have to allow others to help out or correct mistakes.
Make sure you have the latest keys.pot file to update the lanuage.po file first (see above for link and explanation howto), you can then continue to update or correct the translation.
You can find the latest translation here, copy/paste them into your favourite text editor and use "save as" to save it in the correct format (.po).
- Chinese zh_CN.po
- Danish da.po
- Dutch nl.po
- French fr.po
- German de.po
- Portuguese pt_BR.po
- Pirate xx_pirate.po
- Russian ru.po
- Spanish es.po
- Swedish sv.po
Once the .po file has been translated, post the .po file back to uSkyBlock, by either:
- create a pull-request to get it added to the official-release.
- paste it to pastebin, and create an issue on GitHub linking to it
- paste it to pastebin, and create a forum post on Spigot linking to it
- paste it to pastebin, and create a forum post on DevBukkit linking to it
- create an issue on GitHub, and attach the .po file to it
Once the .po file has been approved and merged to the uSkyBlock master, the translations will be available in the next release.
Files completed less then 50% will not be added.
Customize your translation
From uSkyblock v2.5.2 it will be possible to add your own [lang].po file.
Add a new folder at plugins/uskyblock folder and name it i18n and place the [country].po in there.
You can create the [lang].po files as explained above or you can download a ready made country.po and adjust what you want.
The way it works
When ever we need to lookup a translation, we look in:
a) uSkyBlock/i18n/[lang].po <-first look created by you
b) uSkyBlock.jar:i18n/[lang].po <-second look inside the plugin
So what that means is that when you add E.G. nl.po as default language but you don't like some of the translations (or want them more server orientated) you can add a nl.po file in the i18n folder with only the lines you want to be customized. The rest of the translation will be read from the original nl.po file from inside the plugin.
Translated so far
- Danish by R4zorax (99.9% done)
- Dutch by Dutchy1001 (99.9% done)
- Portuguese (Brazil) by _Rodrigo (85% done)
- Russian by Egor (85 done)
- French by TheWura (87% done)
- Spanish by HeertzMC (93% done)
- Pirate by R4zorax (99.9% done)
- Chinese (Simplified) by Miku_Snow (47% done)
- German by Notker (62% done)
- Swedish by maol3 (99.9% done
We can not be held responsible for translations not made by us.
If in any case a translation is not correct you can contact us and we will deal with the matter as soon we can.
In case of an translation on purpose being rude or inappropriate we will remove the translation.