-
Notifications
You must be signed in to change notification settings - Fork 22
feat(localization): Move old samples for localization and add separate sample for the new localization. #3752
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
Conversation
…e sample for the new localization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the localization samples to use a new localization API (registerI18n and setCurrentI18n) instead of the legacy approach. The old samples are preserved under a separate "localization-samples-old" directory with a "Legacy" designation, while the main localization sample is updated to demonstrate the new API.
Changes:
- Updated the main localization sample to use the new
registerI18nandsetCurrentI18nAPIs - Moved legacy localization samples to a separate directory with a new route
- Added
provideIgniteIntl()to application configuration - Updated dependencies to use alpha versions that support the new localization API
Reviewed changes
Copilot reviewed 11 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/services/services.routes.ts | Updated imports and added route for legacy localization sample |
| src/app/services/services-routes-data.ts | Added display name for legacy localization route |
| src/app/services/localization-samples/localization-all-resources/localization-all-resources.component.ts | Refactored to use new registerI18n and setCurrentI18n APIs, removed Angular locale registration |
| src/app/services/localization-samples-old/localization-all-resources/localization-all-resources.component.ts | New file preserving the legacy localization implementation |
| src/app/services/localization-samples-old/localization-all-resources/localization-all-resources.component.scss | New file with styles for legacy component |
| src/app/services/localization-samples-old/localization-all-resources/localization-all-resources.component.html | New file with template for legacy component |
| src/app/app.config.ts | Added provideIgniteIntl() provider for new localization system |
| package.json | Updated igniteui-angular packages to alpha versions and added igniteui-i18n-resources dependency |
| live-editing/configs/LocalizationConfigGenerator.ts | Updated to use BaseAppAngularLocaleConfig for legacy samples |
| live-editing/configs/BaseConfig.ts | Added provideIgniteIntl() provider and duplicate HammerModule entry |
| live-editing/configs/BaseConfig-AngularLocale.ts | New config file for legacy localization samples without new provider |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ices/localization-samples/localization-all-resources/localization-all-resources.component.ts
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.