refactor(common): remove AVAILABLE_LOCALES (#18907)

Fixes #18855

PR Close #18907
This commit is contained in:
Olivier Combe
2017-08-24 11:11:08 +02:00
committed by Miško Hevery
parent 72c7b6edea
commit 4c45347635
6 changed files with 20 additions and 259 deletions

View File

@ -68,9 +68,6 @@ module.exports = (gulp, done) => {
console.log(`Writing file ${I18N_FOLDER}/locale_en.ts`);
fs.writeFileSync(`${RELATIVE_I18N_FOLDER}/locale_en.ts`, generateLocale('en', new cldrJs('en'), './locale_data'));
console.log(`Writing file ${I18N_FOLDER}/available_locales.ts`);
fs.writeFileSync(`${RELATIVE_I18N_FOLDER}/available_locales.ts`, generateAvailableLocales(LOCALES));
console.log(`Writing file ${I18N_FOLDER}/currencies.ts`);
fs.writeFileSync(`${RELATIVE_I18N_FOLDER}/currencies.ts`, generateCurrencies());
@ -80,7 +77,6 @@ module.exports = (gulp, done) => {
return gulp
.src([
`${I18N_DATA_FOLDER}/**/*.ts`,
`${I18N_FOLDER}/available_locales.ts`,
`${I18N_FOLDER}/currencies.ts`,
`${I18N_FOLDER}/locale_en.ts`
], {base: '.'})
@ -151,16 +147,6 @@ export default ${stringify(dayPeriodsSupplemental).replace(/undefined/g, '')};
`;
}
/**
* Generate a file that contains the complete list of locales
*/
function generateAvailableLocales(LOCALES) {
return `${HEADER}
/** @experimental */
export const AVAILABLE_LOCALES = ${stringify(LOCALES)};
`;
}
/**
* Generate a file that contains the list of currencies and their symbols
*/

View File

@ -11,9 +11,6 @@ export declare class AsyncPipe implements OnDestroy, PipeTransform {
transform<T>(obj: null): null;
}
/** @experimental */
export declare const AVAILABLE_LOCALES: string[];
/** @stable */
export declare class CommonModule {
}