fix(compiler): fix missing translations handling (#14113)

PR Close #14113
This commit is contained in:
Victor Berchet
2017-01-25 23:26:49 -08:00
committed by Miško Hevery
parent 8775ab9495
commit 827c3fe199
12 changed files with 139 additions and 107 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, MISSING_TRANSLATION_STRATEGY, MissingTranslationStrategy} from './i18n/tokens';
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy} from './i18n/tokens';
export {ApplicationModule} from './application_module';
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './profile/profile';
export {Type} from './type';

View File

@ -23,11 +23,6 @@ export const TRANSLATIONS = new InjectionToken<string>('Translations');
*/
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.
*/

View File

@ -9,6 +9,7 @@
import {Injectable, InjectionToken} from '../di';
import {BaseError} from '../facade/errors';
import {stringify} from '../facade/lang';
import {MissingTranslationStrategy} from '../i18n/tokens';
import {ViewEncapsulation} from '../metadata';
import {Type} from '../type';
@ -112,6 +113,7 @@ export type CompilerOptions = {
useJit?: boolean,
defaultEncapsulation?: ViewEncapsulation,
providers?: any[],
missingTranslation?: MissingTranslationStrategy,
};
/**