mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
Switch i18next-parser to i18next-cli.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
import type {UserConfig} from "i18next-parser";
|
|
||||||
|
|
||||||
const config: UserConfig = {
|
|
||||||
createOldCatalogs: false,
|
|
||||||
defaultValue: (locale, namespace, key, value) =>
|
|
||||||
locale === "en" ? key! : value!,
|
|
||||||
indentation: "\t" as unknown as number,
|
|
||||||
input: ["app/**/*.ts"],
|
|
||||||
keySeparator: false,
|
|
||||||
lexers: {
|
|
||||||
ts: [{lexer: "JavascriptLexer", functions: ["t.__", "t.__mf"]}],
|
|
||||||
},
|
|
||||||
locales: ["en"],
|
|
||||||
namespaceSeparator: false,
|
|
||||||
output: "public/translations/$LOCALE.json",
|
|
||||||
sort: (a, b) => (a < b ? -1 : a > b ? 1 : 0),
|
|
||||||
};
|
|
||||||
export default config;
|
|
14
i18next.config.ts
Normal file
14
i18next.config.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import {defineConfig} from "i18next-cli";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
locales: ["en"],
|
||||||
|
extract: {
|
||||||
|
input: ["app/**/*.ts"],
|
||||||
|
output: "public/translations/{{language}}.json",
|
||||||
|
functions: ["t.__", "t.__mf"],
|
||||||
|
keySeparator: false,
|
||||||
|
nsSeparator: false,
|
||||||
|
sort: (a, b) => (a.key < b.key ? -1 : a.key > b.key ? 1 : 0),
|
||||||
|
indentation: "\t",
|
||||||
|
},
|
||||||
|
});
|
2727
package-lock.json
generated
2727
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -178,7 +178,7 @@
|
|||||||
"eslint-import-resolver-typescript": "^4.4.4",
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
"htmlhint": "^1.1.2",
|
"htmlhint": "^1.1.2",
|
||||||
"i18n": "^0.15.1",
|
"i18n": "^0.15.1",
|
||||||
"i18next-parser": "^9.3.0",
|
"i18next-cli": "^1.2.1",
|
||||||
"node-json-db": "^1.3.0",
|
"node-json-db": "^1.3.0",
|
||||||
"p-fifo": "^1.0.0",
|
"p-fifo": "^1.0.0",
|
||||||
"playwright-core": "^1.41.0-alpha-jan-9-2024",
|
"playwright-core": "^1.41.0-alpha-jan-9-2024",
|
||||||
|
@@ -14,7 +14,7 @@ Within that Weblate project, if you'd like to focus on Zulip Desktop, look
|
|||||||
at the **Desktop** component. The other components are for the Zulip web/mobile
|
at the **Desktop** component. The other components are for the Zulip web/mobile
|
||||||
app, where translations are also very welcome.
|
app, where translations are also very welcome.
|
||||||
|
|
||||||
(\*) One file is an exception: `en.json` is maintained by `i18next-parser` as a
|
(\*) One file is an exception: `en.json` is maintained by `i18next-cli extract` as a
|
||||||
list of (English) messages in the source code, and is used by Weblate as
|
list of (English) messages in the source code, and is used by Weblate as
|
||||||
a list of strings to be translated. It doesn't contain any
|
a list of strings to be translated. It doesn't contain any
|
||||||
translations.
|
translations.
|
||||||
|
Reference in New Issue
Block a user