The new staff po files contain a lot of Javascript strings: Example: authorities_js.inc "function mergeAuth(authid, summary) { var alreadySelected = $.cookie('auth_to_merge'); if (alreadySelected !== null) { alreadySelected = JSON.parse(alreadySelected); $.cookie('auth_to_merge', '', { 'path': '/', 'expires': -1 }); var refstring = \"\"; if (typeof alreadySelected.mergereference !== 'undefined') { refstring = \"&mergereference=\" + alreadySelected.mergereference; } window.location.href = \"/cgi-bin/koha/authorities/merge.pl?authid=\" + authid + \"&authid=\" + alreadySelected.authid + refstring; } else { $.cookie('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/' }); showMergingInProgress(); } } function showMergingInProgress() { var alreadySelected = $.cookie('auth_to_merge'); if (alreadySelected !== null) { alreadySelected = JSON.parse(alreadySelected); $('#merge_in_progress').html(_(\"Merging with authority: \") + \""
Created attachment 26793 [details] [review] Bug 11227 - Staff po files contain some Javascript This patch rewrites authorities_js.inc so translate script process it correctly. To that I add <script></script> at the file To test: 1) Update po files for your preffered language 2) Check occurrence of mergeAuth on staff PO file or try egrep -n "Merging with authority: |Cancel merge" strings appear in a JS func 3) Apply the patch 4) Update translations again, chech again, old strings now begin with #~ (obsoleted) and there are new entries for the messages 5) Check functionality provided by script
Created attachment 27369 [details] [review] [SIGNED-OFF] Bug 11227 - Staff po files contain some Javascript This patch rewrites authorities_js.inc so translate script process it correctly. To that I add <script></script> at the file To test: 1) Update po files for your preffered language 2) Check occurrence of mergeAuth on staff PO file or try egrep -n "Merging with authority: |Cancel merge" strings appear in a JS func 3) Apply the patch 4) Update translations again, chech again, old strings now begin with #~ (obsoleted) and there are new entries for the messages 5) Check functionality provided by script Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 27672 [details] [review] [PASSED QA] Bug 11227 - Staff po files contain some Javascript This patch rewrites authorities_js.inc so translate script process it correctly. To that I add <script></script> at the file To test: 1) Update po files for your preffered language 2) Check occurrence of mergeAuth on staff PO file or try egrep -n "Merging with authority: |Cancel merge" strings appear in a JS func 3) Apply the patch 4) Update translations again, chech again, old strings now begin with #~ (obsoleted) and there are new entries for the messages 5) Check functionality provided by script Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described and fixes a translation difficulty.
Pushed to master. Thanks, Bernardo!