feat(compiler): allow missing translations (#14113)

closes #13861
This commit is contained in:
Gion Kunz
2017-01-10 14:14:41 +01:00
committed by Miško Hevery
parent 5885c52c1f
commit 8775ab9495
9 changed files with 114 additions and 25 deletions

View File

@ -25,7 +25,7 @@ export {DebugElement, DebugNode, asNativeElements, getDebugNode} from './debug/d
export {GetTestability, Testability, TestabilityRegistry, setTestabilityGetter} from './testability/testability';
export * from './change_detection';
export * from './platform_core_providers';
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID} from './i18n/tokens';
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MISSING_TRANSLATION_STRATEGY, MissingTranslationStrategy} from './i18n/tokens';
export {ApplicationModule} from './application_module';
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './profile/profile';
export {Type} from './type';

View File

@ -22,3 +22,17 @@ export const TRANSLATIONS = new InjectionToken<string>('Translations');
* @experimental i18n support is experimental.
*/
export const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');
/**
* @experimental i18n support is experimental.
*/
export const MISSING_TRANSLATION_STRATEGY = new InjectionToken('MissingTranslationStrategy');
/**
* @experimental i18n support is experimental.
*/
export enum MissingTranslationStrategy {
Error,
Warning,
Ignore,
}