New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(localize): support Application Resource Bundle (ARB) translation file format #36795
Conversation
11397fc
to
176624b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding ARB format @petebacondarwin 👍
I left a couple comments, could you please have a look when you get a chance?
Quick question: we add support for bundles that contain translated content, should we also introduce ARB support for extracted messages (for Ivy only)?
Adding ARB format makes sense to me, but since it's a new feature that extends the list of supported formats, it'd be great to get @IgorMinar's approval as well (added Igor as a reviewer).
Thank you.
...lize/src/tools/src/translate/translation_files/translation_parsers/arb_translation_parser.ts
Show resolved
Hide resolved
My aim is to include an ARB serializer in the new extractor. |
176624b
to
0c47900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @petebacondarwin 👍
… file format The ARB format is a JSON file containing an object where the keys are the message ids and the values are the translations. It is extensible because it can also contain metadata about each message. For example: ``` { "@@Locale": "...", "message-id": "Translated message string", "@message-id": { "type": "text", "description": "Some description text", "x-locations": [{ "start": {"line": 23, "column": 145}, "file": "some/file.ts" }] }, } ``` For more information, see: https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification
0c47900
to
0496833
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The ARB format is a JSON file containing an object where the keys are the
message ids and the values are the translations.
It is extensible because it can also contain metadata about each message.
For example:
For more information, see:
https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification