Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
test: add Korean locale fixture evidence and document ko
uygnoey2a6498155ff9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1b841d01..8801410d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,7 +6,11 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo> Development identity: `v2.17.0-dev.1`. Not a stable release.+### Added+- **Korean Viewer locale (`ko`) (#458).** All five renderers accept the optional `meta.locale` value `ko` alongside `en` and `zh-CN`, localizing renderer-owned Viewer UI, accessibility copy, default legends, document titles, and language metadata without translating authored content. Hangul in the monospace Viewer stack uses bundled D2Coding after JetBrains Mono; the editorial preset’s serif headings use Pretendard SemiBold ahead of the existing CJK serif fallback. Omitted locale remains backward-compatible English. Unsupported locale values still fail schema validation.+### Fixed+- **Compare nested `srcdoc` trim.** Architecture-delta HTML no longer strips trailing whitespace inside the two nested viewer documents embedded in `<iframe srcdoc>`. The previous whole-document trim could corrupt verbatim nested payloads (exposed here by Pretendard’s OFL text).- **Architecture Delta baseline arrowheads (#433).** Removed and rerouted baseline relationships retain their marker definitions in the composed Delta SVG, preserving their authored direction alongside current relationships.- **Compare rollback recovery (#438).** If restoring a previous output fails, compare preserves its recovery directory and reports backup-to-target paths instead of deleting the remaining backups during cleanup.- **固定提交的来源校验 (#420)。** 校验忽略本地 Git replacement refs,始终读取指定提交的原始对象,避免替换后的文件或行范围造成误接受或误拒绝;保留原有来源链接、诊断与用户 Git 配置。diff --git a/README.md b/README.mdindex b1ef38e4..8beefb30 100644--- a/README.md+++ b/README.md@@ -234,7 +234,7 @@ Settings:}```-`meta.locale=en|zh-CN` localizes page title, Legend, states/errors, a11y, HTML/SVG `lang`—never authored content. Otherwise omit; preserve requested-language copy; disclose English fallback. Static omits `animation`; `classic` defaults.+`meta.locale=en|zh-CN|ko` localizes page title, Legend, states/errors, a11y, HTML/SVG `lang`—never authored content. Otherwise omit; preserve requested-language copy; disclose English fallback. Static omits `animation`; `classic` defaults.## Explore and share the outputdiff --git a/README_EN.md b/README_EN.mdindex b1ef38e4..8beefb30 100644--- a/README_EN.md+++ b/README_EN.md@@ -234,7 +234,7 @@ Settings:}```-`meta.locale=en|zh-CN` localizes page title, Legend, states/errors, a11y, HTML/SVG `lang`—never authored content. Otherwise omit; preserve requested-language copy; disclose English fallback. Static omits `animation`; `classic` defaults.+`meta.locale=en|zh-CN|ko` localizes page title, Legend, states/errors, a11y, HTML/SVG `lang`—never authored content. Otherwise omit; preserve requested-language copy; disclose English fallback. Static omits `animation`; `classic` defaults.## Explore and share the outputdiff --git a/README_ZH.md b/README_ZH.mdindex a99570a9..f963684b 100644--- a/README_ZH.md+++ b/README_ZH.md@@ -230,7 +230,7 @@ node bin/archify.mjs deliver workflow examples/agent-tool-call.workflow.json /tm}```-不设置 `animation` 时结果完全静态;`classic` 始终是默认视觉预设。设计评审、发布说明和技术文档可以显式选择 `editorial`,获得暖纸张与深墨色的编辑风格,同时保持几何完全不变。将 `meta.locale` 设为 `en` 或 `zh-CN`,可选择 `<html lang>`、默认图例、无障碍文案和所有固定 Viewer UI。作者编写的标题、节点、关系、章节和卡片不会被机器翻译。未带该字段的旧文件仍然有效,并默认使用英文。对于其他任何创作语言,应省略 `meta.locale`、保持 authored content 使用用户要求的语言,并主动告知用户固定 Viewer UI 与 `<html lang>` 回退为英文,因此该成品不属于完整本地化。+不设置 `animation` 时结果完全静态;`classic` 始终是默认视觉预设。设计评审、发布说明和技术文档可以显式选择 `editorial`,获得暖纸张与深墨色的编辑风格,同时保持几何完全不变。将 `meta.locale` 设为 `en`、`zh-CN` 或 `ko`,可选择 `<html lang>`、默认图例、无障碍文案和所有固定 Viewer UI。作者编写的标题、节点、关系、章节和卡片不会被机器翻译。未带该字段的旧文件仍然有效,并默认使用英文。对于其他任何创作语言,应省略 `meta.locale`、保持 authored content 使用用户要求的语言,并主动告知用户固定 Viewer UI 与 `<html lang>` 回退为英文,因此该成品不属于完整本地化。## 探索与分享diff --git a/archify.zip b/archify.zipindex 9421c9c1..055573cb 100644Binary files a/archify.zip and b/archify.zip differdiff --git a/archify/schemas/README.md b/archify/schemas/README.mdindex 4a43011c..a9f9f40e 100644--- a/archify/schemas/README.md+++ b/archify/schemas/README.md@@ -21,7 +21,7 @@ level, so unknown fields are rejected rather than silently ignored.Every `meta` object also accepts `animation: "trace"` for opt-in SVG/CSS motionin generated HTML. Omit it, or set `"none"`, for the default static output.-It also accepts `locale: "en" | "zh-CN"`. The field selects the fixed Viewer+It also accepts `locale: "en" | "zh-CN" | "ko"`. The field selects the fixed ViewerUI, renderer-owned default legend and accessibility copy, document-titlesuffix, and `<html lang>` value; it does not translate authored strings.Omitting it preserves legacy behavior and resolves to English. Unsupported@@ -138,7 +138,7 @@ The five diagram schemas reference `common.schema.json#/$defs/...`:- `point` — an `[x, y]` pair of numbers (used by `via` and `labelAt`)- `componentType` — `frontend`, `backend`, `database`, `cloud`, `security`,`messagebus`, `external`-- `locale` — the bounded renderer locale, `en` or `zh-CN`+- `locale` — the bounded renderer locale, `en`, `zh-CN`, or `ko`- `brandMark` — one optional built-in brand ID or explicit HTTP(S) site URL- `variant` — `default`, `emphasis`, `security`, `dashed` (sequence messagesextend this list locally with `return`)diff --git a/archify/test/fixtures/korean-locale.architecture.json b/archify/test/fixtures/korean-locale.architecture.jsonnew file mode 100644index 00000000..940fe04f--- /dev/null+++ b/archify/test/fixtures/korean-locale.architecture.json@@ -0,0 +1,48 @@+{+ "schema_version": 1,+ "diagram_type": "architecture",+ "meta": {+ "title": "한국어 웹앱",+ "subtitle": "로케일 검증용 고정 입력",+ "locale": "ko",+ "output": "korean-locale-rendered.html",+ "quality_profile": "showcase",+ "views": [+ { "id": "request-path", "label": "기본 요청 경로", "focus": ["users", "cdn", "lb", "api", "db"], "note": "가장자리에서 저장소까지 고객 요청을 따라갑니다." },+ { "id": "identity-and-cache", "label": "인증과 캐시", "focus": ["auth", "api", "cache"], "note": "인증과 읽기 캐시를 요청 경로 옆에 분리합니다." },+ { "id": "async-work", "label": "정적·비동기 작업", "focus": ["cdn", "s3", "api", "queue", "worker"], "note": "부가 경로 두 개를 본 요청과 겹치지 않게 보여 줍니다." }+ ]+ },+ "components": [+ { "id": "users", "type": "external", "label": "사용자", "sublabel": "브라우저 / 모바일", "pos": [40, 300], "size": [120, 60] },+ { "id": "auth", "type": "security", "label": "인증 공급자", "sublabel": "OAuth 2.0", "pos": [40, 110], "size": [120, 64], "tag": "JWT + PKCE" },+ { "id": "cdn", "type": "cloud", "label": "CloudFront", "sublabel": "CDN", "pos": [250, 300], "size": [130, 60] },+ { "id": "lb", "type": "cloud", "label": "로드 밸런서", "sublabel": "HTTPS :443", "pos": [460, 300], "size": [130, 60] },+ { "id": "api", "type": "backend", "label": "API 서버", "sublabel": "FastAPI :8000", "pos": [670, 300], "size": [130, 60] },+ { "id": "cache", "type": "database", "label": "Redis", "sublabel": "cache :6379", "pos": [670, 150], "size": [130, 60] },+ { "id": "db", "type": "database", "label": "PostgreSQL", "sublabel": "primary :5432", "pos": [880, 300], "size": [130, 60] },+ { "id": "s3", "type": "cloud", "label": "S3", "sublabel": "정적 자산", "pos": [250, 440], "size": [130, 60], "tag": "OAI protected" },+ { "id": "queue", "type": "messagebus", "label": "SQS", "sublabel": "작업 큐", "pos": [670, 440], "size": [130, 60] },+ { "id": "worker", "type": "backend", "label": "워커", "sublabel": "비동기 작업", "pos": [880, 440], "size": [130, 60] }+ ],+ "boundaries": [+ { "kind": "region", "label": "AWS 리전: us-west-2", "wraps": ["cdn", "lb", "api", "cache", "db", "s3", "queue", "worker"] },+ { "kind": "security-group", "label": "sg-api :443/:8000", "wraps": ["lb", "api"] }+ ],+ "connections": [+ { "id": "users-to-cdn", "from": "users", "to": "cdn", "label": "HTTPS", "variant": "emphasis" },+ { "id": "jwt-verification", "from": "auth", "to": "api", "label": "JWT 검증", "variant": "security", "fromSide": "right", "toSide": "top", "via": [[620, 142], [620, 246], [735, 246]] },+ { "id": "cdn-to-lb", "from": "cdn", "to": "lb" },+ { "id": "static-assets", "from": "cdn", "to": "s3", "label": "정적", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 58 },+ { "id": "lb-to-api", "from": "lb", "to": "api" },+ { "id": "cache-read-through", "from": "api", "to": "cache", "label": "read-through", "fromSide": "top", "toSide": "bottom", "labelDy": -68 },+ { "id": "api-sql", "from": "api", "to": "db", "label": "SQL" },+ { "id": "enqueue-job", "from": "api", "to": "queue", "label": "enqueue", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 58 },+ { "id": "queue-to-worker", "from": "queue", "to": "worker" }+ ],+ "cards": [+ { "dot": "cyan", "title": "가장자리", "items": ["CloudFront CDN이 트래픽을 받습니다", "S3가 OAI로 정적 자산을 제공합니다"] },+ { "dot": "emerald", "title": "애플리케이션", "items": ["HTTPS 로드 밸런서 뒤의 FastAPI", "Redis 읽기 캐시", "SQS에서 워커가 비동기 작업을 처리"] },+ { "dot": "rose", "title": "보안", "items": ["OAuth 2.0 with JWT + PKCE", "API와 LB를 보안 그룹으로 격리"] }+ ]+}diff --git a/archify/test/i18n.test.mjs b/archify/test/i18n.test.mjsindex 1197d502..f396b498 100644--- a/archify/test/i18n.test.mjs+++ b/archify/test/i18n.test.mjs@@ -1,6 +1,7 @@import { test } from 'node:test';import assert from 'node:assert/strict';import { spawnSync } from 'node:child_process';+import { createHash } from 'node:crypto';import fs from 'node:fs';import os from 'node:os';import path from 'node:path';@@ -56,7 +57,9 @@ function authoredExample(type, locale) {authoredIndex += 1;const value = locale === 'zh-CN'? `文案${String(authoredIndex).padStart(2, '0')}`- : `Copy${String(authoredIndex).padStart(2, '0')}`;+ : locale === 'ko'+ ? `문구${String(authoredIndex).padStart(2, '0')}`+ : `Copy${String(authoredIndex).padStart(2, '0')}`;authored.push(value);return value;};@@ -156,11 +159,36 @@ test('zh-CN localizes renderer-owned output across all five modes without transl}});-test('explicit en and zh-CN preserve complete authored field inventories across all five modes', () => {+test('ko localizes renderer-owned output across all five modes without translating authored content', () => {+ assert.deepEqual(SUPPORTED_LOCALES, ['en', 'zh-CN', 'ko']);+ for (const type of Object.keys(EXAMPLES)) {+ const document = example(type);+ const authoredTitle = document.meta.title;+ document.meta.locale = 'ko';+ delete document.meta.subtitle;++ const result = run(type, document);+ assert.equal(result.status, 0, `${type}: ${result.stderr || result.stdout}`);+ assert.match(result.html, /^<!DOCTYPE html>\n<html lang="ko"/);+ assert.match(result.html, /<svg\b[^>]*\blang="ko"/);+ assert.ok(result.html.includes(`<title>${authoredTitle} 다이어그램</title>`), `${type}: authored title changed`);+ assert.ok(result.html.includes(`<h1>${authoredTitle}</h1>`), `${type}: authored heading changed`);+ assert.match(result.html, /<text\b[^>]*>범례<\/text>/);+ assert.match(result.html, /aria-label="[^"]*포커스/);+ assert.match(result.html, new RegExp(`<desc id="archify-diagram-description">Archify로 생성한`));+ assert.match(result.html, /"locale":"ko"/);+ assert.match(result.html, />다이어그램 내보내기</);+ assert.doesNotMatch(result.html, /\{\{i18n:/);+ }+});++test('explicit en, zh-CN, and ko preserve complete authored field inventories across all five modes', () => {for (const type of Object.keys(EXAMPLES)) {const english = authoredExample(type, 'en');const chinese = authoredExample(type, 'zh-CN');+ const korean = authoredExample(type, 'ko');assert.equal(english.authored.length, chinese.authored.length, `${type}: authored shapes differ`);+ assert.equal(english.authored.length, korean.authored.length, `${type}: Korean authored shapes differ`);assert.ok(english.authored.length >= 10, `${type}: authored inventory is unexpectedly small`);if (type === 'dataflow') {assert.ok(@@ -175,7 +203,7 @@ test('explicit en and zh-CN preserve complete authored field inventories across);}- for (const candidate of [english, chinese]) {+ for (const candidate of [english, chinese, korean]) {const locale = candidate.document.meta.locale;const result = run(type, candidate.document);assert.equal(result.status, 0, `${type}/${locale}: ${result.stderr || result.stdout}`);@@ -188,6 +216,9 @@ test('explicit en and zh-CN preserve complete authored field inventories acrossif (locale === 'zh-CN') {assert.ok(result.html.includes(`<title>${candidate.document.meta.title}</title>`), type);assert.match(result.html, />导出图表</);+ } else if (locale === 'ko') {+ assert.ok(result.html.includes(`<title>${candidate.document.meta.title} 다이어그램</title>`), type);+ assert.match(result.html, />다이어그램 내보내기</);} else {assert.ok(result.html.includes(`<title>${candidate.document.meta.title} Diagram</title>`), type);assert.match(result.html, />Export diagram</);@@ -216,6 +247,78 @@ test('omitted locale preserves non-English authored content and the English View}});+function deliverKoreanFixture() {+ const fixture = path.join(skillRoot, 'test/fixtures/korean-locale.architecture.json');+ const source = JSON.parse(fs.readFileSync(fixture, 'utf8'));+ assert.equal(source.meta.locale, 'ko');+ assert.match(source.meta.title, /[가-힣]/);++ const validate = spawnSync(process.execPath, [cli, 'validate', 'architecture', fixture, '--json'], {+ cwd: skillRoot,+ encoding: 'utf8',+ });+ assert.equal(validate.status, 0, validate.stderr || validate.stdout);+ const validation = JSON.parse(validate.stdout);+ assert.equal(validation.ok, true);+ assert.equal(validation.command, 'validate');++ const artifact = path.join(tmp, 'korean-locale-fixture.html');+ const deliver = spawnSync(+ process.execPath,+ [cli, 'deliver', 'architecture', fixture, artifact, '--quality', 'showcase', '--json'],+ { cwd: skillRoot, encoding: 'utf8' },+ );+ assert.equal(deliver.status, 0, deliver.stderr || deliver.stdout);+ const delivery = JSON.parse(deliver.stdout);+ assert.equal(delivery.ok, true);+ assert.equal(delivery.command, 'deliver');+ assert.equal(delivery.type, 'architecture');+ assert.match(delivery.artifact.sha256, /^[a-f0-9]{64}$/);+ assert.equal(delivery.artifact.bytes, fs.statSync(artifact).size);+ assert.equal(delivery.artifact.sha256, createHash('sha256').update(fs.readFileSync(artifact)).digest('hex'));+ return { fixture, artifact, delivery };+}++test('checked-in Korean fixture validates and delivers a ko architecture artifact', () => {+ const { artifact, delivery } = deliverKoreanFixture();+ const html = fs.readFileSync(artifact, 'utf8');+ assert.match(html, /^<!DOCTYPE html>\n<html lang="ko"/);+ assert.match(html, /<svg\b[^>]*\blang="ko"/);+ assert.ok(html.includes('<title>한국어 웹앱 다이어그램</title>'));+ assert.ok(html.includes('<h1>한국어 웹앱</h1>'));+ assert.ok(html.includes('사용자'));+ assert.ok(html.includes('API 서버'));+ assert.match(html, />다이어그램 내보내기</);+ assert.match(html, /<text\b[^>]*>범례<\/text>/);+ assert.match(delivery.artifact.sha256, /^[a-f0-9]{64}$/);+});++test('visual-check binds the delivered Korean fixture to viewport and theme receipts', {+ skip: chromePath ? false : 'Set ARCHIFY_CHROME to collect artifact-bound visual-check evidence for the Korean fixture.',+}, () => {+ const { artifact, delivery } = deliverKoreanFixture();+ const visual = spawnSync(process.execPath, [cli, 'visual-check', artifact, '--json'], {+ cwd: skillRoot,+ encoding: 'utf8',+ env: { ...process.env, ARCHIFY_CHROME: chromePath },+ });+ assert.ok([0, 1].includes(visual.status), visual.stderr || visual.stdout);+ const receipt = JSON.parse(visual.stdout);+ assert.equal(receipt.command, 'visual-check');+ assert.equal(receipt.visualReview, 'pending');+ assert.equal(receipt.chrome.status, 'available');+ assert.equal(receipt.readability.status, 'pass');+ assert.equal(receipt.viewerChrome.status, 'pass');+ assert.equal(receipt.captures.status, 'pass');+ assert.equal(receipt.artifact.sha256, delivery.artifact.sha256);+ assert.equal(receipt.artifact.bytes, delivery.artifact.bytes);+ assert.equal(+ receipt.containment.viewports.every((viewport) => viewport.overflowX === false),+ true,+ 'Korean fixture introduced horizontal overflow',+ );+});+test('unsupported locale values fail schema validation in every mode', () => {for (const locale of ['fr', 'zh-HK']) {for (const type of Object.keys(EXAMPLES)) {@@ -352,6 +455,128 @@ test('real Chrome keeps zh-CN Finder, Route, Export, and accessibility UI locali}});+test('real Chrome keeps ko Finder, Route, Export, and accessibility UI localized in all five modes', {+ skip: chromePath ? false : 'Set ARCHIFY_CHROME to run the real browser localization regression.',+}, async () => {+ const browser = new ChromeVisualBrowser(chromePath);+ try {+ for (const type of Object.keys(EXAMPLES)) {+ const document = example(type);+ document.meta.locale = 'ko';+ document.meta.title = `브라우저 로케일-${type}`;+ const result = run(type, document);+ assert.equal(result.status, 0, `${type}: ${result.stderr || result.stdout}`);++ const sessionId = await loadArtifact(browser, result.output);+ const state = await evaluate(browser, sessionId, `(function () {+ var finderButton = document.getElementById('btn-node-finder');+ var routeButton = document.getElementById('btn-route-probe');+ var exportButton = document.getElementById('btn-export');+ finderButton.click();+ var finder = {+ hidden: document.getElementById('node-finder').hidden,+ title: document.getElementById('node-finder-title').textContent.trim(),+ searchLabel: document.getElementById('node-finder-input').getAttribute('aria-label')+ };+ document.getElementById('node-finder-close').click();+ routeButton.click();+ var route = {+ hidden: document.getElementById('route-probe').hidden,+ title: document.getElementById('route-probe-title').textContent.trim(),+ label: routeButton.getAttribute('aria-label')+ };+ routeButton.click();+ exportButton.click();+ var exportMenu = document.getElementById('export-menu');+ function pseudoContent(selector) {+ var content = getComputedStyle(document.querySelector(selector), '::after').content || '';+ return content.replace(/^["']|["']$/g, '');+ }+ var presetBadges = {};+ ['signal-flow', 'blueprint', 'editorial'].forEach(function (preset) {+ document.documentElement.setAttribute('data-preset', preset);+ presetBadges[preset] = {+ header: pseudoContent('.header-row'),+ plate: pseudoContent('.diagram-container')+ };+ });+ return {+ htmlLang: document.documentElement.lang,+ svgLang: document.querySelector('.diagram-container svg').getAttribute('lang'),+ toolbarLabel: document.querySelector('.diagram-nav').getAttribute('aria-label'),+ finder: finder,+ route: route,+ exportMenuOpen: exportMenu.classList.contains('open'),+ exportLabel: exportButton.getAttribute('aria-label'),+ exportMenuLabel: exportMenu.getAttribute('aria-label'),+ exportMenuText: exportMenu.textContent,+ presetBadges: presetBadges+ };+ })()`);++ assert.equal(state.htmlLang, 'ko', type);+ assert.equal(state.svgLang, 'ko', type);+ assert.equal(state.toolbarLabel, '다이어그램 보기 제어', type);+ assert.deepEqual(state.finder, {+ hidden: false,+ title: '노드 찾기',+ searchLabel: '다이어그램 노드 검색',+ }, type);+ assert.deepEqual(state.route, {+ hidden: false,+ title: '시작 노드 선택',+ label: '추적된 경로 지우기',+ }, type);+ assert.equal(state.exportMenuOpen, true, type);+ assert.equal(state.exportLabel, '다이어그램 내보내기', type);+ assert.equal(state.exportMenuLabel, '내보내기', type);+ assert.match(state.exportMenuText, /공유 카드/, type);+ assert.deepEqual(state.presetBadges, {+ 'signal-flow': { header: '시그널 플로우', plate: 'none' },+ blueprint: { header: '블루프린트 / 개정 01', plate: '' },+ editorial: { header: '에디토리얼 / 현장 노트', plate: 'ARCHIFY / 도판 04' },+ }, type);++ const shareCardFailure = await evaluate(browser, sessionId, `(async function () {+ var originalGetContext = HTMLCanvasElement.prototype.getContext;+ HTMLCanvasElement.prototype.getContext = function () { return null; };+ try {+ await Archify.exportMenu.shareCard();+ return { rejected: false, message: '' };+ } catch (error) {+ return { rejected: true, message: String(error && error.message || error) };+ } finally {+ HTMLCanvasElement.prototype.getContext = originalGetContext;+ }+ })()`, true);+ assert.deepEqual(shareCardFailure, {+ rejected: true,+ message: '공유 카드에 2D 캔버스 컨텍스트를 만들 수 없습니다',+ }, type);++ const visual = spawnSync(process.execPath, [cli, 'visual-check', result.output, '--json'], {+ cwd: skillRoot,+ encoding: 'utf8',+ env: { ...process.env, ARCHIFY_CHROME: chromePath },+ });+ assert.ok([0, 1].includes(visual.status), `${type}: ${visual.stderr || visual.stdout}`);+ const receipt = JSON.parse(visual.stdout);+ assert.equal(receipt.visualReview, 'pending', type);+ assert.equal(receipt.chrome.status, 'available', type);+ assert.equal(receipt.readability.status, 'pass', type);+ assert.equal(receipt.viewerChrome.status, 'pass', type);+ assert.equal(receipt.captures.status, 'pass', type);+ assert.equal(+ receipt.containment.viewports.every((viewport) => viewport.overflowX === false),+ true,+ `${type}: localized Viewer introduced horizontal overflow`,+ );+ }+ } finally {+ await browser.close();+ }+});+test('every Viewer message reference resolves through the shared catalog', () => {const template = fs.readFileSync(templatePath, 'utf8');const keys = new Set(catalogKeys());@@ -397,6 +622,15 @@ test('runtime labels stay localized after composition', () => {'2 nodes · 1 directed hop · shortest authored route',);+ assert.equal(translateMessage('ko', 'viewer.kind.backend'), '백엔드');+ assert.equal(translateMessage('ko', 'viewer.kind.decision'), '판단');+ assert.equal(translateMessage('ko', 'viewer.passport.relationship.connectsFrom'), '연결 출처');+ assert.equal(translateMessage('ko', 'viewer.nav.level.auto'), '자동');+ const koHops = translateCount('ko', 'viewer.route.hop', 2);+ assert.equal(+ translateMessage('ko', 'viewer.finder.result.routeTarget', { label: '도착', links: koHops }),+ '도착을(를) 경로 도착점으로 선택, 홉 2개',+ );});test('Share Card and export failures use catalog messages instead of fixed English', () => {@@ -408,6 +642,14 @@ test('Share Card and export failures use catalog messages instead of fixed EnglitranslateMessage('zh-CN', 'viewer.export.error.toBlobNull', { label: '分享卡片' }),'分享卡片的 canvas.toBlob 未返回数据',);+ assert.equal(+ translateCount('ko', 'viewer.export.card.routeSummary', 2, { source: '출발', target: '도착' }),+ '경로: 출발 → 도착 · 방향성 홉 2개',+ );+ assert.equal(+ translateMessage('ko', 'viewer.export.error.toBlobNull', { label: '공유 카드' }),+ '공유 카드의 canvas.toBlob이 데이터를 반환하지 않았습니다',+ );const template = fs.readFileSync(templatePath, 'utf8');for (const hardcoded of [