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(compiler): fix support for html-like text in translatable attributes #23053

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Mar 29, 2018

<tag i18n-attr attr="<some>tags</some>">...</tag> was not supported before.

(use case: material as a tooltip that get html content from an attribute)

@vicb vicb added action: review The PR is still awaiting reviews from at least one requested reviewer area: i18n area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Mar 29, 2018
@vicb vicb requested a review from ocombe March 29, 2018 05:12
@vicb
Copy link
Contributor Author

vicb commented Mar 29, 2018

@mary-poppins
Copy link

You can preview 61bec75 at https://pr23053-61bec75.ngbuilds.io/.

@ocombe ocombe assigned vicb and unassigned ocombe Mar 29, 2018
@ocombe ocombe removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 29, 2018
@vicb vicb added the action: merge The PR is ready for merge by the caretaker label Mar 29, 2018
@alxhub alxhub closed this in 28058b7 Mar 29, 2018
@vicb vicb deleted the 0328-fixEsc branch April 3, 2018 17:59
@antid0te
Copy link

Hi,

since i upgraded to 5.2.10 i have an issue with my translations.
I used &lt;br&gt; for line break which is not working anymore with this fix

Shouldn't the content of translation be escaped for attribute translation only ? and not for regular translation (i18n attribute) ?

@ocombe
Copy link
Contributor

ocombe commented May 11, 2018

have you tried with <br/> ?

@antid0te
Copy link

I have an 'xliff parse errors' if i use <br> or <br/>.
That's why i used &lt;br&gt; which was interpreted as <br> but transformed as &lt;br&gt; again since this fix and thus displayed as text

@aviaur
Copy link

aviaur commented May 11, 2018

i have the same thing as @antid0te since 5.2.10 :-(

@vicb
Copy link
Contributor Author

vicb commented May 11, 2018

@antid0te @aviaur could you please create a new issue with a detailed description of the current behavior vs the expected behavior ?

We don't monitor close PRs nor issues - I only got here because @ocombe pointed me to your question.

AFAIU you are trying to add html to a translated message which is not a supported use case.

@antid0te
Copy link

Ok, can you point me to the right way of adding a line break to a translated message ?

@vicb
Copy link
Contributor Author

vicb commented May 11, 2018

i18n translations could only be composed from tags that are present in the source message.

Again difficult to help more with no concrete use case.

@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 Sep 13, 2019
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: core Issues related to the framework runtime area: i18n cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants