Skip to content

Inlify not translating any messages when using @intlify/unplugin-vue-i18n/messages #2254

@rtarling

Description

@rtarling

Reporting a bug?

Since this morning I get this message for every translation:

[intlify] Not found 'login.goodMorning' key in 'en' locale messages.

Expected behavior

Translation worked for years before this morning's npm update...

Reproduction

1/ Setting up the pugin in vite.config.mts

import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";

export default defineConfig({
plugins: [
:
VueI18nPlugin({
include: resolve(
dirname(fileURLToPath(import.meta.url)),
"./src/locales/**"
),
}),
],

2/ I also have i18n.ts file:

import { createI18n } from 'vue-i18n';
import messages from '@intlify/unplugin-vue-i18n/messages'

export const i18n = createI18n({
legacy: false,
globalInjection: true,
locale: "en",
fallbackLocale: "en",
availableLocales: ["en", "de"],
messages: messages,
});

3/ And in main.ts I have:

import { i18n } from "./i18n";

const app = createApp(App).use(pinia).use(i18n).use(IonicVue).use(router);

4/ I also have en.json and de.json in \src\locales

System Info

vite 7.1.4 vue-18n 11.1.11 unplugin-vue-i18n 11.0.0

Screenshot

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions