[Bug 7939] New: Separate po files for different MARC dialects
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Priority: P5 - low Change sponsored?: --- Bug ID: 7939 Assignee: frederic@tamil.fr Summary: Separate po files for different MARC dialects QA Contact: koha.sekjal@gmail.com Severity: enhancement Classification: Unclassified OS: All Reporter: magnus@enger.priv.no Hardware: All Status: NEW Version: master Component: I18N/L10N Product: Koha As suggested here: http://lists.koha-community.org/pipermail/koha-translate/2011-September/0016... I think it would be a good idea to have separate po files for MARC21, UNIMARC and NORMARC (value builders and XSLT). See also Bug 7934. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7934 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Viktor Sarge <viktor.sarge@regionhalland.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |viktor.sarge@regionhalland. | |se --- Comment #1 from Viktor Sarge <viktor.sarge@regionhalland.se> --- Sounds good - having large bulky .po-files makes it hard to prioritze during translation. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Assignee|frederic@tamil.fr |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 26530 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26530&action=edit Bug 7939 - Separate po files for different MARC dialects [PRELIMINAR - not in final form but can be tested] This patch implements separate PO files for different MARC dialects. To do so it depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Prominent changes: A) tmpl_process3.pl three new options: exclude or include certain filenames and a new source dir that can have multiple values B) LangInstaller.pm added definitions to create or update nn-NO-{MARCFLAVOR}.po and a little modification on install procedure C) Standarization of filenames OPAC prog po file is now xx-YY-opac-prog.po STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO (do it twice if there are warnings) 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po mv po/nn-NO-i-opac-t-prog-v-3006000.po po/nn-NO-opac-prog.po (most MARC dialect strings are on staff) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v More tests to come. To be continued... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Magnus Enger from comment #0)
I think it would be a good idea to have separate po files for MARC21, UNIMARC and NORMARC (value builders and XSLT).
See also Bug 7934.
Hi Magnus, do you want to try? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26530|0 |1 is obsolete| | --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 26537 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26537&action=edit Bug 7939 - Separate po files for different MARC dialects [PRELIMINAR 2 - not in final form but can be tested] This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Prominent changes: A) tmpl_process3.pl three new options: exclude or include certain filenames and a new source dir that can have multiple values (I opted to add this last feature and not change current source dir in order not to brake current usage) Minor change on use of msgmerge, now there are no backup files (*~) and obsoleted translations are removed (to produce smaller files) [this can be on another bug, is not strictly related with the pourpose of this bug] B) LangInstaller.pm added definitions to create or update nn-NO-{MARCFLAVOR}.po and modification on install procedure to handle multiple target dirs C) Standarization of filenames OPAC prog po file is now xx-YY-opac-prog.po STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po [again, renaming not related, can be in it's own bug] To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO (do it twice if there are warnings) 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po mv po/nn-NO-i-opac-t-prog-v-3006000.po po/nn-NO-opac-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-opac-ccsr.po po/nn-NO-opac-prog.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po [staff-help could be more properly staff-prog-help, another rename] Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort new | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same (save for a bogus help/nn-NO dir, without files. Working for a solution) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- On point 7.a), an error, must be sort old | uniq | tee s-old | wc -l > n-old -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26537|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 26576 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26576&action=edit Bug 7939 - Separate po files for different MARC dialects This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Prominent changes: A) tmpl_process3.pl three new options: exclude or include certain filenames and a new source dir that can have multiple values (I opted to add this last feature and not change current source dir in order not to brake current usage) Minor change on use of msgmerge, added use of msgattrib. Now there are no backup files (*~) and obsoleted translations are removed (to produce smaller files) [this can be on another bug, is not strictly related with the pourpose of this bug] B) LangInstaller.pm Added definitions to create or update xx-YY-{MARCFLAVOR}.po, minor change to create and install procedure, and modification of install procedure to handle multiple target dirs. Updated documentation. C) Standarization of filenames OPAC prog po file is now xx-YY-opac-prog.po STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po [again, renaming not related, can be in it's own bug] To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO (do it twice if there are warnings) 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po mv po/nn-NO-i-opac-t-prog-v-3006000.po po/nn-NO-opac-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-opac-ccsr.po po/nn-NO-opac-prog.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po [staff-help could be more properly staff-prog-help, another rename] Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort old | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case, but it's present on corresponding PO file) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26576|0 |1 is obsolete| | --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 26974 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26974&action=edit Bug 7939 - Separate po files for different MARC dialects This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Also depends on Bug 12061 Changes: A) LangInstaller.pm Added definitions to create or update xx-YY-{MARCFLAVOR}.po, minor change to create and install procedure, and modification of install procedure to handle multiple target dirs. Updated documentation. B) Standarization of filenames OPAC prog po file is now xx-YY-opac-prog.po STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po [renaming not related, can be in it's own bug] To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO (do it twice if there are warnings) 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po mv po/nn-NO-i-opac-t-prog-v-3006000.po po/nn-NO-opac-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-opac-ccsr.po po/nn-NO-opac-prog.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po [staff-help could be more properly staff-prog-help, another rename] Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort old | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case, but it's present on corresponding PO file) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12061 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26974|0 |1 is obsolete| | --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 28472 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28472&action=edit Bug 7939 - Separate po files for different MARC dialects This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Also depends on Bug 12061 Changes: A) LangInstaller.pm Added definitions to create or update xx-YY-{MARCFLAVOR}.po, minor change to create and install procedure, and modification of install procedure to handle multiple target dirs. Updated documentation. B) Standarization of filenames OPAC prog po file is now xx-YY-opac-prog.po STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po [renaming not related, can be in it's own bug] To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO (do it twice if there are warnings) 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po mv po/nn-NO-i-opac-t-prog-v-3006000.po po/nn-NO-opac-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-opac-ccsr.po po/nn-NO-opac-prog.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po [staff-help could be more properly staff-prog-help, another rename] Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort old | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case, but it's present on corresponding PO file) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |chris@bigballofwax.co.nz --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Hi Bernardo, this needs a rework as prog has been removed from the OPAC now -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28472|0 |1 is obsolete| | --- Comment #10 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 36241 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36241&action=edit Bug 7939 - Separate po files for different MARC dialects This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Changes: A) LangInstaller.pm Added definitions to create or update xx-YY-{MARCFLAVOR}.po, minor change to create and install procedure, and modification of install procedure to handle multiple target dirs. Updated documentation. B) Standarization of filenames STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort old | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case, but it's present on corresponding PO file) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=7939 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36241|0 |1 is obsolete| | --- Comment #11 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 36378 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36378&action=edit Bug 7939 - Separate po files for different MARC dialects This patch implements separate PO files for different MARC dialects. It depends on correct filenames, i.e. it will build PO files using files with/without "unimarc|normarc|marc21" on their names. Changes: A) LangInstaller.pm Added definitions to create or update xx-YY-{MARCFLAVOR}.po, minor change to create and install procedure, and modification of install procedure to handle multiple target dirs. Updated documentation. B) Standarization of filenames STAFF po file is now xx-YY-staff-prog.po MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po To test: 1) Update po files for your preferred language, ej. nn-NO cd misc/translator perl translate update nn-NO 2) Do some copying/renaming cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po (most MARC dialect strings are on staff, so we use that as basis) 3) Apply the patch 4) Update again to fix translation files, verbose perl translate update nn-NO -v 5) Install language, verbose, verify translations perl translate install nn-NO -v 6) Create translation files rm po/nn-NO* perl translate create nn-NO we must have this list: po/nn-NO-marc-MARC21.po po/nn-NO-marc-NORMARC.po po/nn-NO-marc-UNIMARC.po po/nn-NO-opac-bootstrap.po po/nn-NO-pref.po po/nn-NO-staff-help.po po/nn-NO-staff-prog.po Additional tests: 7) Number of msgids 7.a) Before patch and after upgrade, extract and count msgids for i in $(ls po/nn-NO-*po); \ do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \ egrep ^msgid nn-old.po >> old; \ done sort old | uniq | tee s-old | wc -l > n-old s-old: have all msgids n-old: number of msgids 7.b) After patch and after creation of new files Repeat procedure, diferent files (s-new, n-new) 7.c) Compare (diff s-old snew), they are the same (save for a strange UNIMARC char in my case, but it's present on corresponding PO file) 8) Installed dirs/files 8.a) List of EN dirs/files cd koha-tmpl find | egrep "/en/" > en 8.b) List of nn-NO dirs/files. After patch and language install cd koha-tmpl find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn 8.c) Compare (diff en nn), they are the same Signed-off-by: Magnus Enger <magnus@enger.priv.no> Followed the steps outlined by Bernardo, and everything works as expected. I think the most important points are that "perl translate create nn-NO" produces the right files, and translating anything in them, then doing "translate install" makes the translations show up in the interface. The numbers msgids in the nn-NO correspond well wit the number of msgids in other sets of .po files. I bet y'all will be happy when you don't have to see the stupid Norwegian strings when you translate! ;-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13897 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |jonathan.druart@biblibre.co | |m CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Bernardo, All looks good but I would like to know what is the plan when it will be pushed into master. Because update/install won't work until the po file is not recreated. Do you plan a big commit? I am wondering if the good idea wouldn't be to wait for the "git repo cleanup" you are doing (have done?) with Chris (see http://lists.koha-community.org/pipermail/koha-devel/2015-March/041293.html). It will avoid the creation and deletion of the same files in a short time. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Note that this patch removes the version number in the filename Introduced by: commit 814795da60318c70059fc1dfbe7be4da37109db0 Author: Frédéric Demians <f.demians@tamil.fr> Date: Sun Dec 19 10:57:51 2010 +0100 Bug 5506 Improve translation script And updated only once: commit 69333c9f79bf2cb8ac4e58f46da714dca962a8ee Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Sat Oct 22 05:33:40 2011 +1300 Moving po files to 3.6.0 filenames What was the idea behind that? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think in the past all the po files used to have the version number of the version they were applying to - but it was more trouble than useful to keep changing the file names. Currently the staff po file is the only file that still has a (wrong) version number. I am in favor of the change! :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Bernardo, can you please take a look? Tomas has set us a tight deadline! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #16 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Jonathan Druart from comment #12)
Bernardo, All looks good but I would like to know what is the plan when it will be pushed into master. Because update/install won't work until the po file is not recreated. Do you plan a big commit?
Jonathan, if/when this bug is pushed i'll provide our RM with a patch to update/rename all po files. I've done something similar before, on every major release and to fix errors in translation files. But yes, until 'that' patch is pushed, translate will be problematic. But we can warn the RM to push this and the other together.
I am wondering if the good idea wouldn't be to wait for the "git repo cleanup" you are doing (have done?) with Chris (see http://lists.koha-community.org/pipermail/koha-devel/2015-March/041293.html). It will avoid the creation and deletion of the same files in a short time.
We haven't agreed on a timeline yet, but in any case i'll be after 3.20 (In reply to Jonathan Druart from comment #13)
Note that this patch removes the version number in the filename ... What was the idea behind that?
As Katrin said, it's a relic from the past, not updated in a long long time. It's a change with no practical justification, only a aesthetic one. I prefer not to have a wrong number. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36378|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38423 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38423&action=edit Bug 7939 - Separate po files for different MARC dialects -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- All looks good, great work Bernardo! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Small patch |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Bernardo! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org