Help out translating Freediving Spots
Why?
The intention of the Freediving Spots website is to be a global platform, accessible by freedivers around the world. Since not everyone is fluent in English, it would be nice to offer the user interface in as much languages as possible.
To do so, I need your help. I'm a native Dutch speaker, can read and write English pretty OK, and know my way around German. But that's where it ends. There are a lots of freedivers who'd rather see the site in for example, French, Spanish, Italian, Danish or Japanese. If you are fluent in one of these languages and in English and you have an hour left to translate some 250 sentences that would be greatly appreciated!.
How?
How to do this? The website makes use of the GNU gettext functionality. This is a tool which places text strings in a special file called messages.po. Each word or sentence that needs to be translated is marked in this file by an ID / string pair like this:
#: addcomment.php:18
#: showlocation.php:99
msgid "Add a comment"
msgstr "Voeg commentaar toe"
In this case the string "Add a comment" will be translated to the Dutch equivalent "Voeg commentaar toe". You can either do all these translations manually in the messages.po textfile. Or you can download a freeware tool called poEdit for Windows or Linux which makes it very easy to quickly translate sentences. The tool does not do any translating. But it will keep track for you of the untranslated words, or the ones that need a review. Anything behing a # is a comment or something the gettext tool uses to keep track of all the words. You can happily ignore those lines. In the clean messages.po you need to download to start translating the msgstr lines will be empty, since there is no translation yet.
If you have translated the file into your language, please mail that file to info@freedivingspots.net with the name of the language you have translated it in (this last part is obvious for yourself, but I'm probably not able to read your language and have to guess what it is).
Who?
So who have been so kind to spend a bit of their time to help out? A great many thanks goes to:
- Danish - Johnny Carlsson
- Finnish - Pekka Mehtala
- English - Jaap Voets
- Dutch - Jaap Voets
- Spanish - Adrian Valls
- German - Veronika Dittes
- French - Fabrice Desré
- Portuguese - Patricia Werneck Ribas
- Croatian - Guybrush Threepwood
Technical stuff
To have a place for myself to remember all the steps needed in creating the language files
- Copy all the php sources and inc files to a directory
- run xgettext --msgstr-prefix="" -s --language=PHP *.php *.inc to create the english messages.po
the --msgstr-prefix part will copy the msgid into the msgstr, saves a lot of work.
- run xgettext -s --language=PHP -o messages.pot *.php *.inc to create the empty master messages.pot template file
- Copy the messages.pot file to a specific locale. e.g. cp messages.pot locale/nl_NL/lC_MESSAGES
- run msgmerge -o messages.po.new messages.po messages.pot. This will copy old translations that are still valid from messages.po to message.po.new, using the new messages.pot translations file as the basis.
- If the messages.po.new looks good, move it over the old messages.po mv messages.po.new messages.po
- Fill in the blanks, all the msgid's that still need translating. You can do this manually, or use the very helpful poEdit tool.
- Finally run msgfmt to create the binary messags.mo msgfmt messages.po. Or use poEdit to do this automatically.
- Repeat for all the languages you support.
Back to main page