From 888323dd2f3776aaec3e1acd7a34aa904b4999e6 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:37:03 +0100 Subject: [PATCH 01/11] Create project.inlang.json --- project.inlang.json | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 project.inlang.json diff --git a/project.inlang.json b/project.inlang.json new file mode 100644 index 0000000000..b0859e85f0 --- /dev/null +++ b/project.inlang.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-empty-pattern@latest/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-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-missing-translation@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" + } + } + } From 5b1f593e3acfea7964ecb9441e1630bcc496199c Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:49:30 +0100 Subject: [PATCH 02/11] Update project.inlang.json --- project.inlang.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.inlang.json b/project.inlang.json index b0859e85f0..297ddddb32 100644 --- a/project.inlang.json +++ b/project.inlang.json @@ -46,10 +46,10 @@ ], "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-identical-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-missing-translation@latest/dist/index.js" + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@latest/dist/index.js" ], "plugin.inlang.i18next":{ "pathPattern":{ From 78d69b44aeb1716d9aae6bd68f0c4422f1b4b3a1 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:05:01 +0100 Subject: [PATCH 03/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccecf3bbc4..b804bdccb9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,5 +149,5 @@ 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` to find missing translations. From 1b72db2978eadedd873b50757ff545a05d970d3e Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:21:06 +0100 Subject: [PATCH 04/11] Delete inlang.config.js --- inlang.config.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 inlang.config.js 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(), - ], - }; -} From 77eed6907a527854c6a35075e36391bbb58c0701 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:41:28 +0100 Subject: [PATCH 05/11] Prettier project.inlang.json --- project.inlang.json | 132 ++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/project.inlang.json b/project.inlang.json index 297ddddb32..2c1e9d9370 100644 --- a/project.inlang.json +++ b/project.inlang.json @@ -1,67 +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" - } - } - } + "$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" + } + } +} From 257bdc345d639d7f36a4cc120beaa712fef22ce9 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:41:57 +0100 Subject: [PATCH 06/11] Prettier CONTRIBUTING.md --- CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b804bdccb9..083264f72f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,5 +149,6 @@ 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/editor/github.com/LAION-AI/Open-Assistant) online editor, -or run `npx @inlang/cli@latest lint` 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` to find missing translations. From 4f09f846a663f83201a849671e09e9ac0e65c5b3 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:07:25 +0100 Subject: [PATCH 07/11] Update CONTRIBUTING.md Pre-commit does not work, try to use a prettier CLI. --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 083264f72f..8081ad3d7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,6 +149,6 @@ 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/editor/github.com/LAION-AI/Open-Assistant) online +`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` to find missing translations. From f84cc34989d8ec91544ece06661dd5d60b5ba0c3 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:14:32 +0100 Subject: [PATCH 08/11] Update project.inlang.json pre-commit command doesn't work, try to run prettier CLI instead --- project.inlang.json | 130 ++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/project.inlang.json b/project.inlang.json index 2c1e9d9370..a4af517f33 100644 --- a/project.inlang.json +++ b/project.inlang.json @@ -1,67 +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" - } - } + "$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" + } + } } From ec3ab2515bb271a9ab275b5e4c8be0c6acb153e9 Mon Sep 17 00:00:00 2001 From: NiklasBuchfink Date: Mon, 4 Dec 2023 12:57:06 +0100 Subject: [PATCH 09/11] migrate settings --- project.inlang.json => project.inlang/settings.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename project.inlang.json => project.inlang/settings.json (100%) diff --git a/project.inlang.json b/project.inlang/settings.json similarity index 100% rename from project.inlang.json rename to project.inlang/settings.json From 479fdef4876f1c83d83c66f767c7af7996c3598a Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Tue, 5 Dec 2023 08:58:45 +0100 Subject: [PATCH 10/11] Update CONTRIBUTING.md update CLI command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8081ad3d7a..9f65e52c24 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -151,4 +151,4 @@ See To add translations, you can manually edit the JSON translation files in `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` to find missing translations. +editor, or run `npx @inlang/cli@latest lint --project ./project.inlang` to find missing translations. From 5867717b6ab3d4daef85f3b6b20e2fe2a063ebd8 Mon Sep 17 00:00:00 2001 From: Niklas Buchfink <59048346+NiklasBuchfink@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:06:56 +0100 Subject: [PATCH 11/11] Prettier CONTRIBUTING.md --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f65e52c24..f02f3fae77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -151,4 +151,5 @@ See To add translations, you can manually edit the JSON translation files in `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. +editor, or run `npx @inlang/cli@latest lint --project ./project.inlang` to find +missing translations.