transloco
transloco copied to clipboard
fix (service): add respect for fallback language for translateObject
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
This PR fixes #519
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.