i18nPlugin icon indicating copy to clipboard operation
i18nPlugin copied to clipboard

Default ns

Open skryvytskyi opened this issue 4 years ago • 1 comments

I have a proposal to add default ns in plugin configuration. In case when I have translation with one ns only - I use t('TRANS_KEY'), but en.json file has translation keys under default ns. Example: my default ns is translation, plugin expects t('translation.TRANS_KEY'), but in code it's t('TRANS_KEY').

skryvytskyi avatar Sep 20 '20 04:09 skryvytskyi

Not quite right: if you set default ns to "translation" then keys in default namespaces expected to be t('TRANS_KEY'), not t('translation.TRANS_KEY'). Try to set default ns to 'en'. Then keys like 'TRANS_KEY' will try to resolve in en.json

nyavro avatar Oct 20 '20 11:10 nyavro