[Bug 12192] New: Template toolkit code in HTML attributes is picked up into po-files
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12192 Bug ID: 12192 Summary: Template toolkit code in HTML attributes is picked up into po-files 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: pasi.kallinen@pttk.fi QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr If TT code is used in title, alt, value, label, etc. attribute, the code is picked up into the po-files as-is, instead of replacing it with a placeholder. For example: <a href="[% url %]" title="Remove facet [% facet.facet_link_value | html %]">x</a> shows up in the po-files as: msgid "Remove facet [% facet.facet_link_value | html %]" -- 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=12192 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |veron@veron.ch Resolution|--- |INVALID --- Comment #1 from Marc Véron <veron@veron.ch> --- I asked about this bug on the list [koha-translate]: can we translate things like "Remove facet [% facet.facet_link_value | html %]" to something like "My translation [% facet.facet_link_value | html %]" ... and got following answer from bkriegel: "It's the way I plan to traslate myself :) I tested and it translates Ok" Thanks, Bernardo. I change status to RESOLVED INVALID. -- 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=12192 --- Comment #2 from paxed <pasi.kallinen@pttk.fi> --- So the translators need to learn TT code? It really should be replaced with a "%s" placeholder, just like all the rest of the TT code in msgid's -- 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=12192 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- -- 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=12192 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW -- 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=12192 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- I don't tell that this is not a bug, It need to be fixed somehow, I only answered what we can do for now. Status NEW is ok in this case -- 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=12192 --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38618 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38618&action=edit Bug 12192: Template toolkit code in HTML attributes is picked up into po-files This patch gives a partial solution for this problem. It ignores strings like "[% something %]", but not "[% IF ( value ) %][% value %][% END %]" We get 100+ strings less to translate To test: 1) Update translation files for your preferred language 2) Apply the patch 3) Update again 4) Compare, you must find 100+ strings removed from translation files eg. -msgid "[% SEARCH_RESULT.biblionumber |url %]" -msgid "[% accepteddate | $KohaDates %]" -msgid "[% amountoutstanding | format('%.2f') %]" -msgid "[% authtypetext |html %]" -msgid "[% barcode_llx |html %]" -msgid "[% barcode_lly |html %]" -msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]" -msgid "[% billingdate | $KohaDates %]" -msgid "[% borname |html %]" ... -- 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=12192 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Severity|enhancement |minor Assignee|koha-bugs@lists.koha-commun |bgkriegel@gmail.com |ity.org | Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12192 Jonathan Druart <jonathan.druart@biblibre.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=12192 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38618|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38646 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38646&action=edit Bug 12192: Template toolkit code in HTML attributes is picked up into po-files This patch gives a partial solution for this problem. It ignores strings like "[% something %]", but not "[% IF ( value ) %][% value %][% END %]" We get 100+ strings less to translate To test: 1) Update translation files for your preferred language 2) Apply the patch 3) Update again 4) Compare, you must find 100+ strings removed from translation files eg. -msgid "[% SEARCH_RESULT.biblionumber |url %]" -msgid "[% accepteddate | $KohaDates %]" -msgid "[% amountoutstanding | format('%.2f') %]" -msgid "[% authtypetext |html %]" -msgid "[% barcode_llx |html %]" -msgid "[% barcode_lly |html %]" -msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]" -msgid "[% billingdate | $KohaDates %]" -msgid "[% borname |html %]" ... Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12192 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=12192 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38646|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38713 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38713&action=edit Bug 12192: Template toolkit code in HTML attributes is picked up into po-files This patch gives a partial solution for this problem. It ignores strings like "[% something %]", but not "[% IF ( value ) %][% value %][% END %]" We get 100+ strings less to translate To test: 1) Update translation files for your preferred language 2) Apply the patch 3) Update again 4) Compare, you must find 100+ strings removed from translation files eg. -msgid "[% SEARCH_RESULT.biblionumber |url %]" -msgid "[% accepteddate | $KohaDates %]" -msgid "[% amountoutstanding | format('%.2f') %]" -msgid "[% authtypetext |html %]" -msgid "[% barcode_llx |html %]" -msgid "[% barcode_lly |html %]" -msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]" -msgid "[% billingdate | $KohaDates %]" -msgid "[% borname |html %]" ... Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Verified all strings removed from the po files were pure TT. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12192 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Great improvement Bernardo. Thanks! Pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12192 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.7 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org