Page 39 of 39 FirstFirst ... 29373839
Results 381 to 385 of 385

Thread: Ext Translations

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #381
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193

    Thumbs up Updated Catalonian and Spanish version for Ext 3.2.1

    Hi!!

    Here are attached the updated translations of Catalonian and Spanish languages based on Ext 3.2.1 version ext-lang-en.js file

    Regards
    Attached Files Attached Files

  2. #382

    Default [PATCH] decimal separator and thousand separator for ExtJS 3

    Hello, I have made a small patch to util/Format.js to allow localization of decimal separator and thousand separator. You'll note that I removed the 'm' local var because its value is never read.

    Code:
    --- ext-3.2.1-dist/src/util/Format.js   2010-04-27 11:00:52.000000000 +0200
    +++ ext-3.2.1/src/util/Format.js        2010-08-14 17:54:56.390625000 +0200
    @@ -250,6 +250,22 @@
             },
    
             /**
    +         * The decimal separator to use
    +         * Override this value for international numbers.
    +         * (defaults to <tt>'.'</tt>)
    +         * @type String
    +         */
    +        decimalSeparator: '.',
    +
    +        /**
    +         * The thousand separator to use
    +         * Override this value for international numbers.
    +         * (defaults to <tt>','</tt>)
    +         * @type String
    +         */
    +        thousandSeparator: ',',
    +
    +        /**
              * Formats the number according to the format string.
              * <div style="margin-left:40px">examples (123456.789):
              * <div style="margin-left:10px">
    @@ -303,22 +319,21 @@
                 psplit = fnum.split('.');
    
                 if (hasComma) {
    -                var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), n = cnum.length % 3 || 3;
    +                var cnum = psplit[0], parr = [], j = cnum.length, n = j % 3 || 3;
    
                     for (var i = 0; i < j; i += n) {
                         if (i != 0) {
                             n = 3;
                         }
                         parr[parr.length] = cnum.substr(i, n);
    -                    m -= 1;
                     }
    -                fnum = parr.join(comma);
    +                fnum = parr.join(this.thousandSeparator);
                     if (psplit[1]) {
    -                    fnum += dec + psplit[1];
    +                    fnum += this.decimalSeparator + psplit[1];
                     }
                 } else {
                     if (psplit[1]) {
    -                    fnum = psplit[0] + dec + psplit[1];
    +                    fnum = psplit[0] + this.decimalSeparator + psplit[1];
                     }
                 }
    Then localization files need this update :

    Code:
    --- ext-3.2.1-dist/src/locale/ext-lang-en.js    2010-04-27 11:00:52.000000000 +0200
    +++ ext-3.2.1/src/locale/ext-lang-en.js 2010-08-14 19:12:20.265625000 +0200
    @@ -94,6 +114,8 @@
     }
    
     if(Ext.util.Format){
    +  Ext.util.Format.decimalSeparator = '.';
    +  Ext.util.Format.thousandSeparator = ',';
       Ext.util.Format.date = function(v, format){
         if(!v) return "";
         if(!(v instanceof Date)) v = new Date(Date.parse(v));
    And it is no more required to the the '/i' suffix when specifying a number format.

    For example, the German translation needs this update :

    Code:
    @@ -100,11 +101,8 @@
     }
    
     if(Ext.util.Format){
    -    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");
    -    };
    -
    +   Ext.util.Format.decimalSeparator = ',';
    +   Ext.util.Format.thousandSeparator = '.';
        Ext.util.Format.date = function(v, format) {
           if(!v) return "";
           if(!(v instanceof Date)) v = new Date(Date.parse(v));
    And in the French one :

    Code:
    @@ -111,11 +117,13 @@
     }
    
     if(Ext.util.Format){
    +    Ext.util.Format.decimalSeparator = ',';
    +    Ext.util.Format.thousandSeparator = ' ';
         Ext.util.Format.date = function(v, format){
             if(!v) return "";
    -        if(!Ext.isDate(v)) v = new Date(Date.parse(v));
    +        if(!(v instanceof Date)) v = new Date(Date.parse(v));
             return v.dateFormat(format || "d/m/Y");
         };
     }
    
     if(Ext.DatePicker){
    Furthermore, in data/Types.js, a localizable replacement to parseFloat() should be used. So that the right decimal separator is used.
    Last edited by bagndon; 14 Aug 2010 at 1:13 PM. Reason: added a note about parseFloat()

  3. #383

    Default Update de + en + fr + it

    Here is an update of German, English, French, and Italian languages for ExtJS 3.2.1.

    This includes a full bunch of improvements :

    • The decimal/thousand separators update.
    • The latest updates of Thyla are included in the French file.
    • The order of statements have been aligned to English main file to ease further updates.
    • (v instanceof Date) is better suited than Ext.isDate(v) in Ext.util.Format.date().
    • Ext.util.Format.fileSize added (following Thylia contribution)
    • j/n/y|j/n/Y as French altFormats in Ext.form.DateField insterad of d/m/y
    • Removal of all 'h' and 'H' in altFormats of Ext.form.TimeField because 'h' and 'H' stand for the /\d{1,2}/ regexp and g and 'G' for /\d{2}/ which matches only a subset of what /\d{1,2}/ matches. So that's why all 'h' and 'H' altFormats are unnecessary here.
    • Use of 'j' instead of 'd' and 'n' instead of 'm' where relevant in altFormats Ext.form.DateField (like in the German file) because of the same reason as above : /\d{1,2}/ matches a superset of what /\d{2}/ matches. That said, 'dm' is still 'dm' because 'jn' would be ambiguous.
    • Aligned English with other files so that when executing English JS last, we can go back to English for all settings (critical when using an AJAX request to dynamically load language files)


    2010-08-14_ext-lang-de+en+fr+it.zip
    Attached Files Attached Files

  4. #384
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    293

    Default

    Translation file for Estonian (et) was missing.
    Corrected and added missing entries for Latvian language.
    Please add to locales!
    Attached Files Attached Files

  5. #385
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    We're going to close this thread in favor of opening individual tickets on the items to ensure they get resolved.

Page 39 of 39 FirstFirst ... 29373839

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •