[Koha-bugs] [Bug 28291] koha-translate install script producing incorrectly encoded YAML translation files
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri May 7 13:44:48 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28291
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #120624|0 |1
is obsolete| |
--- Comment #4 from Kyle M Hall <kyle at 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 at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list