rules icon indicating copy to clipboard operation
rules copied to clipboard

I18n Builder API support

Open fkolar opened this issue 4 years ago • 2 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report  
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

Currently MetaUI relies on the Runtime i18n (something similar to ngx-translate used to work) and have specific syntax to mark strings inside OSS to be translatable.

Expected behavior

Extend Builder API to include also the also OSS files. This is for "extract strings to files" and "Compile" process

fkolar avatar Mar 03 '20 14:03 fkolar

There is no real builder support for i18n as it process during AOT compilation, but we will probbly have separate command that we will execute as part of the build chain. We can get some idea from here:

https://github.com/angular/angular/blob/master/packages/compiler-cli/src/transformers/program.ts

const bundle = this.compiler.emitMessageBundle(this.analyzedModules, locale);
      i18nExtract(format, file, this.host, this.options, bundle);

fkolar avatar May 12 '20 08:05 fkolar

Possibly we can leverage a pre AOT stage in the build pipeline?

zackarychapple avatar May 13 '20 14:05 zackarychapple