Bug 23888: (follow-up) Wrap English string in translation function

This patch makes alert added in subscription-add.js translatable using
the new __() function.

To test, apply the patch and confirm that the alert still works
correctly when submitting the subscription edit form with an invalid
vendor id.

Test that the string can be translated (using fr-Fr for example):

1. cd misc/translator && ./translate update fr-FR
2. Translate strings in misc/tranlator/po/fr-FR-messages-js.po
3. cd misc/translator && ./translate install fr-FR

Switch to the fr-FR translation and confirm the the alert shows your
translated string.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2020-02-14 15:07:16 +00:00 committed by Martin Renvoize
parent c52e15689f
commit 97913b8a64
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* global _ irregularity more_than_one_serial subscriptionid tags interface theme mana_enabled MSG_FREQUENCY_LENGTH_ERROR MSG_BIBLIO_NOT_EXIST */
/* global __ irregularity more_than_one_serial subscriptionid tags interface theme mana_enabled MSG_FREQUENCY_LENGTH_ERROR MSG_BIBLIO_NOT_EXIST */
var globalnumpatterndata;
var globalfreqdata;
@ -55,7 +55,7 @@ function Check_page1() {
} else {
var bookseller_ids = BOOKSELLER_IDS;
if ( $.inArray(Number(bookseller_id), bookseller_ids) == -1 ) {
alert ("The vendor does not exist");
alert ( __("The vendor does not exist") );
return false;
}
}