ng-extract-i18n-merge icon indicating copy to clipboard operation
ng-extract-i18n-merge copied to clipboard

JSON export format

Open ricardosaracino opened this issue 3 years ago • 7 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 avatar Aug 26 '22 18:08 ricardosaracino

@ricardosaracino thanks for reaching out!

From what I read in https://github.com/angular/angular/issues/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!

daniel-sc avatar Aug 26 '22 19:08 daniel-sc

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 avatar Aug 26 '23 17:08 chirag-shastri

@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 avatar Sep 07 '23 08:09 daniel-sc

@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?

co-dax avatar Dec 18 '23 23:12 co-dax

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

spock123 avatar Jan 10 '24 14:01 spock123