vue-email / vue-email

💌 Write email templates with vue
https://vuemail.net
MIT License
744 stars 32 forks source link

i18n interpolation is not working #165

Closed MickL closed 3 months ago

MickL commented 3 months ago

Did someone try out i18n with named interpolation?

Nuxt config:

vueEmail: {
    baseUrl: getUrl(),
    autoImport: true,
    i18n: {
      defaultLocale: 'de',
      translations: {
        de: {
          greeting: 'Hello {name}',
        },
      },
    },
  },

In the template:

<EText>{{ $t('greeting', { name: props.name }) }}</EText>

Renders:

<p>Hello </p>

nuxi info:

- Operating System: Darwin
- Node Version:     v21.2.0
- Nuxt Version:     3.10.3
- CLI Version:      3.10.1
- Nitro Version:    2.8.1
- Package Manager:  bun@1.0.25
- Builder:          -
- User Config:      extends, modules, runtimeConfig, pinia, image, routeRules, i18n, security
- Runtime Modules:  @nuxt/ui@^2.14.1
- Build Modules:    -
@nuxtjs/i18n: 8.1.1
vue-i18n: 9.9.0
Flowko commented 3 months ago

duplicate of https://github.com/vue-email/vue-email/issues/184