mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(i18n): keep English pixel-identical and stored data English
From the English-parity and breakage review against main:
- English wording back to main: "Configured Source", the "SHARED SUBJECT"
fallback, CCTV calibration "RANGE 120m".
- Voice header and CCTV calibration chip/select tweaks for long labels now
apply to non-English only (html:not([lang='en'])); English matches main.
The scene select font change is scoped the same way.
- New scenes and shots store their default title in English ("Scene 3",
"Shot 2") and translate it when shown, so a title captured in one language
does not leak into projects, storage or shared JSON.
- Choosing a language with storage blocked keeps it in ?lang instead of
silently doing nothing.
- One picked import file shows its name again.
- qa-l9-matrix reads the voice state from data-status, not the label.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a28e29e05e
commit
9d01f9bfcd
15 files changed
+118
-54
No files matched your search
@@ -507,9 +507,8 @@ export class SceneDirector {
|
||||
|
||||
const scene = {
|
||||
id: uid('scene'),
|
||||
title:
|
||||
sceneName.trim() ||
|
||||
t('Scene {n}', { n: this._project.scenes.length + 1 }),
|
||||
// i18n-ignore: stored English, like normalizeProject; displaySceneTitle translates it.
|
||||
title: sceneName.trim() || `Scene ${this._project.scenes.length + 1}`,
|
||||
shots: [],
|
||||
};
|
||||
|
||||
@@ -967,9 +966,8 @@ export class SceneDirector {
|
||||
const shot = normalizeShot(
|
||||
{
|
||||
id: uid('shot'),
|
||||
title: t('Shot {n}', {
|
||||
n: scene.shots.length + 1,
|
||||
}),
|
||||
// i18n-ignore: stored English; displayShotTitle translates it when shown.
|
||||
title: `Shot ${scene.shots.length + 1}`,
|
||||
durationSec: DEFAULT_SHOT_DURATION_SEC,
|
||||
holdSec: DEFAULT_HOLD_SEC,
|
||||
camera,
|
||||
|
||||
@@ -1045,8 +1045,10 @@ const BUILTIN_SHOT_TITLES = new Set([
|
||||
*/
|
||||
export function displaySceneTitle(scene) {
|
||||
const builtin = SCENE_RECIPES.find((recipe) => recipe.id === scene?.id);
|
||||
if (!builtin?.title) return scene?.title || '';
|
||||
return scene.title === builtin.title ? t(builtin.title) : scene.title;
|
||||
if (builtin?.title && scene.title === builtin.title) return t(builtin.title);
|
||||
const title = scene?.title || '';
|
||||
const numbered = /^Scene (\d+)$/.exec(title);
|
||||
return numbered ? t('Scene {n}', { n: Number(numbered[1]) }) : title;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user