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>
46 lines
1 KiB
Vue
46 lines
1 KiB
Vue
<script setup lang="ts">
|
|
/**
|
|
* Status bar along the bottom of the main window. Shows the product name and
|
|
* version, or the last engine error.
|
|
*/
|
|
import { computed } from "vue";
|
|
import { t } from "../i18n";
|
|
import { useAppStore } from "../stores/app";
|
|
|
|
const app = useAppStore();
|
|
|
|
/** Text on the left side of the bar. */
|
|
const label = computed(() => {
|
|
if (app.lastError) {
|
|
return app.lastError.message;
|
|
}
|
|
return app.about ? t("app.statusBar.version", { name: app.about.name, version: app.about.version }) : "";
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<footer
|
|
class="status-bar"
|
|
:class="{ 'status-bar--error': app.lastError }"
|
|
data-test="status-bar"
|
|
>
|
|
<span>{{ label }}</span>
|
|
</footer>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.status-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 24px;
|
|
padding: 0 8px;
|
|
background: var(--lt-statusbar-bg);
|
|
color: var(--lt-statusbar-fg);
|
|
border-top: 1px solid var(--lt-border);
|
|
font-size: var(--lt-font-size-small);
|
|
}
|
|
|
|
.status-bar--error {
|
|
color: var(--lt-error);
|
|
}
|
|
</style>
|