i18n: translate the application views with t() as they render

Every data-i18n, data-i18n-title, data-i18n-aria-label and
data-i18n-placeholder marker in the Vue templates becomes a t() call with
the key the boot pass used to look up, contexts included. The three labels
the shell rewrote at boot (Visual Presets, Location and the standby
description) render through t() too, and that rewrite is gone. With the
locale in vue-i18n, view text now follows a locale change, and markup
under v-if or v-for no longer comes back in English when it re-renders.

Rendered text and attributes are unchanged in every locale. The boot pass
still translates static page markup such as the loading screen and a host's
own markup, and npm run i18n rejects data-i18n* in a Vue template.
This commit is contained in:
Sameh Khamis committed 2026-11-01 15:38:23 -08:00
1 parent 2c72a038d5
commit ba20bc13d8
33 files changed
+377 -344

No files matched your search

+6
View File
@@ -1,3 +1,9 @@
- The application views translate their text with `t()` as they render,
so it follows the active locale; they no longer carry `data-i18n*`
attributes, and `npm run i18n` rejects those in a Vue template. The boot
pass (`applyDocumentTranslations`) still translates static page markup
such as the loading screen and a host's own markup (samehkhamis, #0000).
- The page's locale lives in a vue-i18n instance installed in every
application view, and `t()`, `tn()` and the Intl formatters read it from
there, so a view that translates while rendering renders again when the