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 <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2020-01-06 23:08:55 +01:00 committed by Joy Nelson
parent 90374dacb9
commit c86882f2ae
2 changed files with 3 additions and 2 deletions

View File

@ -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");

View File

@ -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;
}