Closed JalilArfaoui closed 7 years ago
pleasant :). thank you @JalilArfaoui.
polyglot.js t()
function also return the key when something was wrong like an unknown given key, so it's cool.
moreover, polyglot.js throws an error message for this. should we implement an error message for missing locale and empty redux store ? (to make debugging simpler)
I'm not sure we should consider such case an error, whereas I understand why does when given an unknown key ... I think maybe we should leave as is for now, and we'll see if this behavior surprises anyone. If so, we will add a warning and/or change behavior. What do you think ?
agree with you, I merge.
Changed: Now, when empty redux store, or when no locale loaded, translation functions return the requested key