From MusicBrainz Wiki
Revision as of 21:51, 3 July 2012 by Ianmcorvidae (New page: == Process == # .pot files get generated (by someone, automatic process, whatever) from something (some branch, presumably), at some time (we'd discussed "at beta freeze"). This is done by...)
- .pot files get generated (by someone, automatic process, whatever) from something (some branch, presumably), at some time (we'd discussed "at beta freeze"). This is done by running 'make pot' in the po/ folder on a machine with a checkout; working mbserver dependencies & Locale::PO (for extraction of strings from the DB and from templates); and xgettext (for extraction of strings from Perl code).
- .pot files get uploaded to 'resources' on Transifex manually, or if they're on my (ianmcorvidae's) update-pot branch on github with the correct names, Transifex auto-updates from them. (This autoupdate location can be changed, of course.)
- Translators translate things!
- Anyone who wants to use translations uses the tx client, or downloads manually from Transifex, the .po files they need/want.
- After naming the .po files correctly (within the po/ folder, <domain>.<language>.po), 'make install' will regenerate the <domain>.<language>.mo files and install them to lib/LocaleData/<language>/LC_MESSAGES/<domain>.mo.
- So long as the relevant language is in MB_LANGUAGES in DBDefs and the system has a locale installed for that language (yes, this is annoying, but building locales is easy), anyone sending the appropriate Accept-Language header gets a translated site!
Notes and open questions
- The language-switcher will result in changing the way people customarily set the language, but Accept-Language will still be a fallback method.
- There are some problems with Transifex, and it may eventually get moved away from. In any case, this changes only steps 2 and 4 from the perspective of a non-translator. The main contender, in my opinion, is weblate, which screws up less frequently and has better git integration. It's fairly new, or I suspect we'd have been using it already.
- Once we have some complete/official translations, they might get checked into git as well. This would just be the .po files, so it would simply obsolete step 4, leaving that to whoever checks them in/updates the versions in git. Implied question, of course, is when do those get updated.
- nikki/I (on rika) have a tx client configuration that downloads things to the right names (see step 5), which we might consider checking in so it's easy to update translations for people who care.
- nikki also has a 'translations' branch (on github) that backs up all our translations hourly (when there's changes). I copy this sometimes to my server and my github, for further backup goodness. We might eventually integrate this process -- of course, if we switch to weblate, that commits to git for us and it'd just be pulling/pushing elsewhere occasionally.