Comment 1 for bug 1681864

Revision history for this message
Ben Shum (bshum) wrote :

Looks like we may want to insert a step for "pocommentclean" which is part of translate toolkit and can be used to remove all existing comments in a given file. While the manpage says that you can only use pocommentclean against po directories and not individual files, my local testing with translate toolkit 1.13.0 on Ubuntu 16.04 yielded successfully cleaned files on a case by case basis.

So running "pocommentclean build/i18n/po/db.seed/fr-CA.po" resulted in a file fr-CA.po with no comments in it. Followed by running the individual command to update one PO file, like "pot2po --progress verbose -i po/db.seed/db.seed.pot -o po/db.seed/fr-CA.po -t po/db.seed/fr-CA.po" which resulted in an fr-CA.po file with the corrected IDs only (and all the updated IDs that were missing from the file too).

We'd have to figure out where best to implement the task to clean out the existing IDs and replace them all. And then with git version control tracking all our changes, the final update that gets committed would appear only to replace any mistakes in the file. Any existing IDs that are unchanged would remain unchanged with the git history.

Further testing and coding to come...