learningequality/ka-lite — pull request #1366 by bcipolli (2014-01-26 01:03:27+00:00)
Title: Solving language pack versioning issues

Language packs are not compatible across versions of KA Lite. We should build and update language packs across versions as best we can, which includes:

* Building translation strings only on the current version (as crowdin translations are not versioned)
* Updating subtitles, exercises, and dubbed video mappings across all versions

Before this PR, however, we weren't storing enough data (i.e. the per-version po/mo files) to rebuild language packs across versions.

In addition, we were building language packs inside the central server's `LC_MESSAGES` directory--which means that if `django.mo` compiled to a buggy state (which we've seen happen) and got loaded on a central server thread, that thread would not function.

Fixes:
* With @aronasorman 's move to using the `pofile` library instead of `compilemessages`, we no longer need to build in the `LC_MESSAGES` directory. Now we build in `ka-lite/data/i18n/build`.
* Keep a version of `django.mo` for each version.
* Recompile language packs across all versions (0.10.3, 0.11.1) by grabbing the available `django.mo`, or download & recompiling if that's the current version, and then packaging with the latest subtitles, dubbed video list, etc.

Testing:
* Tested a lot. This is running in production. It's OK to test more, but code review is the paramount thing here.

@aronasorman could you take a look?