martinandert / counterpart

A translation and localization library for Node.js and the browser.
MIT License
242 stars 25 forks source link

Emit Event when translation is not found #21

Closed frg closed 9 years ago

frg commented 9 years ago

Is there a way to trigger an event when translation is not found? Basically when the fallback is used.

This is important because missing translations should not be silently ignored but handled appropriately for each case.

ex. Translation not found > send request to server and log an error

martinandert commented 9 years ago

Hi,

currently no event is emitted in this case. Your use case seems legit. Do you mind sending a pull request?

frg commented 9 years ago

Ill get on this later on today after work :)

frg commented 9 years ago

Just created a pull request. Sorry it took so long! Let me know if you need me to modify anything in the implementation @martinandert