aurelia / i18n

A plugin that provides i18n support.
MIT License
93 stars 70 forks source link

t attribute: optional graceful fallback when: when key is missing, don't replace innerHtml #267

Closed migajek closed 6 years ago

migajek commented 6 years ago

I'm submitting a feature request

please consider adding the configurable graceful fallback for missing keys when using t attribute, as discussed in aurelia forums https://discourse.aurelia.io/t/i18n-t-attribute-dont-translate-when-a-key-is-missing/1123/2

zewa666 commented 6 years ago

I guess same should apply for prepend and append right?

migajek commented 6 years ago

for consistency - I'd say so. But to be honest I don't use any of these

zewa666 commented 6 years ago

@migajek ok I think the linked commit should do so. There should be now a console.warn with the text

Couldn't find translation for key: ${key}`

where key is the missing key. To turn on this feature you'd have to pass in skipTranslationOnMissingKey: true during plugin initialization.

migajek commented 6 years ago

perfect, thank you. I'll give it a shot with a next release !