Skip to content
Permalink
Browse files

feat(core): remove dependency to intl API

BREAKING CHANGE: all i18n pipes have been updated to not require the intl API anymore. Some results might vary, see the document to update from v4 to v5 for more information.

Fixes angular#10809, angular#9524, angular#7008, angular#9324, angular#7590, angular#6724, angular#3429, angular#17576, angular#17478, angular#17319, angular#17200, angular#16838, angular#16624, angular#16625, angular#16591, angular#14131, angular#12632, angular#11376, angular#11187
  • Loading branch information...
ocombe committed Jun 19, 2017
1 parent 01d4eae commit 133577b56a422c4bbe03ed64d6a557e20c71ca50
Showing 554 changed files with 90,536 additions and 852 deletions.
@@ -4,6 +4,7 @@
bazel-*
node_modules
bower_components
tools/gulp-tasks/cldr/cldr-data/

# Include when developing application packages.
pubspec.lock
@@ -42,3 +42,5 @@ gulp.task('serve', loadTask('serve', 'default'));
gulp.task('serve-examples', loadTask('serve', 'examples'));
gulp.task('changelog', loadTask('changelog'));
gulp.task('check-env', () => {/* this is a noop because the env test ran already above */});
gulp.task('cldr:extract', loadTask('cldr', 'extract'));
gulp.task('cldr:download', loadTask('cldr', 'download'));
@@ -49,7 +49,9 @@
"canonical-path": "0.0.2",
"chokidar": "^1.1.0",
"clang-format": "^1.0.32",
"cldr": "^3.5.2",
"cldr": "^4.3.0",
"cldr-data-downloader": "^0.3.0",
"cldrjs": "^0.4.8",
"conventional-changelog": "^1.1.0",
"cors": "^2.7.1",
"dgeni": "^0.4.2",
@@ -12,9 +12,12 @@
* Entry point for all public APIs of the common package.
*/
export * from './location/index';
export {NgLocaleLocalization, NgLocalization} from './localization';
export {CommonModule} from './common_module';
export {NgLocaleLocalization, NgLocalization} from './i18n/localization';
export {AVAILABLE_LOCALES} from './i18n/available_locales';
export {CURRENCIES} from './i18n/currencies';
export {CommonModule, DeprecatedCommonModule} from './common_module';
export {NgClass, NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';
export {DeprecatedDatePipe, DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe} from './pipes/deprecated/index';
export {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi} from './platform_id';
export {VERSION} from './version';
@@ -8,11 +8,13 @@

import {NgModule} from '@angular/core';

import {COMMON_DEPRECATED_DIRECTIVES, COMMON_DIRECTIVES} from './directives/index';
import {NgLocaleLocalization, NgLocalization} from './localization';
import {COMMON_DIRECTIVES} from './directives/index';
import {NgLocaleLocalization, NgLocalization} from './i18n/localization';
import {DEPRECATED_COMMON_PIPES} from './pipes/deprecated/index';
import {COMMON_PIPES} from './pipes/index';



// Note: This does not contain the location providers,
// as they need some platform specific implementations to work.
/**
@@ -29,3 +31,23 @@ import {COMMON_PIPES} from './pipes/index';
})
export class CommonModule {
}

// Note: This does not contain the location providers,
// as they need some platform specific implementations to work.
/**
* The module that includes all the basic Angular directives like {@link NgIf}, {@link NgForOf}, ...
* It includes the deprecated i18n pipes that will be removed in Angular v6 in favor of the new
* i18n pipes that don't use the intl api.
*
* @stable
* @deprecated use CommonModule instead
*/
@NgModule({
declarations: [COMMON_DIRECTIVES, DEPRECATED_COMMON_PIPES],
exports: [COMMON_DIRECTIVES, DEPRECATED_COMMON_PIPES],
providers: [
{provide: NgLocalization, useClass: NgLocaleLocalization},
],
})
export class DeprecatedCommonModule {
}
@@ -8,7 +8,7 @@

import {Attribute, Directive, Host, Input, TemplateRef, ViewContainerRef} from '@angular/core';

import {NgLocalization, getPluralCategory} from '../localization';
import {NgLocalization, getPluralCategory} from '../i18n/localization';

import {SwitchView} from './ng_switch';

@@ -0,0 +1,186 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

// This is generated code DO NOT MODIFY
// see angular/tools/gulp-tasks/cldr/extract.js

/** @experimental */
export const AVAILABLE_LOCALES = [
'af', 'af-NA', 'agq',
'ak', 'am', 'ar',
'ar-AE', 'ar-BH', 'ar-DJ',
'ar-DZ', 'ar-EG', 'ar-EH',
'ar-ER', 'ar-IL', 'ar-IQ',
'ar-JO', 'ar-KM', 'ar-KW',
'ar-LB', 'ar-LY', 'ar-MA',
'ar-MR', 'ar-OM', 'ar-PS',
'ar-QA', 'ar-SA', 'ar-SD',
'ar-SO', 'ar-SS', 'ar-SY',
'ar-TD', 'ar-TN', 'ar-YE',
'as', 'asa', 'ast',
'az', 'az-Cyrl', 'az-Latn',
'bas', 'be', 'bem',
'bez', 'bg', 'bm',
'bn', 'bn-IN', 'bo',
'bo-IN', 'br', 'brx',
'bs', 'bs-Cyrl', 'bs-Latn',
'ca', 'ca-AD', 'ca-ES-VALENCIA',
'ca-FR', 'ca-IT', 'ce',
'cgg', 'chr', 'ckb',
'ckb-IR', 'cs', 'cu',
'cy', 'da', 'da-GL',
'dav', 'de', 'de-AT',
'de-BE', 'de-CH', 'de-IT',
'de-LI', 'de-LU', 'dje',
'dsb', 'dua', 'dyo',
'dz', 'ebu', 'ee',
'ee-TG', 'el', 'el-CY',
'en', 'en-001', 'en-150',
'en-AG', 'en-AI', 'en-AS',
'en-AT', 'en-AU', 'en-BB',
'en-BE', 'en-BI', 'en-BM',
'en-BS', 'en-BW', 'en-BZ',
'en-CA', 'en-CC', 'en-CH',
'en-CK', 'en-CM', 'en-CX',
'en-CY', 'en-DE', 'en-DG',
'en-DK', 'en-DM', 'en-ER',
'en-FI', 'en-FJ', 'en-FK',
'en-FM', 'en-GB', 'en-GD',
'en-GG', 'en-GH', 'en-GI',
'en-GM', 'en-GU', 'en-GY',
'en-HK', 'en-IE', 'en-IL',
'en-IM', 'en-IN', 'en-IO',
'en-JE', 'en-JM', 'en-KE',
'en-KI', 'en-KN', 'en-KY',
'en-LC', 'en-LR', 'en-LS',
'en-MG', 'en-MH', 'en-MO',
'en-MP', 'en-MS', 'en-MT',
'en-MU', 'en-MW', 'en-MY',
'en-NA', 'en-NF', 'en-NG',
'en-NL', 'en-NR', 'en-NU',
'en-NZ', 'en-PG', 'en-PH',
'en-PK', 'en-PN', 'en-PR',
'en-PW', 'en-RW', 'en-SB',
'en-SC', 'en-SD', 'en-SE',
'en-SG', 'en-SH', 'en-SI',
'en-SL', 'en-SS', 'en-SX',
'en-SZ', 'en-TC', 'en-TK',
'en-TO', 'en-TT', 'en-TV',
'en-TZ', 'en-UG', 'en-UM',
'en-US-POSIX', 'en-VC', 'en-VG',
'en-VI', 'en-VU', 'en-WS',
'en-ZA', 'en-ZM', 'en-ZW',
'eo', 'es', 'es-419',
'es-AR', 'es-BO', 'es-BR',
'es-BZ', 'es-CL', 'es-CO',
'es-CR', 'es-CU', 'es-DO',
'es-EA', 'es-EC', 'es-GQ',
'es-GT', 'es-HN', 'es-IC',
'es-MX', 'es-NI', 'es-PA',
'es-PE', 'es-PH', 'es-PR',
'es-PY', 'es-SV', 'es-US',
'es-UY', 'es-VE', 'et',
'eu', 'ewo', 'fa',
'fa-AF', 'ff', 'ff-CM',
'ff-GN', 'ff-MR', 'fi',
'fil', 'fo', 'fo-DK',
'fr', 'fr-BE', 'fr-BF',
'fr-BI', 'fr-BJ', 'fr-BL',
'fr-CA', 'fr-CD', 'fr-CF',
'fr-CG', 'fr-CH', 'fr-CI',
'fr-CM', 'fr-DJ', 'fr-DZ',
'fr-GA', 'fr-GF', 'fr-GN',
'fr-GP', 'fr-GQ', 'fr-HT',
'fr-KM', 'fr-LU', 'fr-MA',
'fr-MC', 'fr-MF', 'fr-MG',
'fr-ML', 'fr-MQ', 'fr-MR',
'fr-MU', 'fr-NC', 'fr-NE',
'fr-PF', 'fr-PM', 'fr-RE',
'fr-RW', 'fr-SC', 'fr-SN',
'fr-SY', 'fr-TD', 'fr-TG',
'fr-TN', 'fr-VU', 'fr-WF',
'fr-YT', 'fur', 'fy',
'ga', 'gd', 'gl',
'gsw', 'gsw-FR', 'gsw-LI',
'gu', 'guz', 'gv',
'ha', 'ha-GH', 'ha-NE',
'haw', 'he', 'hi',
'hr', 'hr-BA', 'hsb',
'hu', 'hy', 'id',
'ig', 'ii', 'is',
'it', 'it-CH', 'it-SM',
'it-VA', 'ja', 'jgo',
'jmc', 'ka', 'kab',
'kam', 'kde', 'kea',
'khq', 'ki', 'kk',
'kkj', 'kl', 'kln',
'km', 'kn', 'ko',
'ko-KP', 'kok', 'ks',
'ksb', 'ksf', 'ksh',
'kw', 'ky', 'lag',
'lb', 'lg', 'lkt',
'ln', 'ln-AO', 'ln-CF',
'ln-CG', 'lo', 'lrc',
'lrc-IQ', 'lt', 'lu',
'luo', 'luy', 'lv',
'mas', 'mas-TZ', 'mer',
'mfe', 'mg', 'mgh',
'mgo', 'mk', 'ml',
'mn', 'mr', 'ms',
'ms-BN', 'ms-SG', 'mt',
'mua', 'my', 'mzn',
'naq', 'nb', 'nb-SJ',
'nd', 'nds', 'nds-NL',
'ne', 'ne-IN', 'nl',
'nl-AW', 'nl-BE', 'nl-BQ',
'nl-CW', 'nl-SR', 'nl-SX',
'nmg', 'nn', 'nnh',
'nus', 'nyn', 'om',
'om-KE', 'or', 'os',
'os-RU', 'pa', 'pa-Arab',
'pa-Guru', 'pl', 'prg',
'ps', 'pt', 'pt-AO',
'pt-CH', 'pt-CV', 'pt-GQ',
'pt-GW', 'pt-LU', 'pt-MO',
'pt-MZ', 'pt-PT', 'pt-ST',
'pt-TL', 'qu', 'qu-BO',
'qu-EC', 'rm', 'rn',
'ro', 'ro-MD', 'rof',
'root', 'ru', 'ru-BY',
'ru-KG', 'ru-KZ', 'ru-MD',
'ru-UA', 'rw', 'rwk',
'sah', 'saq', 'sbp',
'se', 'se-FI', 'se-SE',
'seh', 'ses', 'sg',
'shi', 'shi-Latn', 'shi-Tfng',
'si', 'sk', 'sl',
'smn', 'sn', 'so',
'so-DJ', 'so-ET', 'so-KE',
'sq', 'sq-MK', 'sq-XK',
'sr', 'sr-Cyrl', 'sr-Cyrl-BA',
'sr-Cyrl-ME', 'sr-Cyrl-XK', 'sr-Latn',
'sr-Latn-BA', 'sr-Latn-ME', 'sr-Latn-XK',
'sv', 'sv-AX', 'sv-FI',
'sw', 'sw-CD', 'sw-KE',
'sw-UG', 'ta', 'ta-LK',
'ta-MY', 'ta-SG', 'te',
'teo', 'teo-KE', 'th',
'ti', 'ti-ER', 'tk',
'to', 'tr', 'tr-CY',
'twq', 'tzm', 'ug',
'uk', 'ur', 'ur-IN',
'uz', 'uz-Arab', 'uz-Cyrl',
'uz-Latn', 'vai', 'vai-Latn',
'vai-Vaii', 'vi', 'vo',
'vun', 'wae', 'xog',
'yav', 'yi', 'yo',
'yo-BJ', 'yue', 'zgh',
'zh', 'zh-Hans', 'zh-Hans-HK',
'zh-Hans-MO', 'zh-Hans-SG', 'zh-Hant',
'zh-Hant-HK', 'zh-Hant-MO', 'zu'
];
Oops, something went wrong.

0 comments on commit 133577b

Please sign in to comment.
You can’t perform that action at this time.