Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARB Serializer -> missing "meaning" on extracted translation files #40506

Closed
meriturva opened this issue Jan 21, 2021 · 4 comments
Closed

ARB Serializer -> missing "meaning" on extracted translation files #40506

meriturva opened this issue Jan 21, 2021 · 4 comments
Labels
area: i18n feature Issue that requests a new feature help wanted An issue that is suitable for a community contributor (based on its complexity/scope).
Milestone

Comments

@meriturva
Copy link

meriturva commented Jan 21, 2021

馃悶 bug report

Is this a regression?

No, ARB file format is new on Angular 11.1

Description

We would like to support ARB format for our component translations files (to avoid the use of XML parser library to handle xliff files: xml2js or cheerio). After update our solution to Angular 11.1 we are now testing ARB extraction format but what we have noted is that there is no more meaning information extracted:

"71788121164220023": "no tags found",
  "@71788121164220023": {
    "description": "No tags found placeholder",
    "x-locations": [
      {
        "file": "projects\\xxxxx\\hardware-editors\\src\\lib\\elements\\channelEditor.component.html",
        "start": { "line": "70", "column": "25" },
        "end": { "line": "70", "column": "38" }
      }
    ]
  },

Why not to use Customized Attribute on ARB format (as ready did with x-location) and add an x-meaning property?

For example:

"71788121164220023": "no tags found",
  "@71788121164220023": {
    "description": "No tags found placeholder",
    "x-meaning": "My meaning",
    "x-locations": [
      {
        "file": "projects\\xxxxx\\hardware-editors\\src\\lib\\elements\\channelEditor.component.html",
        "start": { "line": "70", "column": "25" },
        "end": { "line": "70", "column": "38" }
      }
    ]
  },
@petebacondarwin petebacondarwin added area: i18n feature Issue that requests a new feature help wanted An issue that is suitable for a community contributor (based on its complexity/scope). labels Jan 21, 2021
@ngbot ngbot bot modified the milestone: Backlog Jan 21, 2021
@petebacondarwin
Copy link
Member

That is a reasonable request. Would you be interested in providing a PR to add this?

@meriturva
Copy link
Author

So thanks @petebacondarwin for that opportunity! We use now the meaning to split translations and place them in the correct library resource folder (we are also waiting for new APF format based on Ivy). Due to the missing meaning information on ARB format, we are testing now to run extraction tool on all single library and see performance on CI.

So if we really need x-meaning property I guess we could arrange a PR.
Keep in touch and thanks again!

crisbeto added a commit to crisbeto/angular that referenced this issue Jan 24, 2021
The ARB format doesn't have a dedicated field for message meaning so these changes include it
as a customize attribute called `x-meaning`.

Fixes angular#40506.
@meriturva
Copy link
Author

So thanks @crisbeto !

jessicajaniuk pushed a commit that referenced this issue Jan 25, 2021
The ARB format doesn't have a dedicated field for message meaning so these changes include it
as a customize attribute called `x-meaning`.

Fixes #40506.

PR Close #40546
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: i18n feature Issue that requests a new feature help wanted An issue that is suitable for a community contributor (based on its complexity/scope).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants