Skip to content

Commit

Permalink
add ide extension
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsJacobsen committed Dec 13, 2023
1 parent 74833e3 commit ae11b31
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"stylelint.vscode-stylelint",
"unifiedjs.vscode-mdx",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig"
"editorconfig.editorconfig",
"inlang.vs-code-extension"
]
}
}
9 changes: 9 additions & 0 deletions TRANSLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ It's important to mention that we use nested translation keys within the Locale
}
```

### Translations in the IDE-extension

For extracting, accessing, translating or updating Translations in the IDE you can use [IDE Extension for i18n](https://inlang.com/m/r7kp499g/app-inlang-ideExtension).

- [Extract Translations](https://inlang.com/m/r7kp499g/app-inlang-ideExtension#extract-messages-translations)
- [Inline Annotations](https://inlang.com/m/r7kp499g/app-inlang-ideExtension#inline-annotations)
- [Update Translations](https://inlang.com/m/r7kp499g/app-inlang-ideExtension#update-translations)


### Translations and Unit Testing

Translation Keys should not be translated during Unit Testing. If your Component uses, for example `usTranslations`, you should provide the `<NextIntlProvider>` surrounding your `testing-library` render logic, or you can create a wrapper for your test. Note that you should not import the English messages to your Unit Test as:
Expand Down
19 changes: 19 additions & 0 deletions project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": [
"en", "de"
],
"modules": [
"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-missing-translation@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/plugin-json@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-t-function-matcher@latest/dist/index.js"
],
"plugin.inlang.json": {
"pathPattern": "./i18n/locales/{languageTag}.json"
}
}

0 comments on commit ae11b31

Please sign in to comment.