Bugzilla – Attachment 157229 Details for
Bug 35024
Do not wrap PO files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35024: Do not wrap translations
Bug-35024-Do-not-wrap-translations.patch (text/plain), 2.59 KB, created by
Jonathan Druart
on 2023-10-17 11:48:03 UTC
(
hide
)
Description:
Bug 35024: Do not wrap translations
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-10-17 11:48:03 UTC
Size:
2.59 KB
patch
obsolete
>From 82d7b347ca39c53f4a79f444fcd22804355d14f2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Oct 2023 11:35:41 +0200 >Subject: [PATCH] Bug 35024: Do not wrap translations >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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 >--- > gulpfile.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/gulpfile.js b/gulpfile.js >index 95f557c5c75..52ee337ef77 100644 >--- a/gulpfile.js >+++ b/gulpfile.js >@@ -284,7 +284,7 @@ function po_create_installer_marc21 () { return po_create_type('installer-MARC2 > function po_create_installer_unimarc () { return po_create_type('installer-UNIMARC') } > > function po_update_type (type) { >- const msgmerge_opts = '--backup=off --quiet -F --update'; >+ const msgmerge_opts = '--backup=off --no-wrap --quiet -F --update'; > const cmd = `msgmerge ${msgmerge_opts} <%= file.path %> misc/translator/Koha-${type}.pot`; > const languages = getLanguages(); > const globs = languages.map(language => `misc/translator/po/${language}-${type}.po`); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35024
:
157229
|
157388
|
157399