http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939
Magnus Enger <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36241|0 |1 is obsolete| | --- Comment #11 from Magnus Enger <[email protected]> --- 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 <[email protected]> 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. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
