Difference between revisions of "Server Internationalisation"

From MusicBrainz Wiki
(Importing ISO lists)
Line 34: Line 34:
 
*Download a .po for translation from Transifex. We'll assume it's called mbs.po for the sake of commands below.
 
*Download a .po for translation from Transifex. We'll assume it's called mbs.po for the sake of commands below.
 
*Download the proper language .po from the link above for each of the three lists. We'll assume they're called 3166.po, 639.po, and 15924.po.
 
*Download the proper language .po from the link above for each of the three lists. We'll assume they're called 3166.po, 639.po, and 15924.po.
*'''Check the translations &ndash many are wrong in some translations, and if so you should not import.'''
+
*'''Check the translations – many are wrong in some translations, and if so you should not import.'''
 
*<code>msgmerge -N 3166.po mbs.po -o mbs1.po</code>
 
*<code>msgmerge -N 3166.po mbs.po -o mbs1.po</code>
 
*<code>msgmerge -N 639.po mbs1.po -o mbs2.po</code>
 
*<code>msgmerge -N 639.po mbs1.po -o mbs2.po</code>

Revision as of 04:01, 24 May 2012

The MusicBrainz Server code is using gettext to provide with automatic internationalisation of messages and texts used in the Perl code and templates.

A .pot file is provided with all the strings used in the server. They are in English.

Getting started

If you want to help translate, go to the Transifex page and create an account. If there is already a team for your language, you can request to join it, if not, you can ask for the creation of a new team.

Viewing the translations

The translations are available at http://i18n.mbsandbox.org/ - however the only way to change the language at present is via the browser's language settings. The available languages (some much more complete than others) are en-au, en-ca, cy, de, el, eo, es-es, fr-ca, fr-fr, id-id, it, ja, nl, no, pl, pt-br, ru, tr and a special fake translation en-aq.

The translations on http://i18n.mbsandbox.org/ update every hour. If you have made changes on Transifex which are still not showing up several hours later, please contact Nikki.

Language-specific pages

This wiki is the perfect place to discuss specific languages translations issues such as glossary, or right-to-left required patches etc.

Importing ISO lists

There are conveniently LGPL 2.1 pretranslated lists for a bunch of ISO standard lists at http://anonscm.debian.org/gitweb/?p=iso-codes/iso-codes.git;a=tree (specifically, we use 3166, 639, and 15924).

To bring these translations in as a base for countries, languages, and scripts, follow this procedure:

  • Download a .po for translation from Transifex. We'll assume it's called mbs.po for the sake of commands below.
  • Download the proper language .po from the link above for each of the three lists. We'll assume they're called 3166.po, 639.po, and 15924.po.
  • Check the translations – many are wrong in some translations, and if so you should not import.
  • msgmerge -N 3166.po mbs.po -o mbs1.po
  • msgmerge -N 639.po mbs1.po -o mbs2.po
  • msgmerge -N 15924.po mbs2.po -o mbs-final.po
  • msgfmt -c mbs-final.po
  • Correct any errors msgfmt complains about, then use Transifex's 'Upload File' and upload mbs-final.po.

Alternatively the ISO standard lists can be uploaded directly to Transifex, which will subsequently merge the common strings itself as appropriate.

Congratulations, you should then have all the countries/languages/scripts translated!