From d54d1a2825f80a3ec9e39ffac0fc841aa7afd325 Mon Sep 17 00:00:00 2001 From: Nils Jacobsen Date: Mon, 10 Jul 2023 16:06:05 +0200 Subject: [PATCH 1/2] feat: add ide-extension for better i18n handling --- .vscode/extensions.json | 5 +++++ inlang.config.js | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 inlang.config.js diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..116d6852a68 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "inlang.vs-code-extension" + ] +} \ No newline at end of file diff --git a/inlang.config.js b/inlang.config.js new file mode 100644 index 00000000000..43372000610 --- /dev/null +++ b/inlang.config.js @@ -0,0 +1,22 @@ +/** + * @type { import("@inlang/core/config").DefineConfig } + */ +export async function defineConfig(env) { + const { default: i18nextPlugin } = await env.$import( + "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@3.0.1/dist/index.js", + ) + + const { default: standardLintRules } = await env.$import( + "https://cdn.jsdelivr.net/npm/@inlang/plugin-standard-lint-rules@3/dist/index.js", + ) + + return { + referenceLanguage: "en", + plugins: [ + i18nextPlugin({ + pathPattern: "public/locales/{language}/translation.json", + }), + standardLintRules(), + ], + } +} From 1c17761c6ff4fc8daf7cfac5a1395cfc0b5bc3ce Mon Sep 17 00:00:00 2001 From: Nils Jacobsen <58360188+NilsJacobsen@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:14:03 +0200 Subject: [PATCH 2/2] Update inlang.config.js --- inlang.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inlang.config.js b/inlang.config.js index 43372000610..5c3df46d986 100644 --- a/inlang.config.js +++ b/inlang.config.js @@ -3,7 +3,7 @@ */ export async function defineConfig(env) { const { default: i18nextPlugin } = await env.$import( - "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@3.0.1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@3/dist/index.js", ) const { default: standardLintRules } = await env.$import(