-
Notifications
You must be signed in to change notification settings - Fork 26.4k
feat(i18n): initial $localize
functionality
#31609
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
feat(i18n): initial $localize
functionality
#31609
Conversation
fa4213d
to
84eff89
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only "I consent." in this pull request. Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
dcc05e6
to
78021d4
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only "I consent." in this pull request. Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
0afe5b9
to
feec4a8
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
0b49661
to
416d8b6
Compare
GLOBAL APPROVAL: misko |
This commit changes the Angular compiler (ivy-only) to generate `$localize` tagged strings for component templates that use `i18n` attributes. BREAKING CHANGE Since `$localize` is a global function, it must be included in any applications that use i18n. This is achieved by importing the `@angular/localize` package into an appropriate bundle, where it will be executed before the renderer needs to call `$localize`. For CLI based projects, this is best done in the `polyfills.ts` file. ```ts import '@angular/localize'; ``` For non-CLI applications this could be added as a script to the index.html file or another suitable script file. PR Close #31609
This has been replaced by the `$localize` tag. PR Close #31609
This has been replaced by the `loadTranslations()` function in `@angular/localize/run_time`. PR Close #31609
This test uses localization in the `AppComponent` component: * an `i18n` attribute in the template * a call to the `$localize` tag in the component constructor PR Close #31609
This needs to be reverted as it breaks g3.
|
The files in the pattern do not exist. PR Close angular#31609
…31609) This commit changes the Angular compiler (ivy-only) to generate `$localize` tagged strings for component templates that use `i18n` attributes. BREAKING CHANGE Since `$localize` is a global function, it must be included in any applications that use i18n. This is achieved by importing the `@angular/localize` package into an appropriate bundle, where it will be executed before the renderer needs to call `$localize`. For CLI based projects, this is best done in the `polyfills.ts` file. ```ts import '@angular/localize'; ``` For non-CLI applications this could be added as a script to the index.html file or another suitable script file. PR Close angular#31609
This has been replaced by the `$localize` tag. PR Close angular#31609
) This has been replaced by the `loadTranslations()` function in `@angular/localize/run_time`. PR Close angular#31609
This test uses localization in the `AppComponent` component: * an `i18n` attribute in the template * a call to the `$localize` tag in the component constructor PR Close angular#31609
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Blocked on #31943TODOs
For this PR:
$localize
@angular/localize
etc (perhaps via a migration?)@angular/localize
etc (perhaps via a migration?)For next PR?