Document format for i18n.yaml

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-07-05 14:24:38 +02:00
parent 042fe9130c
commit 516b707514
No known key found for this signature in database
GPG Key ID: D91C3E91E4CAD6F5

View File

@ -140,3 +140,27 @@ If you want to help translating the application to your own language please see
Of course you also could open a pull-request to add the new translations to the `i18n.yaml` file.
Same goes with when you're finding translation errors: Just open an issue and let me know!
The format for the `i18n.yaml` is as follows:
```yaml
reference: # Reference strings (English)
deeplLanguage: en # Source language for DeepL automated translations
languageKey: en # Browser language to use this translation for
translations: {} # Map of translation keys to their translations
translations: # Translations into other languages
de: # Identifier for the language, used as `languageKey`
deeplLanguage: de # Target language for DeepL automated translations
translations: {} # Informal / base translations for the language.
# Missing keys will be loaded from the `reference`
# and therefore get displayed in English. Missing
# keys can be generated through DeepL through the
# translation tool included in `ci/translate` but
# will have low quality as partial sentences or
# even only words lack the context for the
# translation
formalTranslations: {} # Formal translations for the language (these will
# be merged over the `translations` for this language
# so you don't have to copy keys being equal in formal
# and informal translation.)
```