Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(ngLocale): change update-closure and closureSlurper to use the ext... #7805

Closed
wants to merge 1 commit into from
Closed

Conversation

alexandrevoilab
Copy link

...ra locales for number formats.

This download numberSymbolsExt.js and use it to generate number formats for the "extra" locales.

Fixes issue #7799 by using the correct fr-ch and it-ch locales number formats.

…extra locales for number formats.

This download numberSymbolsExt.js and use it to generate number formats for the "extra" locales.

Fixes issue #7799 by using the correct fr-ch and it-ch locales number formats.
@IgorMinar
Copy link
Contributor

@caitp weren't you working on this one already?

@caitp
Copy link
Contributor

caitp commented Jul 25, 2014

0eb2c2a was in on june 2nd, so presumably this PR extends my changes in some way.

The diff is going to crash my browser if I open it, so I'm not sure how it's changing it though. From the description, I don't think this is adding support for processing CLDR

@alexandrevoilab
Copy link
Author

Almost forgot this one...

Doesn't seems to be the same as 0eb2c2a but I can create a new pull request with an up to date base if you want.

Here is the full diff in text: http://labs.voilab.org/7805.diff
And only the relevant changes:

From 338b08d2ceea9f7429457aa6940f3b313a18ca6f Mon Sep 17 00:00:00 2001
From: Alexandre Ravey <[email protected]>
Date: Thu, 12 Jun 2014 16:26:38 +0200
Subject: [PATCH] chore(ngLocale): change update-closure and closureSlurper to
 use the extra locales for number formats.

This download numberSymbolsExt.js and use it to generate number formats for the "extra" locales.

Fixes issue #7799 by using the correct fr-ch and it-ch locales number formats.
---
 i18n/src/closureI18nExtractor.js           |     2 +-
 i18n/src/closureSlurper.js                 |     3 +
 i18n/update-closure.sh                     |     1 +
 478 files changed, 45591 insertions(+), 335 deletions(-)

diff --git a/i18n/src/closureI18nExtractor.js b/i18n/src/closureI18nExtractor.js
index 67ea5ff..b83dd81 100644
--- a/i18n/src/closureI18nExtractor.js
+++ b/i18n/src/closureI18nExtractor.js
@@ -63,7 +63,7 @@ function extractDateTimeSymbols(content, localeInfo) {
     var localeID = findLocaleId(propName, 'datetime');
     if (localeID) {
       var info = getInfoForLocale(localeInfo, localeID);
-      localeInfo[localeID].DATETIME_FORMATS =
+      info.DATETIME_FORMATS =
           converter.convertDatetimeData(goog.i18n[propName]);
     }
   }
diff --git a/i18n/src/closureSlurper.js b/i18n/src/closureSlurper.js
index 02a1d9e..9cbd1da 100755
--- a/i18n/src/closureSlurper.js
+++ b/i18n/src/closureSlurper.js
@@ -23,6 +23,9 @@ function readSymbols() {
       var currencySymbols = closureI18nExtractor.extractCurrencySymbols(content);
       return qfs.read(__dirname + '/../closure/numberSymbols.js', 'b').then(function(content) {
           closureI18nExtractor.extractNumberSymbols(content, localeInfo, currencySymbols);
+          return qfs.read(__dirname + '/../closure/numberSymbolsExt.js', 'b').then(function(content) {
+              closureI18nExtractor.extractNumberSymbols(content, localeInfo, currencySymbols);
+          });
         });
       });

diff --git a/i18n/update-closure.sh b/i18n/update-closure.sh
index 4a9290d..44f579f 100755
--- a/i18n/update-closure.sh
+++ b/i18n/update-closure.sh
@@ -14,4 +14,5 @@ curl "$I18N_BASE/currency.js" > closure/currencySymbols.js
 curl "$I18N_BASE/datetimesymbols.js" > closure/datetimeSymbols.js
 curl "$I18N_BASE/datetimesymbolsext.js" > closure/datetimeSymbolsExt.js
 curl "$I18N_BASE/numberformatsymbols.js" > closure/numberSymbols.js
+curl "$I18N_BASE/numberformatsymbolsext.js" > closure/numberSymbolsExt.js
 curl "$I18N_BASE/pluralrules.js" > closure/pluralRules.js
-- 
1.8.4.2

@caitp
Copy link
Contributor

caitp commented Sep 22, 2014

This was basically landed in 871f321

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants