[Commits] r2194 - sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Mon May 17 13:03:17 CEST 2010


Author: cmoullet
Date: 2010-05-17 13:03:16 +0200 (Mon, 17 May 2010)
New Revision: 2194

Modified:
   sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js
Log:
try to keep internationalization withinh the UX

Modified: sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js	2010-05-17 07:34:13 UTC (rev 2193)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js	2010-05-17 11:03:16 UTC (rev 2194)
@@ -16,22 +16,6 @@
 
 GeoExt.ux.OpenAddressesSearchCombo = Ext.extend(Ext.form.ComboBox, {
 
-    /* i18n begin */
-
-    /** api: config[emptyText]
-     *  ``String`` The default text to place into an empty field. Defaults to
-     *  "Search address in OpenAddresses".
-     */
-    emptyText: OpenLayers.i18n('Search address in OpenAddresses'),
-
-    /** api: config[loadingText]
-     *  ``String`` The text to display in the dropdown list while data is
-     *  loading. Defaults to "Search in OpenAddresses...".
-     */
-    loadingText: OpenLayers.i18n('Search in OpenAddresses...'),
-
-    /* i18n end */
-
     /** api: config[map]
      *  ``OpenLayers.Map or Object``  A configured map or a configuration object
      *  for the map constructor, required only if :attr:`zoom` is set to
@@ -112,6 +96,12 @@
     /** private: constructor
      */
     initComponent: function() {
+        if (GeoExt.ux.OpenAddressesSearchCombo.prototype.loadingText == this.loadingText) {
+            this.loadingText = OpenLayers.i18n('Search in OpenAddresses...'); 
+        }
+        if (GeoExt.ux.OpenAddressesSearchCombo.prototype.emptyText == this.emptyText) {
+            this.emptyText =  OpenLayers.i18n('Search address in OpenAddresses');
+        }
         GeoExt.ux.OpenAddressesSearchCombo.superclass.initComponent.apply(this, arguments);
 
         this.store = new Ext.data.Store({



More information about the Commits mailing list