Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Directive does not update when switch from language with subset of overrides #1816

Open
ach opened this issue Dec 11, 2017 · 1 comment
Open
Milestone

Comments

@ach
Copy link

ach commented Dec 11, 2017

Subject of the issue

When switching from a language with a subset of overrides the non-overridden translation keys does not update in translate directive. Translate filter works as expected.

Your environment

  • 2.15.2 angular-translate
  • 1.6.3 angular
  • Tests with Firefox 58b9 and Chrome 62.0.3202.94

Steps to reproduce

I have three languages: DE, EN and EN-US.

EN and DE have all language keys and translations.
EN-US only contain one override for key "hello", and fallback to EN.

https://plnkr.co/edit/M1VMVUgrKzq7gGaAaPpW?p=preview

Click on DE, paragraph is "Hier läuft..."
Click on en-US, paragraph is "This is runnin..."
Click on DE again, paragraph is still "This is runnin..."
Click on DE again, paragraph switches to correct value "Heir .."

Note: translate filter works as expected.

Expected behaviour

When i select DE after EN-US it should update language correctly to "Hier ..."

Actual behaviour

en-US language is still present for keys that is not overridden in en-US.

@knalli
Copy link
Member

knalli commented Dec 13, 2017

Quick solution: Despite the documentation, I would recommend setting the fallback in the config. It looks like it is a workaround for your issue.

I would recommend this also, but we should have a deeper look into it…

@knalli knalli added this to the 2.18.0 milestone Mar 11, 2018
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

2 participants