[Koha-bugs] [Bug 11488] Untranslatable warning "Are you sure you want to write off ..."

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 15 15:21:49 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11488

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
            Version|unspecified                 |master
           Assignee|koha-bugs at lists.koha-commun |emmaheath.student at wegc.scho
                   |ity.org                     |ol.nz
           Severity|enhancement                 |normal

--- Comment #2 from Owen Leonard <oleonard at 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.


More information about the Koha-bugs mailing list