[open-ils-commits] r13350 - in trunk/Open-ILS/web/js/dojo/openils/widget: . nls (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jun 9 12:41:36 EDT 2009
Author: erickson
Date: 2009-06-09 12:41:33 -0400 (Tue, 09 Jun 2009)
New Revision: 13350
Added:
trunk/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
one small step for i18n
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-06-09 16:33:01 UTC (rev 13349)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-06-09 16:41:33 UTC (rev 13350)
@@ -4,6 +4,8 @@
dojo.require('openils.User');
dojo.require('fieldmapper.IDL');
dojo.require('openils.PermaCrud');
+ dojo.requireLocalization("openils.widget", "AutoFieldWidget");
+ var localeStrings = dojo.i18n.getLocalization("openils.widget", "AutoFieldWidget");
dojo.declare('openils.widget.AutoFieldWidget', null, {
@@ -83,7 +85,7 @@
var value = this.widgetValue;
switch(this.idlField.datatype) {
case 'bool':
- return (openils.Util.isTrue(value)) ? 'True' : 'False'; // XXX i18n!
+ return (openils.Util.isTrue(value)) ? localeStrings.TRUE : localeStrings.FALSE;
case 'timestamp':
dojo.require('dojo.date.locale');
dojo.require('dojo.date.stamp');
Added: trunk/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js (rev 0)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js 2009-06-09 16:41:33 UTC (rev 13350)
@@ -0,0 +1,4 @@
+{
+ 'TRUE' : 'True',
+ 'FALSE' : 'False'
+}
More information about the open-ils-commits
mailing list