Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation is empty when variable does not exist #40

Open
petervdn opened this issue Oct 15, 2018 · 2 comments
Open

Translation is empty when variable does not exist #40

petervdn opened this issue Oct 15, 2018 · 2 comments

Comments

@petervdn
Copy link

{{ $t('somekey', { name: userName }) }}

When the translation does not include a {name} occurrence, the result for the translation is completely empty.

@MatteoGabriele
Copy link
Owner

Hi Peter, could you create a reproduction of this with a simple vue-cli application so that I can have a look?

Thanks

@petervdn
Copy link
Author

Just add a non-existing variable to a call to $t:

This works fine:
console.log(this.$t('some_key'));

This is undefined:
console.log(this.$t('some_key', { name: 'Bob' }));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants