BUG 4499: Javascript error messages not translatable

- Cataloging > New Record (addbiblio.tmpl)
- Administration > Currencies > New Currency (currency.tmpl)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Katrin Fischer 2010-04-23 18:37:01 +02:00 committed by Galen Charlton
parent 72cc96c1eb
commit d7e519bd64
2 changed files with 7 additions and 6 deletions

View file

@ -16,18 +16,18 @@
var _alertString="";
var alertString2;
if (f.currency.value.length==0) {
_alertString += "- Currency name missing\n";
_alertString += _("- Currency name missing") + "\n";
}
if (f.rate.value.length==0) {
_alertString += "- Rate missing\n";
_alertString += _("- Rate missing") + "\n";
}
if (f.symbol.value.length==0) {
_alertString += "- Symbol missing\n";
_alertString += _("- Symbol missing") + "\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 = _("Form not submitted because of the following problem(s)") + "\n";
alertString2 += "------------------------------------------------------------------------------------\n";
alertString2 += _alertString;
alert(alertString2);

View file

@ -90,7 +90,8 @@ function AreMandatoriesNotOk(){
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
var StrAlert = _("Can't save this record because the following field aren't filled :\n\n");
var StrAlert = _("Can't save this record because the following field aren't filled:");
StrAlert += "\n\n";
for(var i=0,len=mandatories.length; i<len ; i++){
var tag=mandatories[i].substr(4,3);
var subfield=mandatories[i].substr(17,1);
@ -153,7 +154,7 @@ function AreMandatoriesNotOk(){
if(isempty){
flag = 1;
StrAlert += _("\t* Field ") + arr[0] + _(" is mandatory, at least one of its subfields must be filled.\n");
StrAlert += _("\t* Field ") + arr[0] + _(" is mandatory, at least one of its subfields must be filled.") + "\n";
}
}