Skip to content

Commit a54a073

Browse files
add inlang to make the contribution of translations easier (#4249)
1 parent 1d6a434 commit a54a073

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ Read the [documentation and demos](https://vee-validate.logaretm.com/v4).
164164

165165
You are welcome to contribute to this project, but before you do, please make sure you read the [contribution guide](/CONTRIBUTING.md).
166166

167+
## Translations 🌎🗺
168+
[![translation badge](https://inlang.com/badge?url=github.com/logaretm/vee-validate)](https://inlang.com/editor/github.com/logaretm/vee-validate?ref=badge)
169+
170+
To add translations, you can manually edit the JSON translation files in `packages/i18n/src/locale`, use the [inlang](https://inlang.com/) online editor, or run `pnpm machine-translate` to add missing translations using AI from Inlang.
171+
167172
## Credits
168173

169174
- Inspired by Laravel's [validation syntax](https://laravel.com/docs/5.4/validation)

inlang.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export async function defineConfig(env) {
2+
const { default: pluginJson } = await env.$import(
3+
'https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@2/dist/index.js'
4+
);
5+
6+
const { default: standardLintRules } = await env.$import(
7+
'https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js'
8+
);
9+
10+
return {
11+
referenceLanguage: 'en',
12+
plugins: [pluginJson({
13+
pathPattern: './packages/i18n/src/locale/{language}.json',
14+
variableReferencePattern: ["{", "}"]
15+
}), standardLintRules()]
16+
};
17+
}

0 commit comments

Comments
 (0)