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

control flow: migration does not preserve i18n attribute on ng-template #52517

Closed
zip-fa opened this issue Nov 5, 2023 · 1 comment
Closed
Assignees
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch)
Milestone

Comments

@zip-fa
Copy link

zip-fa commented Nov 5, 2023

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

Hi.
This code:

<ng-container *ngIf="cond; else testTpl">
bla bla
</ng-container>
   
<ng-template #testTpl i18n="@@test_key">Some text</ng-template>

Got migrated to this:

@if (cond) {
  bla bla
} @else {
  Some text
}

I guess this is not fixable, because of strange setup with i18n attribute on ng-template. But maybe consider migrating this code to </ng-container

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.0.0-rc.3
Node: 18.18.1
Package Manager: npm 9.8.1
OS: win32 x64

Angular: 17.0.0-rc.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-rc.3
@angular-devkit/build-angular   17.0.0-rc.3
@angular-devkit/core            17.0.0-rc.3
@angular-devkit/schematics      17.0.0-rc.3
@angular/cli                    17.0.0-rc.3
@angular/ssr                    17.0.0-rc.3
@schematics/angular             17.0.0-rc.3
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else?

No response

@zip-fa zip-fa changed the title control flow: migration does not preserve i18n attribute on ng-container control flow: migration does not preserve i18n attribute on ng-tempalte Nov 5, 2023
@zip-fa zip-fa changed the title control flow: migration does not preserve i18n attribute on ng-tempalte control flow: migration does not preserve i18n attribute on ng-template Nov 5, 2023
@JeanMeche JeanMeche added the area: migrations Issues related to `ng update` migrations label Nov 5, 2023
@ngbot ngbot bot added this to the needsTriage milestone Nov 5, 2023
@JeanMeche JeanMeche added the core: control flow Issues related to the built-in control flow (@if, @for, @switch) label Nov 5, 2023
@jessicajaniuk jessicajaniuk self-assigned this Nov 6, 2023
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 7, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 7, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 7, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 7, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 7, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 8, 2023
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517
atscott pushed a commit that referenced this issue Nov 8, 2023
…52597)

This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: #52517

PR Close #52597
@atscott atscott closed this as completed in 12f979d Nov 8, 2023
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this issue Dec 6, 2023
…ngular#52597)

This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517

PR Close angular#52597
@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 Dec 9, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this issue Jan 23, 2024
…ngular#52597)

This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: angular#52517

PR Close angular#52597
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants