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

fix(localize): render placeholder types in extracted XLIFF files #39398

Conversation

petebacondarwin
Copy link
Member

The previous ViewEngine extraction tooling added ctype and type
attributes to XLIFF 1.2 and 2.0 translation files, respectively.

This commit adds this to the new $localize based extraction tooling.
Since the new extraction tooling works from the compiled output rather
than having direct access to the template content, the placeholder types
must be inferred from the name of the placeholder. This is considered
reasonable, since it already does this to compute opening and closing
tag placeholders.

Fixes #38791

@google-cla google-cla bot added the cla: yes label Oct 23, 2020
@petebacondarwin petebacondarwin added action: review The PR is still awaiting reviews from at least one requested reviewer area: i18n target: patch This PR is targeted for the next patch release labels Oct 23, 2020
@ngbot ngbot bot modified the milestone: needsTriage Oct 23, 2020
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix @petebacondarwin 👍

@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 23, 2020
@petebacondarwin petebacondarwin added the action: merge The PR is ready for merge by the caretaker label Oct 23, 2020
@ngbot
Copy link

ngbot bot commented Oct 23, 2020

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "ci/circleci: build-ivy-npm-packages" is failing
    failure status "ci/circleci: build-npm-packages" is failing
    failure status "ci/circleci: test" is failing
    pending missing required status "ci/circleci: publish_snapshot"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@petebacondarwin petebacondarwin force-pushed the i18n-extract-fmt-types-issue-38791 branch from ec3a0f6 to c18ac2a Compare October 24, 2020 16:41
The previous ViewEngine extraction tooling added `ctype` and `type`
attributes to XLIFF 1.2 and 2.0 translation files, respectively.

This commit adds this to the new $localize based extraction tooling.
Since the new extraction tooling works from the compiled output rather
than having direct access to the template content, the placeholder types
must be inferred from the name of the placeholder.  This is considered
reasonable, since it already does this to compute opening and closing
tag placeholders.

Fixes angular#38791
@petebacondarwin petebacondarwin force-pushed the i18n-extract-fmt-types-issue-38791 branch from c18ac2a to ec5ce76 Compare October 26, 2020 19:26
@alxhub alxhub added target: rc This PR is targeted for the next release-candidate and removed target: patch This PR is targeted for the next patch release labels Oct 27, 2020
@alxhub
Copy link
Member

alxhub commented Oct 27, 2020

Hi @petebacondarwin! This PR conflicts with 10.2.x. I've updated it to target: rc - please open a separate PR for the patch branch if it needs to merge there.

alxhub pushed a commit that referenced this pull request Oct 27, 2020
)

The previous ViewEngine extraction tooling added `ctype` and `type`
attributes to XLIFF 1.2 and 2.0 translation files, respectively.

This commit adds this to the new $localize based extraction tooling.
Since the new extraction tooling works from the compiled output rather
than having direct access to the template content, the placeholder types
must be inferred from the name of the placeholder.  This is considered
reasonable, since it already does this to compute opening and closing
tag placeholders.

Fixes #38791

PR Close #39398
@alxhub alxhub closed this in 0ed2c4f Oct 27, 2020
@petebacondarwin petebacondarwin deleted the i18n-extract-fmt-types-issue-38791 branch October 27, 2020 21:17
@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 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: i18n cla: yes target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n Ivy extactor: missing type="fmt" inside <source>
3 participants