feat(ivy): updated translation const names (that include message ids) (#27185)

PR Close #27185
This commit is contained in:
Andrew Kushnir
2018-11-16 09:57:23 -08:00
committed by Igor Minar
parent 9129f9ac9b
commit aedc343003
15 changed files with 482 additions and 526 deletions

View File

@ -104,11 +104,9 @@ export class CompilerFacadeImpl implements CompilerFacade {
const constantPool = new ConstantPool();
// Parse the template and check for errors.
const template = parseTemplate(
facade.template, sourceMapUrl, {
preserveWhitespaces: facade.preserveWhitespaces || false,
},
'');
const template = parseTemplate(facade.template, sourceMapUrl, {
preserveWhitespaces: facade.preserveWhitespaces || false,
});
if (template.errors !== undefined) {
const errors = template.errors.map(err => err.toString()).join(', ');
throw new Error(`Errors during JIT compilation of template for ${facade.name}: ${errors}`);
@ -129,6 +127,8 @@ export class CompilerFacadeImpl implements CompilerFacade {
animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,
viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
null,
relativeContextFilePath: '',
i18nUseExternalIds: true,
},
constantPool, makeBindingParser());
const preStatements = [...constantPool.statements, ...res.statements];