Summary: | Do not wrap PO files | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, m.de.rooy, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34959 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
23.11.00,23.05.06,22.11.12,22.05.17,21.11.26
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 35079 | ||
Attachments: |
Bug 35024: Do not wrap translations
Bug 35024: Do not wrap translations Bug 35024: Do not wrap translations |
Description
Jonathan Druart
2023-10-11 08:49:32 UTC
One solution is to use --no-wrap, and never wrap :) I sent an email to the list about this suggestion https://lists.katipo.co.nz/pipermail/koha/2023-October/060143.html Created attachment 157229 [details] [review] Bug 35024: Do not wrap translations PO files wrap differently depending on versions. Looks like (thanks Julian!) it's coming from libunistring, between 0.9.10 and 1.0 I am seeing a change in how the strings in the PO files are wrapped. Debian 11 (using libunistring 0.9): "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s %sÉté" "%s %s %sAut%s %s %sHiv%s %s %s %s" Debian 12, Ubuntu 22.04(using libunistring 1.0) "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s " "%sÉté%s %s %sAut%s %s %sHiv%s %s %s %s" It *could* come from this changes: https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=NEWS;h=5a43ddd7011d62a952733f6c0b7ad52aa4f385c7;hb=HEAD * The functions u*_possible_linebreaks and u*_width_linebreaks now make it easier to work with strings that contain CR-LF sequences: In this case, in the returned array, it will return UC_BREAK_CR_BEFORE_LF followed by UC_BREAK_MANDATORY (instead of twice UC_BREAK_MANDATORY). The command used is: % msgmerge --backup=off --quiet -F --update misc/translator/po/fr-FR-staff-prog.po misc/translator/Koha-staff-prog.pot No matter the value of --width. One solution is to use --no-wrap, and never wrap :) I sent an email to the list about this suggestion https://lists.katipo.co.nz/pipermail/koha/2023-October/060143.html Test plan: % gulp po:update --lang LANG And notice that the lines are no wrapped anymore. Note that in master there were already not wrapped (?) commit edd378f4d14d79107d662b053c8e6f750326dd23 Translation updates for Koha 23.05.00 Files will be wrapped now. Files will no longer be wrapped. Created attachment 157388 [details] [review] Bug 35024: Do not wrap translations PO files wrap differently depending on versions. Looks like (thanks Julian!) it's coming from libunistring, between 0.9.10 and 1.0 I am seeing a change in how the strings in the PO files are wrapped. Debian 11 (using libunistring 0.9): "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s %sÉté" "%s %s %sAut%s %s %sHiv%s %s %s %s" Debian 12, Ubuntu 22.04(using libunistring 1.0) "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s " "%sÉté%s %s %sAut%s %s %sHiv%s %s %s %s" It *could* come from this changes: https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=NEWS;h=5a43ddd7011d62a952733f6c0b7ad52aa4f385c7;hb=HEAD * The functions u*_possible_linebreaks and u*_width_linebreaks now make it easier to work with strings that contain CR-LF sequences: In this case, in the returned array, it will return UC_BREAK_CR_BEFORE_LF followed by UC_BREAK_MANDATORY (instead of twice UC_BREAK_MANDATORY). The command used is: % msgmerge --backup=off --quiet -F --update misc/translator/po/fr-FR-staff-prog.po misc/translator/Koha-staff-prog.pot No matter the value of --width. One solution is to use --no-wrap, and never wrap :) I sent an email to the list about this suggestion https://lists.katipo.co.nz/pipermail/koha/2023-October/060143.html Test plan: % gulp po:update --lang LANG And notice that the lines are no wrapped anymore. Note that in master there were already not wrapped (?) commit edd378f4d14d79107d662b053c8e6f750326dd23 Translation updates for Koha 23.05.00 Signed-off-by: David Nind <david@davidnind.com> Testing notes using KTD: 1. Applied patch. 2. Ran: gulp po:update --lang dr-FR 3. Searched misc/translator/po/fr-FR-staff-prog.po for Printemps - note that msgstr is now all on one line. Created attachment 157399 [details] [review] Bug 35024: Do not wrap translations PO files wrap differently depending on versions. Looks like (thanks Julian!) it's coming from libunistring, between 0.9.10 and 1.0 I am seeing a change in how the strings in the PO files are wrapped. Debian 11 (using libunistring 0.9): "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s %sÉté" "%s %s %sAut%s %s %sHiv%s %s %s %s" Debian 12, Ubuntu 22.04(using libunistring 1.0) "%s %sPrintemps%s %s %sÉté%s %s %sAutomne%s %s %sHiver%s %s %sPrtps%s %s " "%sÉté%s %s %sAut%s %s %sHiv%s %s %s %s" It *could* come from this changes: https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=NEWS;h=5a43ddd7011d62a952733f6c0b7ad52aa4f385c7;hb=HEAD * The functions u*_possible_linebreaks and u*_width_linebreaks now make it easier to work with strings that contain CR-LF sequences: In this case, in the returned array, it will return UC_BREAK_CR_BEFORE_LF followed by UC_BREAK_MANDATORY (instead of twice UC_BREAK_MANDATORY). The command used is: % msgmerge --backup=off --quiet -F --update misc/translator/po/fr-FR-staff-prog.po misc/translator/Koha-staff-prog.pot No matter the value of --width. One solution is to use --no-wrap, and never wrap :) I sent an email to the list about this suggestion https://lists.katipo.co.nz/pipermail/koha/2023-October/060143.html Test plan: % gulp po:update --lang LANG And notice that the lines are no wrapped anymore. Note that in master there were already not wrapped (?) commit edd378f4d14d79107d662b053c8e6f750326dd23 Translation updates for Koha 23.05.00 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Trivial change, great improvement. PO's look good and work as expected. Passing QA Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.05 Ah like Bug 34959 this is for next release. Reverted |