[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 --- Comment #11 from Bernardo Gonzalez Kriegel --- *** Bug 19498 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Fridolin SOMERS changed: What|Removed |Added Version(s)|19.11.00|19.11.00,19.05.03 released in|| Status|Pushed to master|Pushed to stable CC||fridolin.som...@biblibre.co ||m --- Comment #10 from Fridolin SOMERS --- Pushed to 19.05.x for 19.05.03 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Martin Renvoize changed: What|Removed |Added Version(s)||19.11.00 released in|| Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 --- Comment #9 from Martin Renvoize --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Nick Clemens changed: What|Removed |Added Attachment #91899|0 |1 is obsolete|| --- Comment #8 from Nick Clemens --- Created attachment 91931 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91931=edit Bug 10492: Translation problems with TT directives in po files This patch implements the replacement of TTvariables '[%...%]' with normal placeholders '%s' for text inside HTML tags (eg. img, meta, input) The replacement is done in two files: * xgettext.pl, used on create/update, so TTvars are not found on the text to translate (msgid) * tmpl_proccess3.pl, used on install time, so the correct translation is found (msgstr) and the right TTvar is put on the translated text. To test: Before applying the patch 1) Update your favorite language cd misc/traslator perl translate update xx-YY 2) Build a list (ini.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > ini.txt 3) Apply the patch 4) Update your favorite language, again cd misc/traslator perl translate update xx-YY 5) Build a final list (end.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > end.txt 6) Compare both files, you must find (most) TTvars replaced by '%s' diff ini.txt end.txt for example: < msgid "Translate item type [% itemtype.itemtype | html %]" > msgid "Translate item type %s" < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]" > msgid "Holds on this item: %s / Total holds on this record: %s" < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" > msgid "tag_anchor_%s_%s%s" < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag" > msgid "%s - Click to Expand this Tag" 7) Translate one of the examples, with more than one variable if possible, for example this text in xx-YY-staff-prog.po > msgid "Holds on this item: %s / Total holds on this record: %s" Check it's not marked as 'fuzzy' 8) Apply the translation perl translate install xx-YY 9) Check the translated string has all variables in the right order edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/batchMod-edit.tt around line '187', first '[% item_loo.item_holds | html %]', then '[% item_loo.holds | html -%]' on this case, or use another example If approved this patch can be backported to current stable versions. Signed-off-by: Owen Leonard Signed-off-by: Nick Clemens -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Nick Clemens changed: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Owen Leonard changed: What|Removed |Added Attachment #89365|0 |1 is obsolete|| --- Comment #7 from Owen Leonard --- Created attachment 91899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91899=edit Bug 10492: Translation problems with TT directives in po files This patch implements the replacement of TTvariables '[%...%]' with normal placeholders '%s' for text inside HTML tags (eg. img, meta, input) The replacement is done in two files: * xgettext.pl, used on create/update, so TTvars are not found on the text to translate (msgid) * tmpl_proccess3.pl, used on install time, so the correct translation is found (msgstr) and the right TTvar is put on the translated text. To test: Before applying the patch 1) Update your favorite language cd misc/traslator perl translate update xx-YY 2) Build a list (ini.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > ini.txt 3) Apply the patch 4) Update your favorite language, again cd misc/traslator perl translate update xx-YY 5) Build a final list (end.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > end.txt 6) Compare both files, you must find (most) TTvars replaced by '%s' diff ini.txt end.txt for example: < msgid "Translate item type [% itemtype.itemtype | html %]" > msgid "Translate item type %s" < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]" > msgid "Holds on this item: %s / Total holds on this record: %s" < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" > msgid "tag_anchor_%s_%s%s" < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag" > msgid "%s - Click to Expand this Tag" 7) Translate one of the examples, with more than one variable if possible, for example this text in xx-YY-staff-prog.po > msgid "Holds on this item: %s / Total holds on this record: %s" Check it's not marked as 'fuzzy' 8) Apply the translation perl translate install xx-YY 9) Check the translated string has all variables in the right order edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/batchMod-edit.tt around line '187', first '[% item_loo.item_holds | html %]', then '[% item_loo.holds | html -%]' on this case, or use another example If approved this patch can be backported to current stable versions. Signed-off-by: Owen Leonard -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Owen Leonard changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 --- Comment #6 from Bernardo Gonzalez Kriegel --- Substitute koha-tmpl/intranet-tmpl/prog/es-ES for koha-tmpl/intranet-tmpl/prog/xx-YY on item 9) of test plan. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Bernardo Gonzalez Kriegel changed: What|Removed |Added Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Bernardo Gonzalez Kriegel changed: What|Removed |Added Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 --- Comment #5 from Bernardo Gonzalez Kriegel --- Created attachment 89365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89365=edit Bug 10492: Translation problems with TT directives in po files This patch implements the replacement of TTvariables '[%...%]' with normal placeholders '%s' for text inside HTML tags (eg. img, meta, input) The replacement is done in two files: * xgettext.pl, used on create/update, so TTvars are not found on the text to translate (msgid) * tmpl_proccess3.pl, used on install time, so the correct translation is found (msgstr) and the right TTvar is put on the translated text. To test: Before applying the patch 1) Update your favorite language cd misc/traslator perl translate update xx-YY 2) Build a list (ini.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > ini.txt 3) Apply the patch 4) Update your favorite language, again cd misc/traslator perl translate update xx-YY 5) Build a final list (end.txt) of 'msgid' to do a comparison msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > end.txt 6) Compare both files, you must find (most) TTvars replaced by '%s' diff ini.txt end.txt for example: < msgid "Translate item type [% itemtype.itemtype | html %]" > msgid "Translate item type %s" < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]" > msgid "Holds on this item: %s / Total holds on this record: %s" < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" > msgid "tag_anchor_%s_%s%s" < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag" > msgid "%s - Click to Expand this Tag" 7) Translate one of the examples, with more than one variable if possible, for example this text in xx-YY-staff-prog.po > msgid "Holds on this item: %s / Total holds on this record: %s" Check it's not marked as 'fuzzy' 8) Apply the translation perl translate install xx-YY 9) Check the translated string has all variables in the right order edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/batchMod-edit.tt around line '187', first '[% item_loo.item_holds | html %]', then '[% item_loo.holds | html -%]' on this case, or use another example If approved this patch can be backported to current stable versions. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Bernardo Gonzalez Kriegel changed: What|Removed |Added Assignee|koha-b...@lists.koha-commun |bgkrie...@gmail.com |ity.org | --- Comment #4 from Bernardo Gonzalez Kriegel --- (In reply to Katrin Fischer from comment #3) > Searching for [% in the po files for 19.05 finds 69 results. A lot of those > are like: > > Koha [% Version %] > > I am not sure why those exist yet. I would have expected Koha %s. They exist because they belong to 'attributes' in HTML tags, for example 'alt' in 'img', 'value' in inputs, or 'content' in 'meta'. In this particular case, on line 5 of opac-tmpl/bootstrap/en/includes/doc-head-close.inc there is Each line on each TT file is 'tokenized', and TTvariables are replaced with '%s'. But an HTML tag (i.e. ) is 'tokenized' as such, so no replacement is made there; only the text of some attributes is extracted in order to translate them. Ideally we should no use TTvariables inside tag attributes, but it's useful :) I'll try to write a patch to (partially) 'fix' this -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 --- Comment #3 from Katrin Fischer --- Searching for [% in the po files for 19.05 finds 69 results. A lot of those are like: Koha [% Version %] I am not sure why those exist yet. I would have expected Koha %s. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Marc Véronchanged: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16871 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Marc Véronchanged: What|Removed |Added CC||ve...@veron.ch See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16559 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Katrin Fischer katrin.fisc...@bsz-bw.de changed: What|Removed |Added CC||bgkrie...@gmail.com --- Comment #2 from Katrin Fischer katrin.fisc...@bsz-bw.de --- Taking a look at the 3.20 staff file, there are still a lot of [% showing up. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Katrin Fischer katrin.fisc...@bsz-bw.de changed: What|Removed |Added Severity|major |minor --- Comment #1 from Katrin Fischer katrin.fisc...@bsz-bw.de --- I have done some more tests on this and leaving the strings untouched will get you valid po files that also translate correctly in the templates. '[%%' will be correctly translated to '[%'. But I am still wondering why the translation scripts pick up a lot of those strings now. Also there is a difference - some TT code has the escaped % some does not. I am downgrading the bug, because if you are careful in your translations, you can create correct po files by just copying the strings without making any changes. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 10492] Translation problems with TT directives in po files
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492 Katrin Fischer katrin.fisc...@bsz-bw.de changed: What|Removed |Added Severity|enhancement |major -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/