daniel-sc/ng-extract-i18n-merge

JSON export format

ricardosaracino opened this issue · 5 comments

I noticed the native angular now supports exporting in JSON, and it would be nice if this did to. Great work on this this project thanks a ton.

@ricardosaracino thanks for reaching out!

From what I read in angular/angular#45465 the json format is not really final/stable.

Furthermore the current format (without translation state and without source text) is barely usable in reality (I suspect). And with the current implementation the merge is not as simple..

Based on this, I'd rather postpone this. Of course if you (or others) would like to contribute, I'd be happy to include this!

Hi, its over 1 year now since started talking on this.
Does angular i18n json translation format support now single string value and an object with the value?

@chirag-shastri as you probably have noticed, this depends on the angular i18n-extract support for json format, which is tracked in the upstream issue linked above. As long as this is not addressed, there is not much this lib can do.

@daniel-sc Angular is now allowing extraction to .arb format which is essentially a json and it seems it has all the same infor as .xlf format. Documentation is here https://angular.io/guide/i18n-common-translation-files#change-the-source-language-file-format and from there there is reference to .arb schema/format https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification.

Am I missing something?

We've been using i18n with json for a long time now, so it's definitely stable and supported. Would be super nice if support for this. could be added here