lokalise / i18n-ally

🌍 All in one i18n extension for VS Code
https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally
MIT License
4.01k stars 324 forks source link

Support for nuxt - @nuxtjs/i18n - and inside component translations #1070

Open davidparys opened 10 months ago

davidparys commented 10 months ago

Is your feature related to a specific framework or general for this extension Nuxt + nuxt-i18n - SFC

Is your feature request related to a problem? Please describe. It's probably a lack of knowledge from my end but I could not find anything useful in the documentation.

Describe the solution you'd like

I'd love to keep this format as it is pretty handy to translate things, I usually just have to enter my components and everything is there.

I use

const { t: tl } = useI18n({
  useScope: 'local',
  // my local translations
})
const { t } = useI18n({
  // my global translations
})

Is this doable currently? It seems that out of the box that does not work and the Vscode plugin just crashes does not detect anything. Maybe I am missing something?

Dodje commented 10 months ago

Very wanted feature

lucacicada commented 9 months ago

The following setting does make the extension work when using sfc with the local scope:

// ".vscode/settings.json

"i18n-ally.localesPaths": "locales",
"i18n-ally.enabledFrameworks": ["vue", "vue-sfc"],

Setting 18n-ally.localesPath to a random path and enabling vue-sfc explicitly does the trick.

manuel-84 commented 5 days ago

with typescript files like en-GB.ts it's also not working