Bug 4504

Summary: Confirmation messages in opac account not translated
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: chris, gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Proposed fix

Description Chris Cormack 2010-05-21 01:27:57 UTC


---- Reported by katrin.fischer@bsz-bw.de 2010-05-14 13:07:08 ----

In the patron account in OPAC there are several pages where a user is asked to confirm his action. These messages can not be translated.

Examples:
- cancel hold
- delete search history
- delete list


I tried:
<input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete(_('Are you sure you want to cancel this hold?'));" />

This did not work, perhaps someone else can see why.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:27 UTC  ---

This bug was previously known as _bug_ 4504 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4504

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Owen Leonard 2010-06-02 16:57:04 UTC
Created attachment 2199 [details] [review]
Proposed fix

Strings within JavaScript onclick attributes are not getting picked up by the translator:
    
    onclick="return confirmDelete(_('Are you sure you want to cancel this
    hold?'));"
    
This patch converts those to use variables defined in the main script block:
    
    onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"
Comment 2 Galen Charlton 2010-06-03 23:55:24 UTC
Patch pushed.  Please test and close.
Comment 3 Katrin Fischer 2010-06-04 13:06:02 UTC
Owen's patch solved the translation problem. Thx!