Files
gods-eye-view/src/scenes/bootstrapTitleProvenance.test.mjs
T
German KhokhlovandClaude Opus 5.5 f8e96e1484 i18n(it): address code review findings
Localize a bootstrap shot title without a source pack only when the
Nepal pack marker binds that title to the shot's id, so an operator
shot renamed to a bootstrap title in the built-in scene stays as typed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 14:54:44 +04:00

21 lines
793 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { SCENE_RECIPES, displayShotTitle } from './recipes.js';
import { setLocale } from '../i18n/index.js';
test('an operator-typed title in the built-in Nepal scene stays as typed', () => {
const scene = SCENE_RECIPES.find((r) => r.id === 'bhote-koshi-nepal-scene');
assert.ok(scene, 'built-in bootstrap scene exists');
for (const locale of ['ru', 'es', 'it', 'zh-CN', 'zh-Hant']) {
setLocale(locale);
const title = 'Global Incident Context';
// A shot captured by the operator: no sourcePackId, renamed to this title.
const shown = displayShotTitle(
title,
{ id: 'shot-user', title },
{ id: scene.id },
);
assert.equal(shown, title, `${locale}: got ${shown}`);
}
});