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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n Ivy extractor only reports the first location context #39330

Closed
laurentgoudet opened this issue Oct 19, 2020 · 2 comments
Closed

i18n Ivy extractor only reports the first location context #39330

laurentgoudet opened this issue Oct 19, 2020 · 2 comments
Assignees
Labels
area: i18n P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Milestone

Comments

@laurentgoudet
Copy link

Small repro in https://github.com/laurentgoudet/ivy-xi18n-bug.

Steps:

  <!-- Resources -->
  <h2>Resources</h2>
  <p i18n>Here are some links to help you get started:</p>
  <p i18n>Here are some links to help you get started:</p>
      <trans-unit id="2b26c7522dda8ad6bc76a0462d7a3c94f0f8a688" datatype="html">
        <source>Here are some links to help you get started:</source>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/app.component.html</context>
          <context context-type="linenumber">343</context>
        </context-group>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/app.component.html</context>
          <context context-type="linenumber">344</context>
        </context-group>
      </trans-unit>
      <trans-unit id="2b26c7522dda8ad6bc76a0462d7a3c94f0f8a688" datatype="html">
        <source>Here are some links to help you get started:</source>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/app.component.html</context>
          <context context-type="linenumber">343</context>
        </context-group>
      </trans-unit>

This means translators have less context to understand how a piece of text is used across an app.

@petebacondarwin petebacondarwin added area: i18n P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Oct 19, 2020
@ngbot ngbot bot modified the milestone: Backlog Oct 19, 2020
@petebacondarwin petebacondarwin self-assigned this Oct 19, 2020
@petebacondarwin
Copy link
Member

Thanks for this @laurentgoudet
It is actually a duplicate of #39314
But since you provide an actual reproduction, I will close that and keep this.

petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Oct 24, 2020
Previously only the first message, for each id, was serialized
which meant that additional message location information
was lost.

Now all the message locations are included in the serialized
messages.

Fixes angular#39330
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Oct 24, 2020
Previously only the first message, for each id, was serialized
which meant that additional message location information
was lost.

Now all the message locations are included in the serialized
messages.

Fixes angular#39330
alxhub pushed a commit that referenced this issue Oct 26, 2020
Previously only the first message, for each id, was serialized
which meant that additional message location information
was lost.

Now all the message locations are included in the serialized
messages.

Fixes #39330

PR Close #39411
alxhub pushed a commit that referenced this issue Oct 26, 2020
Previously only the first message, for each id, was serialized
which meant that additional message location information
was lost.

Now all the message locations are included in the serialized
messages.

Fixes #39330

PR Close #39411
@alxhub alxhub closed this as completed in 57ead7a Oct 26, 2020
@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 Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: i18n P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants