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

does i18n with named parameters work in .vue template? #184

Closed
KyleXie opened this issue Jan 22, 2024 · 5 comments
Closed

does i18n with named parameters work in .vue template? #184

KyleXie opened this issue Jan 22, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@KyleXie
Copy link

KyleXie commented Jan 22, 2024

Hey,

I just tried something like this:

<EText>{{ $t('email.verify.greeting', { username: 'abc' }) }}</EText>

And the greeting message is something like Hi, {username}, and I expect the result would be Hi, abc, but I can only get Hi, .
It seems the $t with named parameters is not work in vue template?

@Flowko
Copy link
Member

Flowko commented Jan 22, 2024

what library ? nuxt ? or compiler ?

@KyleXie
Copy link
Author

KyleXie commented Jan 22, 2024

what library ? nuxt ? or compiler ?

Hey @Flowko, thanks for your reply. I tried both nuxt and compiler, and the results are the same.

And I also tried the same message outside of vue template:

const t = await useTranslation(event);
console.log(t('email.verify.greeting', { username: 'abc' }));

It works fine in this way.

@Flowko
Copy link
Member

Flowko commented Jan 22, 2024

okay thanks, will take a look

@Flowko Flowko added the bug Something isn't working label Jan 22, 2024
@Flowko Flowko self-assigned this Jan 22, 2024
@Flowko Flowko transferred this issue from vue-email/vue-email Jan 30, 2024
@Flowko
Copy link
Member

Flowko commented Feb 7, 2024

yeah, this seems to be an issue from the i18n library, as it doesnt work with the way the compiler works, will open an issue on their repo and see how to resolve this!

@Flowko Flowko transferred this issue from another repository Jun 5, 2024
@Flowko Flowko mentioned this issue Jun 5, 2024
25 tasks
@Flowko
Copy link
Member

Flowko commented Jun 22, 2024

we just merged a new project rewrite, please do check the docs and the updated logic https://vuemail.net/

@Flowko Flowko closed this as completed Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants