[Bug 11488] New: Untranslatable warning "Are you sure you want to write off ..."
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Bug ID: 11488 Summary: Untranslatable warning "Are you sure you want to write off ..." Change sponsored?: --- Product: Koha Version: unspecified 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 The following text is not picked up by the translation toolchain: koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt: var answer = confirm(_("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!")); -- 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=11488 --- Comment #1 from Emma Heath <emmaheath.student@wegc.school.nz> --- Created attachment 24320 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24320&action=edit Bug 11488 Untranslatable warning "Are you sure you want to write off ..." Test plan 1. create some fines 2. to attempt to write off all the fines 3. make sure the messege still displays -- 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=11488 Emma Heath <emmaheath.student@wegc.school.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |emmaheath.student@wegc.scho | |ol.nz -- 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=11488 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA Version|unspecified |master Assignee|koha-bugs@lists.koha-commun |emmaheath.student@wegc.scho |ity.org |ol.nz Severity|enhancement |normal --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- This has a few problems which need to be addressed: Line 19: A tab character was introduced for indentation. Should be spaces. Line 20: var answer = "confirm(msg); <-- That quotation mark shouldn't be there. But the big problem is that even with these problems corrected the patch doesn't work to make the string translatable. I'm not sure what the cause is, but I have a suggestion which might fix the problem and make the string more translation-friendly. In general it's bad practice to add template variables into the middle of a sentence because it makes assumptions about sentence structure in other languages: _("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!") It would probably be better to move the template variable to the end. Something like this: _("Are you sure you want to write off these outstanding fines? This cannot be undone! Total writeoff:") + [% total | format('%.2f') %] Finally: The test plan has to include another step: Making sure the translation script really picks up the string: In misc/translator run "perl translate update en-GB" (or whatever language you'd like to test). Check the regenerated po file (en-GB-i-staff-t-prog-v-3006000.po in this case) to make sure the string is there. -- 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=11488 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11487 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 --- Comment #3 from paxed <pasi.kallinen@pttk.fi> --- (In reply to Owen Leonard from comment #2)
It would probably be better to move the template variable to the end. Something like this:
_("Are you sure you want to write off these outstanding fines? This cannot be undone! Total writeoff:") + [% total | format('%.2f') %]
No. Just... no. That is much worse. Hard-coding the placement of the number will create it's own problems. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- (In reply to paxed from comment #3)
No. Just... no. That is much worse. Hard-coding the placement of the number will create it's own problems.
Please provide a better alternative, with explanation. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24320|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24460 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24460&action=edit Bug 11488 Untranslatable warning "Are you sure you want to write off ..." Test plan: - ./translate update LANG - translate the string into your po file - ./translate install LANG - Verify the string is translated. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- What about this solution? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think both opinions are valid here. The best way to translate something is with a placeholder in the sentence. Because this way, you can build your sentence the way you want with the variable in whatever position it needs to be. The problem is, that we have to differentiate a bit between TT code and Javascript code, because of bug bug 7327. So if you use + the string will get cut up into small separate pieces that might not be easy to translate if the variable is in the middle of a sentence. So Owen's suggestion makes sense. Could we use a different technique here? Maybe add a placeholder in a different way that is then replaced by the Javascript? I think the datatables navigation/paging seems to do something like this. And just now I see that Jonathan proposed something like it... :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24460|0 |1 is obsolete| | --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 24867 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24867&action=edit [SIGNED-OFF] Bug 11488 Untranslatable warning "Are you sure you want to write off ..." Test plan: - ./translate update LANG - translate the string into your po file - ./translate install LANG - Verify the string is translated. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 M. de Rooy <m.de.rooy@rijksmuseum.nl> 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=11488 --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 24922 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24922&action=edit Bug 11488 Untranslatable warning "Are you sure you want to write off ..." Test plan: - ./translate update LANG - translate the string into your po file - ./translate install LANG - Verify the string is translated. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org