[Bug 28291] New: koha-translate install script producing incorrectly encoded YAML translation files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Bug ID: 28291 Summary: koha-translate install script producing incorrectly encoded YAML translation files Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Keywords: rel_21_05_candidate Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Blocks: 27623 The "koha-translate install" script AKA "misc/translator/translate install" script produces incorrectly encoded YAML files. To reproduce: $ cd misc/translator $ ./translate update pl-PL $ ./translate install pl-PL $ cd - $ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml notice the file contains garbled characters. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27623 [Bug 27623] Remove pl-PL installer data -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 120532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120532&action=edit Bug 28291: Make koha-translate script produce valid UTF-8 YAML files We had two problems in the LangInstaller.pm module: 1) the PO file was read as bytes instead of as a UTF-8 text stream 2) The YAML file being outputted was double encoded, once by setting the file handle to output UTF-8 and other time in the DumpFile function internally To test: 1. Before applying patch do the following $ cd misc/translator $ ./translate update pl-PL $ ./translate install pl-PL $ cd - $ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml 2. Notice the output of the authorities_normal_marc21.yml contains invalid looking UTF-8 characters 3. $ git clean -d -f # to remove the old translation files 4. Apply patch and repeat the steps and notice the authorities_normal_marc21.yml contains valid looking UTF-8 characters -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Moving this to needs sign-off given there is a manual test plan and the LangInstaller module modified here is only used by misc/translator/translate perl script... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120532|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 120624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120624&action=edit Bug 28291: Make koha-translate script produce valid UTF-8 YAML files We had two problems in the LangInstaller.pm module: 1) the PO file was read as bytes instead of as a UTF-8 text stream 2) The YAML file being outputted was double encoded, once by setting the file handle to output UTF-8 and other time in the DumpFile function internally To test: 1. Before applying patch do the following $ cd misc/translator $ ./translate update pl-PL $ ./translate install pl-PL $ cd - $ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml 2. Notice the output of the authorities_normal_marc21.yml contains invalid looking UTF-8 characters 3. $ git clean -d -f # to remove the old translation files 4. Apply patch and repeat the steps and notice the authorities_normal_marc21.yml contains valid looking UTF-8 characters Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120624|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120685&action=edit Bug 28291: Make koha-translate script produce valid UTF-8 YAML files We had two problems in the LangInstaller.pm module: 1) the PO file was read as bytes instead of as a UTF-8 text stream 2) The YAML file being outputted was double encoded, once by setting the file handle to output UTF-8 and other time in the DumpFile function internally To test: 1. Before applying patch do the following $ cd misc/translator $ ./translate update pl-PL $ ./translate install pl-PL $ cd - $ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml 2. Notice the output of the authorities_normal_marc21.yml contains invalid looking UTF-8 characters 3. $ git clean -d -f # to remove the old translation files 4. Apply patch and repeat the steps and notice the authorities_normal_marc21.yml contains valid looking UTF-8 characters Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Kyle, the attached patches don't contain your SO line, the same with bug 28281. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- This depends on Bug 22824 no ? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org