refactor: generate i18n files in common/locales (#18907)

PR Close #18907
This commit is contained in:
Victor Berchet 2017-08-28 11:35:10 -07:00 committed by Miško Hevery
parent 6970396c01
commit 535c7bb60c
5 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
// #docregion import-locale
import { registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/i18n_data/locale_fr';
import localeFr from '@angular/common/locales/fr';
registerLocaleData(localeFr);
// #enddocregion import-locale

View File

@ -1,7 +1,7 @@
// #docregion import-locale-extra
import { registerLocaleData } from '@angular/common';
import localeEnGB from '@angular/common/i18n_data/locale_en-GB';
import localeEnGBExtra from '@angular/common/i18n_data/extra/locale_en-GB';
import localeEnGB from '@angular/common/locales/en-GB';
import localeEnGBExtra from '@angular/common/locales/extra/en-GB';
registerLocaleData(localeEnGB, localeEnGBExtra);
// #enddocregion import-locale-extra

View File

@ -53,9 +53,9 @@ By default Angular only contains locale data for the language `en-US`, if you se
<div class="l-sub-section">
Note that the files in `@angular/common/i18n_data` contain most of the locale data that you will
Note that the files in `@angular/common/locales` contain most of the locale data that you will
need, but some advanced formatting options might only be available in the extra dataset that you can
import from `@angular/common/i18n_data/extra`:
import from `@angular/common/locales/extra`:
<code-example path="i18n/src/app/app.locale_data_extra.ts" region="import-locale-extra" title="src/app/app.locale_data_extra.ts" linenums="false">
</code-example>

View File

@ -86,7 +86,7 @@ done
#######################################
isIgnoredDirectory() {
name=$(basename ${1})
if [[ -f "${1}" || "${name}" == "src" || "${name}" == "test" || "${name}" == "integrationtest" || "${name}" == "i18n_data" ]]; then
if [[ -f "${1}" || "${name}" == "src" || "${name}" == "test" || "${name}" == "integrationtest" || "${name}" == "locales" ]]; then
return 0
else
return 1

View File

@ -17,7 +17,7 @@
"node_modules/@angular/bazel/**",
"node_modules/@angular/compiler-cli/**",
// Workaround bug introduced by 079d884
"node_modules/@angular/common/i18n_data*",
"node_modules/@angular/common/locales/**",
"node_modules/@angular/tsc-wrapped/**"
]
}