Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tasty-plants-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/cli": patch
---

[FIXED] Added back missing i18next infrastructure file to fix CLI error.
18 changes: 18 additions & 0 deletions packages/cli/src/infrastructures/i18next.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import path from "path";
import i18next from "i18next";
import Backend from "i18next-fs-backend";
import getLocale from "os-locale";

export const setupI18Next = async (): Promise<void> => {
await i18next.use(Backend).init({
backend: {
loadPath: path.resolve(__dirname, "../../locales/{{lng}}/{{ns}}.json"),
},
fallbackLng: "en-US",
interpolation: {
// Escaping is only required to prevent XSS attacks in the front-end
escapeValue: false,
},
lng: await getLocale(),
});
};
Loading