formatjs / handlebars-intl

Handlebars helpers for internationalization.
http://formatjs.io/handlebars/
Other
265 stars 28 forks source link

intlGet: Print message path if it is undefined #76

Closed philmander closed 7 years ago

philmander commented 8 years ago

I would like to change the behavior of the intlGet when a message path cannot be found.

Instead of throwing an error (https://github.com/yahoo/handlebars-intl/blob/master/src/helpers.js#L101), I would like to print just the message path. E.g.

<p>{{intlGet "messages.iamundefined"}}</p>

renders to:

<p>messages.iamundefined</p>

Is this a feature you would consider integrating? Maybe via an option to enable it or something?

caridy commented 8 years ago

IIRC we decided against this because it really hides trivial errors.