transloco icon indicating copy to clipboard operation
transloco copied to clipboard

fix (service): add respect for fallback language for translateObject

Open jensweigele opened this issue 2 years ago • 2 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/ngneat/transloco/blob/master/CONTRIBUTING.md#commit
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

selectTranslateObject and translateObject are not falling back to the fallback language.

Issue Number: N/A

What is the new behavior?

If the result object is empty, the translateObject is called with the fallback language.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

jensweigele avatar Jul 27 '22 14:07 jensweigele

This PR fixes #519

jensweigele avatar Jul 27 '22 14:07 jensweigele

Really hate to tag people but @shaharkazaz could someone look into merging this?

Seems like @jensweigele has done a great job at making this a small change. Really need the fallback language feature to work for our project setup.

sithwarrior avatar Apr 12 '23 07:04 sithwarrior