Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Bug 1226382: Store Firefox OS strings in separate pofiles. #221

Closed
wants to merge 1 commit into from

Conversation

Osmose
Copy link

@Osmose Osmose commented Nov 24, 2015

db_strings.py now generates pot files for each Firefox OS version in the
database, and then uses msgmerge to merge them into individual pofiles
for each locale. makemessages is replaced by extract and merge from
puente, which extracts non-database strings to messages.po instead of
django.po.

A new script, collectstrings.py, is added to collect the strings from
all the pofiles for a locale and combine them together into a django.po
file that can be used for translation.

This is missing some tests for the utilities, possibly some tests for the commands themselves (@jgmize said they'd be a nice-to-have), better comments/docstrings, and updates to the sphinx documentation about the l10n flow. I'll be working on those next along with testing this on the demo instance that was set up.

But since I'm off for the holiday starting tomorrow and not sure if I'll get all that done by the end of today, I'm submitting this now for preliminary review and commentary. I tested locally and, as far as I can tell, this is working pretty well. The django.po files generated by the new flow have all the same entities as the old ones.

@glogiotatidis Any preliminary input/review on this would be appreciated, otherwise I'll ping you again when the remaining tasks I mentioned above are done. Thanks!

@Osmose
Copy link
Author

Osmose commented Nov 24, 2015

Oh, also the changes I made to the Jenkins script are completely untested and I'm not entirely sure how to test them myself.

@Osmose
Copy link
Author

Osmose commented Dec 2, 2015

Updated with tests for the utility methods and documentation.

Mathjazz tested the generated pofiles on Pontoon yesterday, and while they worked fine, the combined "shared" translation files contained too many strings that needed to be translated but were unused in several locales. So I'm going to make one more update to this PR so that multiple "shared" translation files are created based on the Firefox OS versions involved. This lets us remove all unused strings for each locale, at the expense of being a bit messy in terms of the number of files. Mathjazz is okay with this tradeoff.

db_strings.py now generates pot files for each Firefox OS version in the
database, and then uses msgmerge to merge them into individual pofiles
for each locale. makemessages is replaced by extract and merge from
puente, which extracts non-database strings to messages.po instead of
django.po.

A new script, collectstrings.py, is added to collect the strings from
all the pofiles for a locale and combine them together into a django.po
file that can be used for translation.
@Osmose
Copy link
Author

Osmose commented Dec 3, 2015

Updated with the aforementioned changes. We now generate a silly number of pofiles and the generation takes a minute or so, but this will save the translators a lot of effort in the long run, and is still easier than modifying Pontoon's sync. :P

@Osmose
Copy link
Author

Osmose commented Dec 11, 2015

So, ummmm.....

Closing this.

@Osmose Osmose closed this Dec 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant