transloco icon indicating copy to clipboard operation
transloco copied to clipboard

Empty keys are rendering the key instead of the empty value

Open shakedSetoo opened this issue 7 years ago • 4 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Key with empty value is not rendered empty but displays its key instead of the empty value. If I have an empty value for specific key { "KEY": "" } then in the displayed component the text on the element will be KEY and not ""

Expected behavior

Empty values should be rendered empty

Minimal reproduction of the problem with instructions

For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem, for that you could use our stackblitz example

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

shakedSetoo avatar Sep 26 '19 11:09 shakedSetoo

You need to pass config the following option:

missingHandler: {
 allowEmpty: true
}

shaharkazaz avatar Sep 26 '19 11:09 shaharkazaz

@shaharkazaz Its not working...

I have a key "LANDING_PAGE.BUY_NOW_BTN2" and its value is empty in my french translation file.

the key is rendered to the view and not the empty string...

too bad...

shakedSetoo avatar Sep 26 '19 12:09 shakedSetoo

Can you create a reproduction in stackblitz?

shaharkazaz avatar Sep 26 '19 12:09 shaharkazaz

+1 for this issue

artuska avatar Jan 26 '22 23:01 artuska