https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26547

--- Comment #32 from Julian Maurice <[email protected]> ---
Created attachment 196164
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196164&action=edit
Bug 26547: [DONT PUSH] Add script to update existing pref PO files

The script will convert pref PO files to the new format, with proper
msgctxt, reference set, and with a clean msgid
It will be needed only once before running `gulp po:update` for the
first time after applying patches of bug 26547, so this patch should not
be pushed.
This step is needed to not lose any translation.

Test plan:
1. git remote update && git checkout main && git reset --hard origin/main
2. gulp po:update --lang fr-FR
3. cp po/fr-FR-pref.po /tmp/fr-FR-pref-main.po
4. cp /tmp/fr-FR-pref-main.po /tmp/fr-FR-pref-main-updated.po
5. misc/devel/update-pref-po-file.pl /tmp/fr-FR-pref-main-updated.po
6. msgcat -F --no-wrap /tmp/fr-FR-pref-main-updated.po >
/tmp/fr-FR-pref-main-updated-sorted.po
7. cp /tmp/fr-FR-pref-main-updated.po misc/translator/po/fr-FR-pref.po
8. gulp po:update --lang fr-FR
9. msgcomm -u /tmp/fr-FR-pref-main-updated.po misc/translator/po/fr-FR-pref.po
   This should print nothing, meaning the result of `gulp:update` is the
   same as the result of update-pref-po-file.pl
10. diff -U3 /tmp/fr-FR-pref-main-updated-sorted.po
misc/translator/po/fr-FR-pref.po
    The diff should be empty
11. msgattrib --only-fuzzy /tmp/fr-FR-pref-main.po | grep -c '^msgid'
    msgattrib --only-fuzzy /tmp/fr-FR-pref-main-updated.po | grep -c '^msgid'
    The output of those two commands should be the same, meaning no
    "fuzzy" attribute was added or removed
12. misc/translator/translate install fr-FR
    Check that preferences are correctly translated in the staff
    interface

For the Release Manager and/or Translation Manager:

Once this patchset is pushed, all pref PO files should be updated and
uploaded to Weblate and/or pushed to koha-l10n (not sure about the exact
workflow)
The process should look like this:
1. Apply this patch
2. Run `misc/devel/update-pref-po-file.pl misc/translator/po/*-pref.po`
3. Run `gulp po:update`
4. Discard this patch
5. Push to koha-l10n and/or send to weblate

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to