You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extraction of i18n messages from the following template HTML:
<ng-containeri18n="Update @@update"><b>{{value1}}:</b> current {{value2}} to new {{value3}} </ng-container>
Without ivy: (ctype attributes removed for clarity)
<source>
<xid="START_BOLD_TEXT"equiv-text="<b>"/>
<xid="INTERPOLATION"equiv-text="{{value1}}"/>:
<xid="CLOSE_BOLD_TEXT"equiv-text="</b>"/> current
<xid="INTERPOLATION_1"equiv-text="{{value2}}"/> to new
<xid="INTERPOLATION_2"equiv-text="{{value3}}"/>
</source>
With ivy:
<source>
<xid="START_BOLD_TEXT"equiv-text="<b>{{value1}}"/>
<xid="INTERPOLATION"equiv-text="{{value1}}"/>:
<xid="CLOSE_BOLD_TEXT"equiv-text="</b>"/> current
<xid="INTERPOLATION_1"equiv-text="{value2}} "/> to new
<xid="INTERPOLATION_2"equiv-text="{value3}} "/>
</source>
It seems that there is some offsetting going on, which is making the start and end points in the equiv-text appear in the wrong place. I'll need to debug into this but since these equiv-text attributes are primarily to aid the translator's job, it will not be high on my priority list. Hopefully I can take a look at it later next week or the week after.
OK, so I did some debugging and this issue is caused by us skipping "leading trivia characters" thanks to this 304a12f.
The problem appears because the i18n message begins with a leading space, which is skipped when computing the source-span for the start of the i18n message. This appears to make the source-spans for the inner pieces out of sync.
Actually things are more complex than just that, although that is part of it...
It seems that there are various places where we are mapping back and forth between source-spans and parsed content, which is causing some source-spans to get out of sync.
I think this needs some considerable thought...
Activity
petebacondarwin commentedon Oct 26, 2020
OK, so I did some debugging and this issue is caused by us skipping "leading trivia characters" thanks to this 304a12f.
The problem appears because the i18n message begins with a leading space, which is skipped when computing the source-span for the start of the i18n message. This appears to make the source-spans for the inner pieces out of sync.
petebacondarwin commentedon Oct 26, 2020
Actually things are more complex than just that, although that is part of it...
It seems that there are various places where we are mapping back and forth between source-spans and parsed content, which is causing some source-spans to get out of sync.
I think this needs some considerable thought...
fix(compiler): skipping leading whitespace should not break placehold…
fix(compiler): skipping leading whitespace should not break placehold…
fix(compiler): skipping leading whitespace should not break placehold…
fix(compiler): skipping leading whitespace should not break placehold…
bougnat12 commentedon Nov 16, 2020
I made some tests with last Angular 11 and I always have bad translation:
for the original text to translate:
I'm really disappointed because I like the new Angular 11 version but I cannot migrate my project with this show stopper.
For me it's not corrected and I don't understand why this issue was closed.
petebacondarwin commentedon Nov 16, 2020
@bougnat12 see #39671
angular-automatic-lock-bot commentedon Dec 17, 2020
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.