diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccecf3bbc4..f02f3fae77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,5 +149,7 @@ See [![translation badge](https://inlang.com/badge?url=github.com/LAION-AI/Open-Assistant)](https://inlang.com/editor/github.com/LAION-AI/Open-Assistant?ref=badge) To add translations, you can manually edit the JSON translation files in -`website/public/locales`, use the [inlang](https://inlang.com/) online editor, -or run `npm run inlang:lint` inside `website` to find missing translations. +`website/public/locales`, use the +[inlang](https://inlang.com/editor/github.com/LAION-AI/Open-Assistant) online +editor, or run `npx @inlang/cli@latest lint --project ./project.inlang` to find +missing translations. diff --git a/inlang.config.js b/inlang.config.js deleted file mode 100644 index 715a67aca9..0000000000 --- a/inlang.config.js +++ /dev/null @@ -1,18 +0,0 @@ -export async function defineConfig(env) { - const { default: i18nextPlugin } = await env.$import( - "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js" - ); - const { default: standardLintRules } = await env.$import( - "https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js" - ); - - return { - referenceLanguage: "en", - plugins: [ - i18nextPlugin({ - pathPattern: "./website/public/locales/{language}/*.json", - }), - standardLintRules(), - ], - }; -} diff --git a/project.inlang/settings.json b/project.inlang/settings.json new file mode 100644 index 0000000000..a4af517f33 --- /dev/null +++ b/project.inlang/settings.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://inlang.com/schema/project-settings", + "sourceLanguageTag": "en", + "languageTags": [ + "ar", + "bar", + "bg", + "ca", + "cs", + "da", + "de", + "el", + "en", + "eo", + "es", + "eu", + "fa", + "fi", + "fr", + "gl", + "he", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "ms", + "nb-NO", + "nl", + "pl", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sr", + "sv", + "swg", + "th", + "tr", + "uk-UA", + "vi", + "zh" + ], + "modules": [ + "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@latest/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@latest/dist/index.js" + ], + "plugin.inlang.i18next": { + "pathPattern": { + "common": "./website/public/locales/{languageTag}/common.json", + "dashboard": "./website/public/locales/{languageTag}/dashboard.json", + "index": "./website/public/locales/{languageTag}/index.json", + "labelling": "./website/public/locales/{languageTag}/labelling.json", + "leaderboard": "./website/public/locales/{languageTag}/leaderboard.json", + "message": "./website/public/locales/{languageTag}/message.json", + "stats": "./website/public/locales/{languageTag}/stats.json", + "tasks": "./website/public/locales/{languageTag}/tasks.json", + "tos": "./website/public/locales/{languageTag}/tos.json" + } + } +}