jeudi 16 octobre 2014

Sencha Cmd 5.0.2: ExtJS locale file loaded twice

I am experiencing a problem, where the ext-locale file is loaded twice.

To reproduce the problem, create a new sencha app:

Code:



sencha generate app MyTestApp /path/to/app

then switch to the german locale, by modifying your app.json to require "ext-locale" and set "locale": "de".

Code:



{
"name": "TestApp",
"requires": [
"ext-locale"
],
"locale": "de",
"id": "56be4074-63c3-44b7-bee5-2550dc389407"
}

and build the app: If you load the app, you will see that ext-locale-de.js is loaded twice. Once with _dc-Parameter and once without.

I don't know how it is for other locales, but for the german locales this totally breaks Ext.util.Format.number() as this is rewritten for the german locale:



Code:



Ext.util.Format.__number = Ext.util.Format.number;
Ext.util.Format.number = function(v, format) {
return Ext.util.Format.__number(v, format || "0.000,00/i");
};

Executing the above snippet twice will result in a maxium call stack size exceeded error, since it causes an endless loop when calling Ext.util.Format.number().

Maybe there is someone around who has an idea on how to temporarily fix this?






Sencha Cmd 5.0.2: ExtJS locale file loaded twice

Aucun commentaire:

Enregistrer un commentaire