From 03d357e21a1dcae59ed575de556f467e729216ed Mon Sep 17 00:00:00 2001 From: jannesblobel <72493222+jannesblobel@users.noreply.github.com> Date: Tue, 19 Sep 2023 17:51:51 +0200 Subject: [PATCH] fix: inlang settings --- inlang.config.js | 28 ---------------------------- project.inlang.json | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 inlang.config.js create mode 100644 project.inlang.json diff --git a/inlang.config.js b/inlang.config.js deleted file mode 100644 index 4c16b62b..00000000 --- a/inlang.config.js +++ /dev/null @@ -1,28 +0,0 @@ -// @ts-check - -/** - * @type { import("@inlang/core/config").DefineConfig } - */ -export async function defineConfig(env) { - const plugin = await env.$import( - "https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@1/dist/index.js" - ); - - const { standardLintRules } = await env.$import( - "https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@1/dist/index.js" - ); - - const pluginConfig = { - pathPattern: "./custom_components/frigate/translations/{language}.json", - }; - - return { - referenceLanguage: "en", - languages: await plugin.getLanguages({ ...env, pluginConfig }), - readResources: (args) => plugin.readResources({ ...args, ...env, pluginConfig }), - writeResources: (args) => plugin.writeResources({ ...args, ...env, pluginConfig }), - lint: { - rules: [standardLintRules()], - }, - }; -} diff --git a/project.inlang.json b/project.inlang.json new file mode 100644 index 00000000..ab59fea2 --- /dev/null +++ b/project.inlang.json @@ -0,0 +1,14 @@ +{ + "$schema":"https://inlang.com/schema/project-settings", + "sourceLanguageTag": "en", + "languageTags": ["de","en","pt_br","pt-BR"], + "modules": [ + "https://cdn.jsdelivr.net/npm/@inlang/plugin-json@4/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@1/dist/index.js" + ], "plugin.inlang.json": { + "pathPattern": "./custom_components/frigate/translations/{languageTag}.json" + } +}