This provides scripts/rosetta/fix_translation_credits.py which marks all
existing untranslated credits messages as translated by calling
setTranslationCreditsToTranslated() on each POTMsgSet.
== Implementation details ==
It collects a full list of POFiles and relevant POTMsgSets through
POFileSet.getPOFilesWithTranslationCredits, and doesn't exclude those
which are already translated, though, because of the way
setTranslationCreditsToTranslated is implemented (first check for a
shared message), it works much faster over already translated ones
(tested and confirmed in practice :).
There is a minor change to setTranslationCreditsToTranslated to include
force_shared (so we don't mess up imported diverged and current
translations by accident), along with a new test in test_potmsgset.
The collection method in POFileSet is tested in test_pofile.
Also, full test suite run has completed and there are no test failures.
Script itself is not tested in an automated way, because it mostly
integrates all of the above. Perhaps a small "it runs" test should be
added to make sure privileges are fine.
= Bug #459132 =
This provides scripts/ rosetta/ fix_translation _credits. py which marks all reditsToTransla ted() on each POTMsgSet.
existing untranslated credits messages as translated by calling
setTranslationC
== Implementation details ==
It collects a full list of POFiles and relevant POTMsgSets through getPOFilesWithT ranslationCredi ts, and doesn't exclude those reditsToTransla ted is implemented (first check for a
POFileSet.
which are already translated, though, because of the way
setTranslationC
shared message), it works much faster over already translated ones
(tested and confirmed in practice :).
There is a minor change to setTranslationC reditsToTransla ted to include
force_shared (so we don't mess up imported diverged and current
translations by accident), along with a new test in test_potmsgset.
The collection method in POFileSet is tested in test_pofile.
Also, full test suite run has completed and there are no test failures.
Script itself is not tested in an automated way, because it mostly
integrates all of the above. Perhaps a small "it runs" test should be
added to make sure privileges are fine.
= Demo & QA =
Run it. Run it on staging.
scripts/ rosetta/ fix_translation _credits. py -vvv
= Tests =
bin/test -vvt test_potmsgset -t test_pofile -t doc.potmsgset.txt
= Lint =
Lint is fine.