one small step for i18n
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Jun 2009 16:41:33 +0000 (16:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Jun 2009 16:41:33 +0000 (16:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13350 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js [new file with mode: 0644]

index 0302884..c280466 100644 (file)
@@ -4,6 +4,8 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
     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 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
             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');
diff --git a/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/nls/AutoFieldWidget.js
new file mode 100644 (file)
index 0000000..a948eee
--- /dev/null
@@ -0,0 +1,4 @@
+{
+    'TRUE' : 'True',
+    'FALSE' : 'False'
+}