Closed ybupro closed 1 year ago
could you please post a snippet reproducing the issue? I can't really grasp what's being reported.
Hi Nando, I update the description. I am not sure exactly what will make I18n return object as the image I attach. The translation file I use is fetch from backend. In the file, there exists similar key like I attach, this scenario, it will return a object but not a string as other. DO you have any idea? Thank you!
oh, dots like in phoneno.
won't work because .
is the translation separator by default. This allows having things like i18n.t("messages.hello")
.
could you please post a snippet reproducing the issue? I can't really grasp what's being reported.
oh, dots like in
phoneno.
won't work because.
is the translation separator by default. This allows having things likei18n.t("messages.hello")
.
Got it, thank you for your prompt response.
I think it works now since this commit https://github.com/fnando/i18n/commit/f7de3c706cbc6029e5229706bda7cd0bca61273c (v4.4.0+)
Description
very similar key exist may return object but not string translation.
How to reproduce
For Example I have below two key with translation
I get translation result below
What do you expect
properly render result with similar key like cardno cardno. or phoneno phoneno.
What happened instead
return{"": undefined, "0": "P", "1": "h", "2": "o", "3": "n", "4": "e", "5": " ", "6": "#"}
Software:
using "i18n-js": "4.3.2"