diff --git a/docs/docs/administration/contributing/index.mdx b/docs/docs/administration/contributing/index.mdx index 1224bae13cc7..5608164ecf4c 100644 --- a/docs/docs/administration/contributing/index.mdx +++ b/docs/docs/administration/contributing/index.mdx @@ -59,3 +59,23 @@ Push the tag: ``` git push origin latest ``` + +## Localization + +The UI is translated with [vue-i18n](https://vue-i18n.intlify.dev/). The English string is the +message key, so templates read `{{ $t("Report incident") }}` or `:label="$t('Search')"` and English +needs no message file: a key without a translation renders as itself. Translations live in +`src/dispatch/static/dispatch/src/locales/.json` as a flat map from the English string to +the translated one. + +- Keys may contain dots and punctuation; `src/i18n/index.js` looks the whole key up before treating + dots as a nested path (Vuetify's own `$vuetify.*` messages still use the nested form). +- Table headers and other strings built in `data()` or plain functions must move to a `computed` + property (Options API) or call `t()` from `useI18n()` (`