Skip to content

fix(i18n): lock Video3D review to the real UI language key - #203

Merged
IAnMove merged 2 commits into
developmentfrom
fix/video3d-review-i18n
Sep 6, 2026
Merged

fix(i18n): lock Video3D review to the real UI language key#203
IAnMove merged 2 commits into
developmentfrom
fix/video3d-review-i18n

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Video3D review export failed on this machine because Playwright looked for `Scene name` / `Export MP4` while `detectUiLanguage()` followed Spanish `navigator.language`. The renderer also wrote `i18nextLng`, which the app ignores.
  • Lock `hocuspocus-ui-language`, use `animatorLabels()` from the en/es catalogs, and translate the leftover English model-ready status in SceneAnimatorPanel.

Test plan

  • `ui/tests/sceneAnimatorI18n.test.tsx` and `i18nFoundation.test.tsx` (17). Catalog check ok.
  • Does not restart LAN demo servers. Does not rerun GPU or the full Playwright suite locally.

Base: `origin/development` `ac0a2e5f`.


Note

Low Risk
Changes are limited to i18n strings, Playwright/render harness setup, and test tooling; no auth, API, or production runtime behavior beyond user-visible status text.

Overview
Playwright and the scene-template review renderer were failing when the browser locale was Spanish because tests looked for hardcoded English labels like Scene name / Export MP4, while detectUiLanguage() ignores i18nextLng and can follow navigator.language.

This PR adds lockUiLanguage to set hocuspocus-ui-language (and the welcome flag) before navigation, wires it into gotoApp, review E2E setup, and render.mjs (with locale: 'en-US'). Automation now targets copy from animatorLabels('en') instead of literal strings.

SceneAnimatorPanel routes the last two English-only model status messages through animator.modelsReady / animator.modelsTimeout in the en/es catalogs. sceneAnimatorI18n.test.tsx guards language detection, catalog labels, panel strings, and the renderer script.

Reviewed by Cursor Bugbot for commit 0a0b95e. Configure here.

The compositor follows hocuspocus-ui-language and the browser locale.
The review renderer wrote i18nextLng and clicked English labels, so a
Spanish host never found Scene name or Export MP4. Use the catalog copy,
pin the real key, and translate the leftover English model-ready status.
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_93738b37-e416-4c63-b675-4b35349a323c)

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 11 file(s); +117/-15; React UI

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • added: ui/e2e/helpers/lockUiLanguage.ts, ui/src/i18n/animatorLabels.ts, ui/src/i18n/storageKey.ts, ui/tests/sceneAnimatorI18n.test.tsx
  • modified: ui/e2e/helpers/gotoApp.ts, ui/e2e/specs/scene-template-review.spec.ts, ui/scripts/sceneTemplateReview/render.mjs, ui/src/components/Sidebar/SceneAnimatorPanel.tsx, ui/src/i18n/language.ts, ui/src/i18n/locales/en/scene3d.json, ui/src/i18n/locales/es/scene3d.json

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Code health

Quality score: 53.0/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 53.7 +0.0
File concentration 25% 59.6 +0.0
Oversized-file debt 20% 34.9 +0.0
Modularity 10% 69.7 +0.2

Change vs PR base: +0.0 points.

Metric Value
Production LOC 257,753
Production files 630
Test LOC 88,948
Functions measured 16,412
Functions complexity ≥ 15 818
Maximum complexity 670
Policy code-health-policy-v1
HEAD e9673eb2181d285a00d2d30f8694c346b032fa0c
Base ac0a2e5fc04613506d11bf3053588df6ae4a846b
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
670 app/wgp.py:7164 generate_video
376 ui/src/stores/useStore.ts:4029 Async method 'startGeneration'
355 app/_launch_runtime.py:23505 _run_generation
308 app/wgp.py:12298 generate_video_tab
275 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:475 Function 'SceneAnimatorPanel'
271 ui/src/stores/useStore.ts:8572 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
244 ui/src/features/agent/agentActions.ts:1145 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2892 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +10
Test LOC +80
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +10

Ratchet passed.

Playwright's ESM loader rejects catalog JSON without an import attribute,
so the e2e helper now reads LANGUAGE_STORAGE_KEY from a tiny module.
The renderer still uses animatorLabels via tsx.
@IAnMove
IAnMove merged commit dad1b0b into development Sep 6, 2026
10 checks passed
IAnMove added a commit that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant