[Bug 10214] New: malformed syspref.po file
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Bug ID: 10214 Summary: malformed syspref.po file Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: paul.poulain@biblibre.com CC: frederic@tamil.fr The ln-LN-pref.po file (in misc/translator/po/, generated by ./translate install|update ln-LN is malformed. It lacks the .po header that is in other i18n files: # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-05-07 08:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" Without this header, a tool like transifex complains (and refuses to upload the file). Adding it fixes the problem -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.tajoli@cineca.it --- Comment #1 from Zeno Tajoli <z.tajoli@cineca.it> --- The header is useful also for a GUI tool like Poedit -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> --- Le 07/05/2013 18:42, Bernardo Gonzalez Kriegel a écrit :>
I use to download syspref.po, add the header and then upload to pootle. We may check how is created/updated.
The .po files are generated by misc/translator/translate script. Digging a little, I've found that the culprit is probably in LangInstaller.pm, sub save_po { my $self = shift; # Write .po entries into a file put in Koha standard po directory Locale::PO->save_file_fromhash( $self->po_filename, $self->{po} ); say "Saved in file: ", $self->po_filename if $self->{verbose}; Other .po are generated by tmpl_process3.pl AFAIK (but i'm not a translation process specialist, I may be wrong) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 --- Comment #3 from Frédéric Demians <frederic@tamil.fr> --- Can anyone post the missing header here as a comment? I will take a look at how to add it directly from the translation script. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |frederic@tamil.fr |ity.org | --- Comment #4 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 18132 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18132&action=edit Proposed patch With this patch, header is created when creating a new syspref .po file for a new language (translate create), and is added if it doesn't already exist when updating an existing language (translate update). To test: (1) Create a new language syspref file: ./translate create -p xx-XX Check that there is an header (2) Update an existing syspref file without header: ./translate update fr-FR Check that fr-FR-pref.po has a header (3) Update an existing syspref file with header: Modify fr-FR-pref.po. Add an email, or whatever. ./translate update fr-FR Check that fr-FR-pref.po has a header with the manual modification -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- This patch applies on master and 3.12 branch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18132|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 18133 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18133&action=edit [SIGNED-OFF] Bug 10214 Add header to syspref po files With this patch, header is created when creating a new syspref .po file for a new language (translate create), and is added if it doesn't already exist when updating an existing language (translate update). To test: (1) Create a new language syspref file: ./translate create -p xx-XX Check that there is an header (2) Update an existing syspref file without header: ./translate update fr-FR Check that fr-FR-pref.po has a header (3) Update an existing syspref file with header: Modify fr-FR-pref.po. Add an email, or whatever. ./translate update fr-FR Check that fr-FR-pref.po has a header with the manual modification Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. No errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18133|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 18142 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18142&action=edit [PASSED QA] Bug 10214 Add header to syspref po files With this patch, header is created when creating a new syspref .po file for a new language (translate create), and is added if it doesn't already exist when updating an existing language (translate update). To test: (1) Create a new language syspref file: ./translate create -p xx-XX Check that there is an header (2) Update an existing syspref file without header: ./translate update fr-FR Check that fr-FR-pref.po has a header (3) Update an existing syspref file with header: Modify fr-FR-pref.po. Add an email, or whatever. ./translate update fr-FR Check that fr-FR-pref.po has a header with the manual modification Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. No errors. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Also tested that updated pref files can still be installed correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10214 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.7 This solves translation files issues, I think is good for 3.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org