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

Inputs' dynamic attributes are translated in dev and SSR but not in SSG #79

Open
MuhammadM1998 opened this issue Jul 17, 2022 · 1 comment

Comments

@MuhammadM1998
Copy link

I'm using @intlify/nuxt3 to internationalize a website. I build and deployed the site in ssr: true and target: server (default) and hosted it on vercel and It works good in dev, preview and production.

Now I'm trying to build the app with SSG (ssr: true and target: static) using the following steps:

  • Added target: static to the nuxt.config.ts
  • Runned nuxt generate instead of nuxt build

The complete app is translated correctly in dev upon choosing a locale. However, after running nuxt generate and nuxt preview, the app is almost completely translated except of buttons having dynamic placeholder and aria-label atrributes.

my component snippet:

<form>
  <input
    type="number"
    name="flight-no"
    :aria-label="$t('sections.flight_request.form.flight_no')"
    :placeholder="$t('sections.flight_request.form.flight_no')"
  />

  <input
    type="text"
    name="full-name"
    :aria-label="$t('sections.flight_request.form.full_name')"
    :placeholder="$t('sections.flight_request.form.full_name')"
  />
</form>

The project repo on GitHub: https://github.com/MuhammadM1998/EGSA

@max5432112345
Copy link

max5432112345 commented Aug 9, 2022

lucky man, translations in my project not work in ssr, ssg i not try

I use "@nuxtjs/i18n": "npm:@nuxtjs/i18n-edge",

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