M1.11: English message catalog for every UI string
ui/src/i18n: en.json (20 flat dotted keys) and t(key, params?) with
{name} interpolation; a missing key warns in dev and returns the key.
All template text, title/aria-label attributes, notices and frontend
error texts go through t. ESLint vue/no-bare-strings-in-template is an
error. Catalog tests: interpolation, missing key, every t() key exists,
no unused keys. Engine messages stay English (G14). Docs updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
851d438e2a
commit
7c0fb312f6
21 changed files with 273 additions and 37 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* placeholder without touching the layout.
|
||||
*/
|
||||
import { ref } from "vue";
|
||||
import { t } from "../../i18n";
|
||||
import ProjectToolWindow from "../project/ProjectToolWindow.vue";
|
||||
import StatusBar from "../StatusBar.vue";
|
||||
import ToolWindow from "./ToolWindow.vue";
|
||||
|
|
@ -23,7 +24,7 @@ const leftOpen = ref(true);
|
|||
<ToolWindow
|
||||
v-model:width="leftWidth"
|
||||
v-model:open="leftOpen"
|
||||
title="Project"
|
||||
:title="t('project.toolWindow.title')"
|
||||
>
|
||||
<ProjectToolWindow />
|
||||
</ToolWindow>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
import { PanelLeftClose, PanelLeftOpen } from "@lucide/vue";
|
||||
import { computed } from "vue";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
/** Props of the tool window. */
|
||||
const props = withDefaults(
|
||||
|
|
@ -105,8 +106,8 @@ function onSplitterKey(event: KeyboardEvent): void {
|
|||
<button
|
||||
type="button"
|
||||
class="tool-window__button"
|
||||
:title="`Hide ${title}`"
|
||||
:aria-label="`Hide ${title}`"
|
||||
:title="t('common.toolWindow.hide', { title })"
|
||||
:aria-label="t('common.toolWindow.hide', { title })"
|
||||
data-test="tool-window-hide"
|
||||
@click="emit('update:open', false)"
|
||||
>
|
||||
|
|
@ -124,7 +125,7 @@ function onSplitterKey(event: KeyboardEvent): void {
|
|||
:aria-valuenow="width"
|
||||
:aria-valuemin="minWidth"
|
||||
:aria-valuemax="maxWidth"
|
||||
:aria-label="`Resize ${title}`"
|
||||
:aria-label="t('common.toolWindow.resize', { title })"
|
||||
data-test="tool-window-splitter"
|
||||
@pointerdown="onSplitterDown"
|
||||
@keydown="onSplitterKey"
|
||||
|
|
@ -138,8 +139,8 @@ function onSplitterKey(event: KeyboardEvent): void {
|
|||
<button
|
||||
type="button"
|
||||
class="tool-window__button"
|
||||
:title="`Show ${title}`"
|
||||
:aria-label="`Show ${title}`"
|
||||
:title="t('common.toolWindow.show', { title })"
|
||||
:aria-label="t('common.toolWindow.show', { title })"
|
||||
data-test="tool-window-show"
|
||||
@click="emit('update:open', true)"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue