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

Libraries using i18n are not translated in Angular 17 apps with build-angular:application #27051

Closed
dtopalov opened this issue Feb 7, 2024 · 2 comments

Comments

@dtopalov
Copy link

dtopalov commented Feb 7, 2024

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

localize, Don't known / other

Is this a regression?

Yes

Description

When a component using i18n and a directive with inputs with custom service for translation/localization purposes is packed as a library and installed in an Angular 17 project, translations no longer work (only default English values are populated).

Same code works in components that are defined in the application (not installed as a separate library/package), and the translations also work with "browser" build (with some additional configurations):

"architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser"

Everything also works as expected when updating Angular 16 application to 17, but not when installing the packages in a newly created Angular 17 application, so it seems the issue is caused by the new default build system - https://angular.io/guide/esbuild.

Reproduction:

Archive.zip

  • unzip
  • npm i
  • ng serve -o --configuration=es

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.1.1
Node: 18.18.2
Package Manager: npm 9.8.1
OS: darwin x64

Angular: 17.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1701.1
@angular-devkit/build-angular   17.1.1
@angular-devkit/core            17.1.1
@angular-devkit/schematics      17.1.1
@schematics/angular             17.1.1
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.3

Anything else?

Related issue:

telerik/kendo-angular#4195

@JoostK
Copy link
Member

JoostK commented Feb 7, 2024

Sounds like a duplicate of #26350

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
@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 Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants