Bug 7596 - System preferences editor JavaScript contains untranslatable English string
Summary: System preferences editor JavaScript contains untranslatable English string
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-24 20:44 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7596 - System prefs editor JS contains untranslatable English string (2.34 KB, patch)
2013-03-12 00:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7596 - System prefs editor JS contains untranslatable English string (2.38 KB, patch)
2013-03-14 08:29 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 7596 - System prefs editor JS contains untranslatable English string (2.42 KB, patch)
2013-03-15 12:55 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-02-24 20:44:53 UTC
It looks like this is just one which was missed in an earlier sweep:

    msg += '<strong>Saved preference '+modified_pref+'</strong>\n';
Comment 1 Owen Leonard 2012-02-24 20:51:51 UTC
A larger problem is another js file used by preferences.pl: ajax.js. There are many instances where English strings are passed to the onscreen message handler:

 if ( error.type == 'auth' ) {
  humanMsg.displayMsg( _( 'You need to log in again, your session has timed out' ) );
  }

These messages should be moved to the template.
Comment 2 Owen Leonard 2013-03-12 00:58:55 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2013-03-14 08:29:35 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-03-15 12:55:40 UTC
QA comment:
String appears in the po file after translate update.
Marked as Passed QA.
Comment 5 Jonathan Druart 2013-03-15 12:55:57 UTC
Created attachment 16163 [details] [review]
Bug 7596 - System prefs editor JS contains untranslatable English string

There is one stray instance of an untranslatable string in
preferences.js. This patch replaces it with a variable which is now
defined in the preferences template.

To test, open the system preferences editor and change any setting. You
should see the usual "Saved preference <preference name>" message.

To test that error strings are now translatable, run "perl translate
update <lang>" from misc/translator, then check if the affected strings shows
up in the po file.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested both, all ok.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jared Camins-Esakov 2013-03-15 23:04:08 UTC
This patch has been pushed to master.
Comment 7 Chris Cormack 2013-03-17 05:50:50 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.4 and 3.8.11