This patch fixes the problem reported.
To test:
1) Apply the patch
2) Update translations for your preffered language, xx-YY
3) Check new entries
egrep -Rn "Cost must be expressed as a decimal number|Invalid value for" misc/translator/xx-YY*
4) Check no regression on alert, go to
Administration > Transport cost matrix
Edit some value and put a negative value & save,
alert must show up
5) On errors, part of the error string is now on TT file,
no regressions expected here
Verified that changes appear in translated language (de-CH) as appropriate. No regressions found by testing en en de-CH.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested both, entering a numeric value < 0 and non-numeric values, no regressions found.
Passes tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
$from_to_input_def{disabled} = 1;
}
else {
- push @errors, "Invalid value for $from_row{name} -> $from_to_input_def{name}"
+ push @errors, "$from_row{name} -> $from_to_input_def{name}"
unless $value =~ /\d/o && $value >= 0.0;
}
}
if (val && val != '' && !isNaN(parseFloat(val)) && val >= 0.0) {
return;
}
- alert("Cost must be expressed as a decimal number >= 0");
+ alert(_("Cost must be expressed as a decimal number >= 0"));
}
function disable_transport_cost_chg(e, cost_id) {
disable_transport_cost(cost_id, e.checked);
<h4>There were problems with your submission</h4>
<ul>
[% FOR e IN errors %]
- <li>[% e %]</li>
+ <li>Invalid value for [% e %]</li>
[% END %]
</ul>
</div>[% END %]