Bug 6084

Summary: Missing translation markers in javascript alert messages
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris
Version: 3.4   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Initial patch
Follow up
Signed off patch 1
Signed off patch 2
[3.2.x] fix

Description Katrin Fischer 2011-04-06 12:00:32 UTC
It seems the translation tool is not picking up alert messages for translations when they are not properly formatted:

Bad:
alert("Your text will stay English forever!");

Good:
alert(_("Your text will be translatable!"));

A quick look at the code reveals a lot of translation problems in this area.
Comment 1 Tomás Cohen Arazi (tcohen) 2011-04-06 17:54:19 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2011-04-06 17:55:28 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2011-04-07 08:48:08 UTC
Tested this patches and signed off on them. 

One of the changes was made to a file in the js directory - it will not break anything, but will not work either. Tose files are not included into the translation process.

koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js

@Tomas: Don't forget to add the bug number to your commit messages! :)
Comment 4 Katrin Fischer 2011-04-07 08:49:07 UTC
Created attachment 3769 [details] [review]
Signed off patch 1
Comment 5 Katrin Fischer 2011-04-07 08:49:26 UTC
Created attachment 3770 [details] [review]
Signed off patch 2
Comment 6 Chris Cormack 2011-04-07 09:49:39 UTC
Pushed, please test
Comment 7 Tomás Cohen Arazi (tcohen) 2011-04-18 11:10:34 UTC
Created attachment 3936 [details] [review]
[3.2.x] fix