Migrate from i18next-parser to i18next-cli
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
// Copyright 2024, 2025 New Vector Ltd.
|
|
||||||
// Copyright 2023, 2024 The Matrix.org Foundation C.I.C.
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
||||||
// Please see LICENSE files in the repository root for full details.
|
|
||||||
|
|
||||||
import type { UserConfig } from "i18next-parser";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
keySeparator: ".",
|
|
||||||
pluralSeparator: ":",
|
|
||||||
defaultNamespace: "frontend",
|
|
||||||
lexers: {
|
|
||||||
ts: [
|
|
||||||
{
|
|
||||||
lexer: "JavascriptLexer",
|
|
||||||
functions: ["t"],
|
|
||||||
namespaceFunctions: ["useTranslation", "withTranslation"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tsx: [
|
|
||||||
{
|
|
||||||
lexer: "JsxLexer",
|
|
||||||
functions: ["t"],
|
|
||||||
namespaceFunctions: ["useTranslation", "withTranslation"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
locales: ["en"],
|
|
||||||
output: "locales/$LOCALE.json",
|
|
||||||
input: ["src/**/*.{ts,tsx}"],
|
|
||||||
sort: true,
|
|
||||||
} satisfies UserConfig;
|
|
||||||
18
frontend/i18next.config.ts
Normal file
18
frontend/i18next.config.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2025 New Vector Ltd.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
|
import { defineConfig } from "i18next-cli";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
locales: ["en"],
|
||||||
|
extract: {
|
||||||
|
input: "src/**/*.{ts,tsx}",
|
||||||
|
output: "locales/{{language}}.json",
|
||||||
|
defaultNS: false,
|
||||||
|
pluralSeparator: ":",
|
||||||
|
keySeparator: ".",
|
||||||
|
sort: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -287,9 +287,6 @@
|
|||||||
"delete_button_title": "Remove email address",
|
"delete_button_title": "Remove email address",
|
||||||
"email": "Email"
|
"email": "Email"
|
||||||
},
|
},
|
||||||
"user_email_list": {
|
|
||||||
"no_primary_email_alert": "No primary email address"
|
|
||||||
},
|
|
||||||
"user_sessions_overview": {
|
"user_sessions_overview": {
|
||||||
"heading": "Where you're signed in",
|
"heading": "Where you're signed in",
|
||||||
"no_active_sessions": {
|
"no_active_sessions": {
|
||||||
|
|||||||
2373
frontend/package-lock.json
generated
2373
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"generate": "graphql-codegen && i18next",
|
"generate": "graphql-codegen && i18next-cli extract",
|
||||||
"lint": "graphql-codegen && biome check && tsc && i18next --fail-on-warnings --fail-on-update",
|
"lint": "graphql-codegen && biome check && tsc && i18next-cli extract --ci",
|
||||||
"format": "biome format --write",
|
"format": "biome format --write",
|
||||||
"build": "rimraf ./dist/ && vite build",
|
"build": "rimraf ./dist/ && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"coverage": "vitest run --coverage",
|
"coverage": "vitest run --coverage",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"i18n": "i18next",
|
"i18n": "i18next-cli",
|
||||||
"knip": "knip"
|
"knip": "knip"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"browserslist-to-esbuild": "^2.1.1",
|
"browserslist-to-esbuild": "^2.1.1",
|
||||||
"graphql": "^16.11.0",
|
"graphql": "^16.11.0",
|
||||||
"happy-dom": "^20.0.4",
|
"happy-dom": "^20.0.4",
|
||||||
"i18next-parser": "^9.3.0",
|
"i18next-cli": "^1.22.1",
|
||||||
"knip": "^5.66.4",
|
"knip": "^5.66.4",
|
||||||
"msw": "^2.11.6",
|
"msw": "^2.11.6",
|
||||||
"msw-storybook-addon": "^2.0.5",
|
"msw-storybook-addon": "^2.0.5",
|
||||||
|
|||||||
Reference in New Issue
Block a user