Changeset 7432

Show
Ignore:
Timestamp:
02/24/07 09:18:08 (23 months ago)
Author:
peller
Message:

Update number.js to use generated files. Fixes a couple of unit tests. References #2325

Location:
trunk
Files:
11 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/i18n/cldr/nls/en-in/number.js

    r6872 r7432  
    1 // generated from cldr v1.4 main/ 
    2 // xpath: ldml/numbers 
    3  
     1// generated from cldr/ldml/main/*.xml, xpath: ldml/numbers 
    42({ 
    5 decimalFormat: '#,##,##0.###', 
    6 percentFormat: '#,##,##0%', 
    7 currencyFormat: '\u00a4 #,##,##0.00' 
     3        'decimalFormat':"#,##,##0.###", 
     4        'percentFormat':"#,##,##0%", 
     5        'currencyFormat':"€ #,##,##0.00" 
    86}) 
  • trunk/src/i18n/cldr/nls/en/number.js

    r6872 r7432  
    1 // generated from cldr v1.4 main/ 
    2 // xpath: ldml/numbers 
    3  
     1// generated from cldr/ldml/main/*.xml, xpath: ldml/numbers 
    42({ 
    5 currencyFormat: '\u00a4#,##0.00' 
     3        'currencyFormat':"€#,##0.00" 
    64}) 
  • trunk/src/i18n/cldr/nls/fr/number.js

    r6872 r7432  
    1 // generated from cldr v1.4 main/ 
    2 // xpath: ldml/numbers 
    3  
     1// generated from cldr/ldml/main/*.xml, xpath: ldml/numbers 
    42({ 
    5 // symbols 
    6 decimal:',', 
    7 group:' ', 
    8  
    9 percentFormat: '#,##0 %', 
    10 currencyFormat: '#,##0.00 \u00a4' 
     3        'decimal':",", 
     4        'group':" ", 
     5        'percentFormat':"#,##0 %", 
     6        'currencyFormat':"#,##0.00 €" 
    117}) 
  • trunk/src/i18n/cldr/nls/number.js

    r6872 r7432  
    1 // generated from cldr v1.4 main/ 
    2 // xpath: ldml/numbers 
    3  
     1// generated from cldr/ldml/main/*.xml, xpath: ldml/numbers 
    42({ 
    5 // symbols 
    6 decimal:'.', 
    7 group:',', 
    8 list:';', 
    9 percentSign:'%', 
    10 nativeZeroDigit:'0', 
    11 patternDigit:'#', 
    12 plusSign:'+', 
    13 minusSign:'-', 
    14 exponential:'E', 
    15 perMille:'\u2030', 
    16 infinity:'\u221e', 
    17 nan:'NaN', 
    18  
    19 // formats 
    20 decimalFormat: '#,##0.###', 
    21 scientificFormat: '#E0', 
    22 percentFormat: '#,##0%', 
    23 currencyFormat: '\u00a4 #,##0.00' 
     3        'decimal':".", 
     4        'group':",", 
     5        'list':";", 
     6        'percentSign':"%", 
     7        'nativeZeroDigit':"0", 
     8        'patternDigit':"#", 
     9        'plusSign':"+", 
     10        'minusSign':"-", 
     11        'exponential':"E", 
     12        'perMille':"‰", 
     13        'infinity':"∞", 
     14        'nan':"NaN", 
     15        'decimalFormat':"#,##0.###", 
     16        'scientificFormat':"#E0", 
     17        'percentFormat':"#,##0%", 
     18        'currencySpacing-beforeCurrency-currencyMatch':"[:letter:]", 
     19        'currencySpacing-beforeCurrency-surroundingMatch':"[:digit:]", 
     20        'currencySpacing-beforeCurrency-insertBetween':" ", 
     21        'currencySpacing-afterCurrency-currencyMatch':"[:letter:]", 
     22        'currencySpacing-afterCurrency-surroundingMatch':"[:digit:]", 
     23        'currencySpacing-afterCurrency-insertBetween':" ", 
     24        'currencyFormat':"€ #,##0.00" 
    2425}) 
  • trunk/src/i18n/cldr/nls/README

    r5235 r7432  
    1 All files within this directory and subdirectories were manually derived from http://unicode.org/cldr 
     1All files within this directory and subdirectories were derived from the contents of the cldr directory using the cldr ant task (see http://unicode.org/cldr) 
     2An arbitrary subset of these files have been checked in to svn.  For the complete set, run 'ant cldr' 
    23 
    34See terms of use: http://www.unicode.org/copyright.html#Exhibit1 
    4  
    5 Eventually, this data should be generated directly from the XML in the CLDR repository to provide 
    6 accurate and full support for the full set of locales. 
  • trunk/tests/test_number.js

    r7363 r7432  
    22 
    33//TODO: move all extra locale references out into separate test file 
    4 var partLocaleList = (["en-us", "fr-fr", "en-in", "hi-in"]); 
     4var partLocaleList = (["en-us", "fr-fr", "en-in"]); 
    55 
    66/** 
     
    267267 
    268268/** 
    269  * Only test en-us and hi-in  
     269 * Only test en-us and en-in  
    270270 * Refer to ICU4J's NumberFormatTest.TestSecondaryGrouping() 
    271271 */ 
     
    284284        //Pattern "#,###" and secondaryGroupingSize=4 should format 123456789 to "12,3456,789"                   
    285285         
    286         //Special case for "hi-in" locale 
    287         //1876543210 should be formated as 1,87,65,43,210 in "hi-in" (India) 
     286        //Special case for "en-in" locale 
     287        //1876543210 should be formated as 1,87,65,43,210 in "en-in" (India) 
    288288        sourceInput = 1876543210; 
    289289        expectResult = "1,87,65,43,210"; 
    290         var result = dojo.number.format(sourceInput,{locale:"hi-in"}); 
    291         jum.assertEquals(("FAIL: in \"hi-in\" locale,1876543210 should  be formated to 1,87,65,43,210; " + 
     290        var result = dojo.number.format(sourceInput,{locale:"en-in"}); 
     291        jum.assertEquals(("FAIL: in \"en-in\" locale,1876543210 should  be formated to 1,87,65,43,210; " + 
    292292                " but" + result + " instead"),expectResult,result);    
    293293        //print("test_number_format_Grouping() end..............\n");