Bug 4504 - Confirmation messages in opac account not translated
Summary: Confirmation messages in opac account not translated
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 01:07 UTC by Katrin Fischer
Modified: 2012-10-25 22:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed fix (8.58 KB, patch)
2010-06-02 16:57 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!