ngx-translate / core

The internationalization (i18n) library for Angular
MIT License
4.53k stars 578 forks source link

Angular 9, ngx-translate/core 12.1.2: translate directive NOT working with dynamic key #1209

Open MightGod opened 4 years ago

MightGod commented 4 years ago

Current behavior

Please see stackblitz below! When I use the translate directive, it doesn't translate when the key is changed dynamically. translate pipe works OK with dynamic key as expected.

Expected behavior

It should translate whenever I'm changing the key.

How do you think that we should fix this?

Not sure, but this behavior worked in Angular 8 and ngx-translate 11.0.1.

Minimal reproduction of the problem with instructions

See this Stackblitz: https://stackblitz.com/edit/angular9-translate-directive-bug-dynamic-key

Environment


ngx-translate version: 12.1.2
Angular version: 9

Browser:
Chrome (desktop) Version 81.0.4044.138

For Tooling issues:
- Node version: v10.16.0
- Platform:  Windows

geertjansen commented 4 years ago

I'm getting the same faulty behaviour with my project since I updated my dependencies.

angular: from 9.0.4 to 9.1.2
ngx-translate: from 11.0.1 to 12.1.2
Karolis92 commented 4 years ago

Same here

angular: 9.1.9
ngx-translate: 12.1.2
Karolis92 commented 4 years ago

After reverting ngx-translate to 11.0.1 everything works as expected. Angular still at 9.1.9

alshar commented 4 years ago

Same here @Karolis92

Revering ngx-translate to 11.0.1 makes everything work fine with Angular 8.3.28

SympathyForTheDev commented 3 years ago

Same issue for me with :

  "@angular/core": "~11.0.2",
  "@ngx-translate/core": "^13.0.0",
  "@ngx-translate/http-loader": "^6.0.0",

rollback to :

  "@angular/core": "~11.0.2",
  "@ngx-translate/core": "^11.0.1",
  "@ngx-translate/http-loader": "^4.0.0",

and everything work :disappointed_relieved:

SuperITMan commented 3 years ago

Same issue for me with:

"@angular/core": "^12.0.4",
"@ngx-translate/core": "^13.0.0"

rollback to:

"@angular/core": "^12.0.4",
"@ngx-translate/core": "^11.0.1"

Then directive is working well again... 😕

harleenarora commented 3 years ago

Same issue in angular 12 @angular/core: ^12.1.2, @ngx-translate/core: ^13.0.0

any update for this issue in future?