From 2828c11b9a97f83d5b6fc42a10d789797ea9b6b6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 11 Mar 2013 20:53:55 -0400 Subject: [PATCH] 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 " message. To test that error strings are now translatable, run "perl translate update " from misc/translator, then check if the affected strings shows up in the po file. Signed-off-by: Liz Rea Tested both, all ok. Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js index 4d793a1e2e..fdbea1fb2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js @@ -28,7 +28,7 @@ KOHA.Preferences = { modified_prefs.each(function(){ var modified_pref = $(this).attr("id"); modified_pref = modified_pref.replace("pref_",""); - msg += 'Saved preference '+modified_pref+'\n'; + msg += ""+ MSG_SAVED_PREFERENCE + " " + modified_pref + "\n"; }); humanMsg.displayAlert(msg); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 95910038de..10947636be 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -13,6 +13,7 @@ var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %]; var MSG_NOTHING_TO_SAVE = _("Nothing to save"); var MSG_SAVING = _("Saving..."); + var MSG_SAVED_PREFERENCE = _("Saved preference"); var MSG_MODIFIED = _("modified"); var MSG_MADE_CHANGES = _("You have made changes to system preferences."); var MSG_CLICK_TO_EXPAND = _("Click to expand this section"); -- 2.39.5