[open-ils-commits] r16609 - trunk/Open-ILS/web/js/ui/default/booking (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jun 7 01:57:10 EDT 2010
Author: dbs
Date: 2010-06-07 01:57:06 -0400 (Mon, 07 Jun 2010)
New Revision: 16609
Modified:
trunk/Open-ILS/web/js/ui/default/booking/reservation.js
Log:
Stab at matching up reservation.js with the pluralized, JSON-compliant Dojo NLS file
Modified: trunk/Open-ILS/web/js/ui/default/booking/reservation.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/booking/reservation.js 2010-06-07 05:45:26 UTC (rev 16608)
+++ trunk/Open-ILS/web/js/ui/default/booking/reservation.js 2010-06-07 05:57:06 UTC (rev 16609)
@@ -309,12 +309,23 @@
}
} else {
var missing;
- alert((missing = check_bresv_targeting(results)) ?
- localeStrings.CREATE_BRESV_OK_MISSING_TARGET(
- results.length, missing
- ) :
- localeStrings.CREATE_BRESV_OK(results.length)
+ if (missing = check_bresv_targeting(results)) {
+ alert(dojo.string.substitute(
+ localeStrings.CREATE_BRESV_OK_MISSING_TARGET,
+ [results.length, missing]
+ ));
+ } else {
+ if (results.length == 1) {
+ alert(dojo.string.substitute(
+ localeStrings.CREATE_BRESV_OK(results.length)
+ ));
+ } else {
+ alert(dojo.string.substitute(
+ localeStrings.CREATE_BRESV_OK_PLURAL(results.length)
+ ));
+ }
);
+ }
update_brsrc_list();
update_bresv_grid();
}
@@ -448,7 +459,15 @@
} else if (is_ils_event(result)) {
alert(my_ils_error(localeStrings.CXL_BRESV_FAILURE2, result));
} else {
- alert(localeStrings.CXL_BRESV_SUCCESS(result.length));
+ if (result.length == 1) {
+ alert(dojo.string.substitute(
+ localeStrings.CXL_BRESV_SUCCESS, [result.length]
+ ));
+ } else {
+ alert(dojo.string.substitute(
+ localeStrings.CXL_BRESV_SUCCESS_PLURAL, [result.length]
+ ));
+ }
}
}
More information about the open-ils-commits
mailing list