Bristol-Braille / canute-ui

User interface for the Canute electronic Braille reader.
http://bristolbraille.co.uk
GNU General Public License v3.0
36 stars 6 forks source link

Support language packs on external media #198

Open zwbrbr opened 5 years ago

zwbrbr commented 5 years ago

Split off from #124.

@pachpict Still needs clarification on what level of expertise we expect a translation producer to have. Producing the translations is one part of it, and I expect the answer is "able to use Transifex". The other part is getting those translations into the compiled format expected by i18n libraries and putting them in the correct directory structure. So, are we leaving translators to navigate that or are we asking them to contribute translations back to us, which we package for them plus integrate into the next release?

zwbrbr commented 5 years ago

If a locale dir on media follows conventions, we can employ normal resolution with gettext.find() on additional dirs, and open a found .mo with gettext.GNUTranslations(file_obj). Other parts of the puzzle are enumerating available translations in a sensible way, and a way to put the translation's menu item text into, and retrieve it from, .mo files (probably in the MIME-esque metadata section).

pachpict commented 5 years ago

For now we can get away with adding language through UI updates.