Tiqa / redux-polyglot

Polyglot.js bindings for Redux
MIT License
58 stars 13 forks source link

Changed: Now, when empty redux store, or when no locale loaded, trans… #49

Closed JalilArfaoui closed 7 years ago

JalilArfaoui commented 7 years ago

Changed: Now, when empty redux store, or when no locale loaded, translation functions return the requested key

guillaumearm commented 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)

JalilArfaoui commented 7 years ago

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 ?

guillaumearm commented 7 years ago

agree with you, I merge.