From c86882f2aefe3bf2e567dbf59f5ca2d396351cf4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Jan 2020 23:08:55 +0100 Subject: [PATCH] Bug 24358: (bug 21232) Make the alert string translatable "Bibliographic record does not exist!" was not translatable as it was defined in the .js file Test plan: Repeat test plan from bug 21232 Bonus point: update and install a localized version and confirm that the message is translatable Signed-off-by: Lucas Gass Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- .../intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 1 + koha-tmpl/intranet-tmpl/prog/js/subscription-add.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index c5dd38639c..c2b3af0a59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -534,6 +534,7 @@ fieldset.rows table { clear: none; margin: 0; } [%- END -%] var MSG_LINK_TO_VENDOR = _("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor"); var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record"); + var MSG_BIBLIO_NOT_EXIST = _("Bibliographic record does not exist!"); var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date."); var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription."); var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date"); diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js index 8f14fba505..06fae0fdde 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js +++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js @@ -1,4 +1,4 @@ -/* global _ irregularity more_than_one_serial subscriptionid tags interface theme mana_enabled MSG_FREQUENCY_LENGTH_ERROR */ +/* global _ irregularity more_than_one_serial subscriptionid tags interface theme mana_enabled MSG_FREQUENCY_LENGTH_ERROR MSG_BIBLIO_NOT_EXIST */ var globalnumpatterndata; var globalfreqdata; @@ -61,7 +61,7 @@ function Check_page1() { var bib_exists = $("input[name='title']").val().length; - if (!bib_exists) alert(_("Bibliographic record does not exist!")); + if (!bib_exists) alert(MSG_BIBLIO_NOT_EXIST); return bib_exists; } -- 2.39.5