chore: add inlang ide extension for i18n (#9599)

* add: inlang for i18n

* chore: format file

* chore: re-add comments

VSCode removed them for unknown reasons.

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
Samuel Stroschein 2023-06-19 19:15:45 +02:00 committed by GitHub
parent 361108246e
commit dc61640118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 6 deletions

View File

@ -8,6 +8,7 @@
"ban.spellright", // Spell check for docs
"stripe.vscode-stripe", // stripe VSCode extension
"Prisma.prisma", // syntax|format|completion for prisma
"rebornix.project-snippets" // Share useful snippets between collaborators
"rebornix.project-snippets", // Share useful snippets between collaborators
"inlang.vs-code-extension" // improved i18n DX
]
}

27
inlang.config.js Normal file
View File

@ -0,0 +1,27 @@
// see https://inlang.com/
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/npm/@inlang/plugin-standard-lint-rules@3/dist/index.js",
)
return {
referenceLanguage: "en",
plugins: [
i18nextPlugin({
pathPattern: "./apps/web/public/static/locales/{language}/common.json",
}),
standardLintRules({
// deactivating identical pattern because of nested
// resources like "de-DE" and "de-AT" where "de-AT"
// contrains overwrites but the majority are identical patterns.
identicalPattern: "off"
}),
],
}
}