Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(i18n): add Japanese as a third UI language (Confirm UI + SVG editor)

Kevin4018fde9a246
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.md
index 3d859fe1..59542b2e 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -363,7 +363,7 @@ Steps:
> ⛔ **Steps 2 → 3 → 4 are ONE uninterrupted run — do NOT yield to the user mid-flow.** When the tier-1 `--wait` (step 2) returns, the AI **immediately and autonomously** continues to step 3 (re-derive + write Tier 2) and step 4 (`--wait-only`) in the **same turn**: do **not** summarize, ask a question, report progress, or end the turn in between. The browser is sitting on a "deriving…" spinner polling for the Tier 2 you must write next — stopping here strands the page and the user must prod you in chat to finish (a bug, not the intended flow). **The tier-1 confirmation is an intermediate machine handoff, not a stopping point.** The single ⛔ BLOCKING wait is the **final** confirmation at the end of step 4. (Chat-fallback path — only when the page never opened — is the exception: there you do present each tier in chat and wait for a reply.)
-1. **Write Tier 1** to `<project_path>/confirm_ui/recommendations.json` with `"tier": 1` and only the anchor fields. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language; visible text matches `lang`, or provide bilingual `name_zh` / `name_en` + `note_zh` / `note_en`.
+1. **Write Tier 1** to `<project_path>/confirm_ui/recommendations.json` with `"tier": 1` and only the anchor fields. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual `name_zh` / `name_en` / `name_ja` + `note_zh` / `note_en` / `note_ja` — when the user's language is Japanese, set `lang: "ja"` and always include the `_ja` variants (labels resolve in the page language first — a `ja` page falls back ja → en → zh, so missing `_ja` labels silently render in English; zh/en pages keep their zh↔en fallback and only try `_ja` last).
2. **Launch + wait for Tier 1.** Background launch; the parent returns when the page writes the tier-1 `result.json`. **Long tool timeout — 600000 ms** (the `--wait` ≈590 s budget):
```bash
python3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon --wait
diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.md
index e527bb0b..8b8161a1 100644
--- a/skills/ppt-master/references/strategist.md
+++ b/skills/ppt-master/references/strategist.md
@@ -89,7 +89,7 @@ The deck's **visual aesthetic** — shape language, decoration density, whitespa
**Source**:
- User named a style (chat / template / beautify) → it is truth: map to the closest preset (or `custom` with a `visual_style_behavior` paragraph) and lock directly. **Skip the spectrum below** — do not re-offer choice they already made.
-- No user description → **present a personality spectrum, not one safe pick** (this is the lever against "every deck looks the same" — the visual style is what most determines a deck's character, so it gets real choice, same hard rule and thinking as h.5). Author **≥3 distinct styles** from the index's auto-selection table spanning *safe* (the industry-norm recommendation) → *shifted* (an alternate one tick more expressive) → *bold* (a characterful style that challenges the default — `brutalist` / `zine` / `memphis` / `ink-wash` / `vintage-poster` etc., whenever the content can carry it). Give each a one-line **temperament tag + real-world analogy** (like h.5's "like an Economist feature"). Write the three to `recommendations.json` `visual_style_spectrum` (each `{id, tag_zh/en, note_zh/en}`) **and present the same three in chat** as the always-valid fallback; set `recommend.visual_style` to the *safe* pick as the pre-selected default. The user may pick any of the three, a style outside them, or Custom. Honest-shortfall exception (mirrors h.5): if the content genuinely supports fewer than 3 non-gimmicky directions, present the smaller set and say why — never pad with a style that fights the content.
+- No user description → **present a personality spectrum, not one safe pick** (this is the lever against "every deck looks the same" — the visual style is what most determines a deck's character, so it gets real choice, same hard rule and thinking as h.5). Author **≥3 distinct styles** from the index's auto-selection table spanning *safe* (the industry-norm recommendation) → *shifted* (an alternate one tick more expressive) → *bold* (a characterful style that challenges the default — `brutalist` / `zine` / `memphis` / `ink-wash` / `vintage-poster` etc., whenever the content can carry it). Give each a one-line **temperament tag + real-world analogy** (like h.5's "like an Economist feature"). Write the three to `recommendations.json` `visual_style_spectrum` (each `{id, tag_zh/en/ja, note_zh/en/ja}` — include the `_ja` variants whenever the page `lang` is `ja`) **and present the same three in chat** as the always-valid fallback; set `recommend.visual_style` to the *safe* pick as the pre-selected default. The user may pick any of the three, a style outside them, or Custom. Honest-shortfall exception (mirrors h.5): if the content genuinely supports fewer than 3 non-gimmicky directions, present the smaller set and say why — never pad with a style that fights the content.
**Forbidden — a non-catalog name as `visual_style`**: the value MUST be an `id` from the visual-styles catalog (or genuine `custom` prose). A name that is **not** in that catalog is not a visual style — most often it is an image-rendering name from the `_index` "Paired rendering" column (`flat`, `vector-illustration`, `digital-dashboard`, `3d-isometric`, `corporate-photo`, …), which names the §h *illustration* family, not the deck's layout aesthetic. Do not borrow it. (Names that are intentionally **both** a style and its paired rendering — `glassmorphism`, `blueprint`, `editorial`, `dark-tech` — are valid styles because they *are* in the catalog.) Generic baseline words — `flat` / flat-design / 扁平 / modern / clean / simple / minimal — are **not** custom-worthy either: the whole system is flat by default (shadows discouraged), so map them to the closest preset (flat + grid → `swiss-minimal`; flat + rounded → `soft-rounded`; flat + dense → `brutalist`). Reserve `custom` for an aesthetic no preset covers.
diff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.js
index 7183ff7f..327f4c74 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/app.js
+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js
@@ -95,6 +95,91 @@
option_prefix: "Option",
error_retry: "Error - retry"
},
+ ja: {
+ page_title: "PPT Master - デザイン確認",
+ topbar_hint: "各項目を選択または入力して「確定」を押してください。ページが閉じたらチャットに戻ります。",
+ loading: "読み込み中…",
+ load_error: "recommendations.json を読み込めませんでした。起動前にAIが書き込む必要があります。",
+ btn_confirm: "確定",
+ btn_next: "次へ →",
+ deriving: "選択内容をもとに後続の選択肢を生成しています…",
+ already_confirmed: "すでに一度確定済みです。再送信すると前回の選択を上書きします。",
+ confirmed_title: "✓ 確定しました",
+ confirmed_hint: "選択内容を保存しました。このページを閉じてチャットに戻ってください。",
+ lang_toggle_title: "言語を切り替え",
+ sec_canvas: "キャンバス形式",
+ sec_pages: "ページ数",
+ sec_audience: "想定読者",
+ sec_style: "スタイルの狙い",
+ sec_color: "配色",
+ sec_icons: "アイコンの使用",
+ sec_type: "タイポグラフィ",
+ sec_images: "画像の使用",
+ sec_mode: "生成モード",
+ sec_refine: "先に設計仕様を精査",
+ sub_mode: "ナラティブモード",
+ sub_visual: "ビジュアルスタイル",
+ sub_divergence: "素材からの発散度(どこまで自由に再構成するか、原文に忠実か)",
+ placeholder_divergence: "自分の言葉でどうぞ — 例:「文書に忠実に」「元素材の範囲内で自由に再構成・展開」。空欄ならバランス型になります。",
+ custom: "カスタム",
+ custom_placeholder: "自由に入力…",
+ recommended: "おすすめ",
+ placeholder_audience: "この資料は誰に向けたもの?",
+ placeholder_pages: "例:12-15",
+ hex_override: "カスタムHEXで上書き:",
+ formula_policy: "数式レンダリング方針",
+ image_ai_path: "AI画像の生成元",
+ image_strategy: "生成画像のスタイル",
+ image_strategy_empty: "生成画像スタイルの候補がまだありません。",
+ image_strategy_rendering: "レンダリング",
+ image_strategy_palette: "パレット",
+ image_strategy_visual: "ビジュアル",
+ image_strategy_color: "カラー",
+ image_strategy_mood: "ムード",
+ image_usage_notes: "画像に関する補足要件",
+ image_usage_notes_placeholder: "例:リアルな手洗いシーンを優先、漫画調の菌のイラストは避ける、製品写真はそのまま使う。",
+ image_usage_required: "画像の使用方法を少なくとも1つ選択してください。",
+ image_usage_none_exclusive: "「画像なし」は他の画像オプションと同時に選択できません。",
+ font_heading: "見出し",
+ font_body: "本文",
+ font_body_size: "本文の基準サイズ",
+ font_body_size_hint: "すべての文字サイズはこの本文基準から導出されます。",
+ body_size_hint_canvas: "このキャンバスの目安は約{lo}–{hi}px(キャンバスの高さに応じて変化)。",
+ body_size_hint_purpose: "この利用シーンの推奨は{def}px — 範囲ではなく固定値です。",
+ body_size_hint_oor: "(現在の値はこのキャンバスの通常範囲外です — 単位とサイズ感を確認してください。)",
+ delivery_purpose: "利用シーン",
+ delivery_purpose_hint: "手元で読む資料は小さめでOK、投影する資料は大きめの文字が必要です。",
+ size_override: "役割ごとのサイズ上書き:",
+ size_role_title: "タイトル",
+ size_role_subtitle: "サブタイトル",
+ size_role_annotation: "注釈",
+ custom_typography: "カスタムタイポグラフィ",
+ custom_typography_placeholder: "フォント案を入力 — 例:見出し:Georgia + 游明朝 / 本文:游ゴシック + Arial…",
+ custom_color: "カスタム配色",
+ custom_color_placeholder: "配色を言葉で説明 — 例:濃紺をメインに暖色オレンジのアクセント、背景は白 — またはHEX値を貼り付け…",
+ role_background: "背景",
+ role_secondary_bg: "第2背景",
+ role_primary: "メイン",
+ role_accent: "アクセント",
+ role_secondary_accent: "第2アクセント",
+ role_body_text: "本文文字",
+ cjk: "和文",
+ latin: "欧文",
+ sample_heading_cjk: "プレゼンテーションの表題",
+ sample_heading_latin: "Presentation Title",
+ sample_body_cjk: "キーメッセージの要約",
+ sample_body_latin: "Key message summary",
+ style_preview_label: "全体の印象(配色 + タイポグラフィ)",
+ style_preview_body: "· 雰囲気の確認用で、実際のレイアウトではありません",
+ mode_continuous_desc: "デッキ全体を一気に生成します。",
+ mode_split_desc: "設計仕様の作成後に停止し、別ウィンドウでSVG生成を再開します。",
+ refine_off_desc: "設計仕様を一度で書き上げ、パイプラインは自動で進みます。",
+ refine_on_desc: "設計仕様の作成後に停止し、生成前にレビュー・修正できます。",
+ off_default: "オフ",
+ on: "オン",
+ option_prefix: "案",
+ error_retry: "エラー - 再試行"
+ },
zh: {
page_title: "确认设计方案",
topbar_hint: "选择或自定义各项后点「确认」;页面会关闭,请回到聊天窗口。",
@@ -185,10 +270,12 @@
var LANG = (function () {
try {
var stored = window.localStorage.getItem("ppt_lang");
- if (stored === "zh" || stored === "en") return stored;
+ if (stored === "zh" || stored === "en" || stored === "ja") return stored;
} catch (e) { /* ignore */ }
var nav = (navigator.language || navigator.userLanguage || "en").toLowerCase();
- return nav.indexOf("zh") === 0 ? "zh" : "en";
+ if (nav.indexOf("zh") === 0) return "zh";
+ if (nav.indexOf("ja") === 0) return "ja";
+ return "en";
})();
function t(key) {
@@ -196,18 +283,29 @@
return dict[key] != null ? dict[key] : key;
}
+ // Fallback stays LANG-relative: zh/en users never see Japanese labels,
+ // ja pages fall back ja → en → zh.
+ var LANG_FALLBACK = { zh: ["zh", "en", "ja"], en: ["en", "zh", "ja"], ja: ["ja", "en", "zh"] };
+
function localized(obj, base) {
if (!obj) return "";
var langKey = base + "_" + LANG;
- var fallbackKey = base + "_" + (LANG === "zh" ? "en" : "zh");
if (obj[langKey] != null) return obj[langKey];
+ var order = LANG_FALLBACK[LANG] || LANG_FALLBACK.en;
+ var i;
if (obj[base] != null) {
if (typeof obj[base] === "object") {
- return obj[base][LANG] || obj[base].en || obj[base].zh || "";
+ for (i = 0; i < order.length; i++) {
+ if (obj[base][order[i]]) return obj[base][order[i]];
+ }
+ return "";
}
return obj[base];
}
- return obj[fallbackKey] || "";
+ for (i = 0; i < order.length; i++) {
+ if (obj[base + "_" + order[i]]) return obj[base + "_" + order[i]];
+ }
+ return "";
}
function optionLabel(option) {
@@ -223,15 +321,24 @@
}
function applyStaticTranslations() {
- document.documentElement.setAttribute("lang", LANG === "zh" ? "zh-CN" : "en");
+ document.documentElement.setAttribute("lang", LANG === "zh" ? "zh-CN" : (LANG === "ja" ? "ja" : "en"));
document.querySelectorAll("[data-i18n]").forEach(function (node) {
node.textContent = t(node.getAttribute("data-i18n"));
});
}
+ var LANG_NAMES = { zh: "中文", en: "English", ja: "日本語" };
+
function refreshLangToggle(toggleBtn) {
- toggleBtn.textContent = LANG === "zh" ? "EN" : "中";
+ // Custom dropdown (OS-independent): button shows the CURRENT language.
+ var cur = document.getElementById("lang-current");
+ if (cur) cur.textContent = LANG_NAMES[LANG] || LANG;
toggleBtn.title = t("lang_toggle_title");
+ document.querySelectorAll("#lang-menu li").forEach(function (li) {
+ var selected = li.getAttribute("data-lang") === LANG;
+ li.classList.toggle("selected", selected);
+ li.setAttribute("aria-selected", selected ? "true" : "false");
+ });
}
// ---- state -----------------------------------------------------------
@@ -376,7 +483,7 @@
label = label + (o.dim ? " · " + o.dim : "");
} else {
if (o.dim) label += " · " + o.dim;
- if (desc) label += (LANG === "zh" ? ":" : " — ") + desc;
+ if (desc) label += (LANG === "zh" || LANG === "ja" ? ":" : " — ") + desc;
if (spec && spec.note) label += " · " + spec.note;
}
chip.appendChild(el("span", "chip-text", label));
@@ -1297,7 +1404,7 @@
(CAT.image_usage || []).forEach(function (o) {
var label = optionLabel(o);
var desc = optionDesc(o);
- if (desc) label += (LANG === "zh" ? ":" : " — ") + desc;
+ if (desc) label += (LANG === "zh" || LANG === "ja" ? ":" : " — ") + desc;
var chip = el("div", "chip");
chip.appendChild(el("span", "chip-text", label));
if (recommendedIds.indexOf(o.id) >= 0) {
@@ -1598,13 +1705,78 @@
function boot() {
applyStaticTranslations();
var toggleBtn = document.getElementById("btn-lang-toggle");
+ var langMenu = document.getElementById("lang-menu");
refreshLangToggle(toggleBtn);
- toggleBtn.addEventListener("click", function () {
- LANG = (LANG === "zh") ? "en" : "zh";
- try { window.localStorage.setItem("ppt_lang", LANG); } catch (e) { /* ignore */ }
+ var setMenuOpen = function (open) {
+ langMenu.hidden = !open;
+ toggleBtn.setAttribute("aria-expanded", open ? "true" : "false");
+ if (open) {
+ var sel = langMenu.querySelector("li.selected") || langMenu.querySelector("li[data-lang]");
+ if (sel) sel.focus();
+ }
+ };
+ var chooseLang = function (v) {
+ setMenuOpen(false);
+ toggleBtn.focus();
+ if (v !== "ja" && v !== "en" && v !== "zh") return;
+ if (v === LANG) return;
+ LANG = v;
+ try { window.localStorage.setItem("ppt_lang", LANG); } catch (e2) { /* ignore */ }
applyStaticTranslations();
refreshLangToggle(toggleBtn);
if (REC && CAT) renderAll(); // STATE persists → selections preserved
+ };
+ toggleBtn.addEventListener("click", function (e) {
+ e.stopPropagation();
+ setMenuOpen(langMenu.hidden);
+ });
+ toggleBtn.addEventListener("keydown", function (e) {
+ if (e.key === "Escape" && !langMenu.hidden) {
+ e.stopPropagation();
+ setMenuOpen(false);
+ } else if ((e.key === "ArrowDown" || e.key === "ArrowUp") && langMenu.hidden) {
+ e.preventDefault();
+ e.stopPropagation();
+ setMenuOpen(true);
+ }
+ });
+ langMenu.addEventListener("click", function (e) {
+ e.stopPropagation();
+ var li = e.target && e.target.closest ? e.target.closest("li[data-lang]") : null;
+ if (li) chooseLang(li.getAttribute("data-lang"));
+ else setMenuOpen(false);
+ });
+ langMenu.addEventListener("keydown", function (e) {
+ e.stopPropagation(); // page-level shortcuts must not fire while the menu is open
+ var items = Array.prototype.slice.call(langMenu.querySelectorAll("li[data-lang]"));
+ var idx = items.indexOf(document.activeElement);
+ if (e.key === "Escape") {
+ setMenuOpen(false);
+ toggleBtn.focus();
+ } else if (e.key === "ArrowDown") {
+ e.preventDefault();
+ (items[idx + 1] || items[0]).focus();
+ } else if (e.key === "ArrowUp") {
+ e.preventDefault();
+ (items[idx - 1] || items[items.length - 1]).focus();
+ } else if (e.key === "Home") {
+ e.preventDefault();
+ items[0].focus();
+ } else if (e.key === "End") {
+ e.preventDefault();
+ items[items.length - 1].focus();
+ } else if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
+ e.preventDefault();
+ } else if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ if (idx >= 0) chooseLang(items[idx].getAttribute("data-lang"));
+ }
+ });
+ toggleBtn.parentElement.addEventListener("focusout", function (e) {
+ if (!langMenu.hidden && !toggleBtn.parentElement.contains(e.relatedTarget)) setMenuOpen(false);
+ });
+ document.addEventListener("click", function () {
+ if (!langMenu.hidden) setMenuOpen(false);
});
document.getElementById("btn-confirm").addEventListener("click", function () {
if (STAGE === 1) { submitTier1(); } else { confirm(); }
@@ -1616,7 +1788,7 @@
]).then(function (res) {
CAT = res[0];
REC = res[1];
- if (REC.lang === "zh" || REC.lang === "en") {
+ if (REC.lang === "zh" || REC.lang === "en" || REC.lang === "ja") {
var hasStored = false;
try { hasStored = !!window.localStorage.getItem("ppt_lang"); } catch (e) { /* ignore */ }
if (!hasStored) { LANG = REC.lang; applyStaticTranslations(); refreshLangToggle(toggleBtn); }
diff --git a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
index 6db5eb77..4fb5b48d 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
+++ b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
@@ -1,85 +1,101 @@
{
- "_comment": "Enumerable (finite) option universe for the confirm page. Served by Flask static at /static/catalogs.json; the front-end prefers /api/catalogs when the server provides it. These fields list ALL options and the AI marks one as recommended via recommendations.json `recommend`. Open/generative fields (color, typography, generated-image style) are NOT here — the AI authors >=3 candidates each for those (creative recommendations always offer real choice). 'canvas' mirrors scripts/config.py CANVAS_FORMATS — keep in sync. User-facing catalog text supports label_zh/label_en, desc_zh/desc_en, group_zh/group_en.",
+ "_comment": "Enumerable (finite) option universe for the confirm page. Served by Flask static at /static/catalogs.json; the front-end prefers /api/catalogs when the server provides it. These fields list ALL options and the AI marks one as recommended via recommendations.json `recommend`. Open/generative fields (color, typography, generated-image style) are NOT here — the AI authors >=3 candidates each for those (creative recommendations always offer real choice). 'canvas' mirrors scripts/config.py CANVAS_FORMATS — keep in sync. User-facing catalog text supports label_zh/label_en/label_ja, desc_zh/desc_en/desc_ja, group_zh/group_en/group_ja.",
"canvas": [
{
"id": "ppt169",
"label": "PPT 16:9",
"label_zh": "PPT 16:9",
"label_en": "PPT 16:9",
+ "label_ja": "PPT 16:9",
"dim": "1280×720",
"viewbox": "0 0 1280 720",
"use_zh": "现代投影 / 在线演示",
- "use_en": "Modern projectors / online"
+ "use_en": "Modern projectors / online",
+ "use_ja": "現代的なプロジェクター/オンライン発表"
},
{
"id": "ppt43",
"label": "PPT 4:3",
"label_zh": "PPT 4:3",
"label_en": "PPT 4:3",
+ "label_ja": "PPT 4:3",
"dim": "1024×768",
"viewbox": "0 0 1024 768",
"use_zh": "传统投影",
- "use_en": "Traditional projectors"
+ "use_en": "Traditional projectors",
+ "use_ja": "従来型プロジェクター"
},
{
"id": "wechat",
"label": "公众号头图 2.35:1",
"label_zh": "公众号头图 2.35:1",
"label_en": "WeChat Header 2.35:1",
+ "label_ja": "WeChat ヘッダー 2.35:1",
"dim": "900×383",
"viewbox": "0 0 900 383",
"use_zh": "微信公众号文章封面",
- "use_en": "WeChat article cover"
+ "use_en": "WeChat article cover",
+ "use_ja": "WeChat記事のカバー画像"
},
{
"id": "xiaohongshu",
"label": "小红书 3:4",
"label_zh": "小红书 3:4",
"label_en": "RED 3:4",
+ "label_ja": "小紅書(RED)3:4",
"dim": "1242×1660",
"viewbox": "0 0 1242 1660",
"use_zh": "知识分享 / 种草封面",
- "use_en": "Knowledge sharing"
+ "use_en": "Knowledge sharing",
+ "use_ja": "知識共有/おすすめ紹介カバー"
},
{
"id": "moments",
"label": "社交方图 1:1",
"label_zh": "社交方图 1:1",
"label_en": "Social Square 1:1",
+ "label_ja": "SNS正方形 1:1",
"dim": "1080×1080",
"viewbox": "0 0 1080 1080",
"use_zh": "社交媒体方图",
- "use_en": "Social square"
+ "use_en": "Social square",
+ "use_ja": "SNS用正方形画像"
},
{
"id": "story",
"label": "竖屏 9:16",
"label_zh": "竖屏 9:16",
"label_en": "Vertical 9:16",
+ "label_ja": "縦型 9:16",
"dim": "1080×1920",
"viewbox": "0 0 1080 1920",
"use_zh": "短视频 / 竖屏封面",
- "use_en": "Short-video / story cover"
+ "use_en": "Short-video / story cover",
+ "use_ja": "ショート動画/ストーリーカバー"
},
{
"id": "banner",
"label": "横幅 16:9",
"label_zh": "横幅 16:9",
"label_en": "Banner 16:9",
+ "label_ja": "バナー 16:9",
"dim": "1920×1080",
"viewbox": "0 0 1920 1080",
"use_zh": "网页横幅 / 大屏",
- "use_en": "Web banner / big screen"
+ "use_en": "Web banner / big screen",
+ "use_ja": "Webバナー/大画面"
},
{
"id": "a4",
"label": "A4 1:1.41",
"label_zh": "A4 1:1.41",
"label_en": "A4 1:1.41",
+ "label_ja": "A4 1:1.41",
"dim": "1240×1754",
"viewbox": "0 0 1240 1754",
"use_zh": "打印 / 文档导出",
- "use_en": "Print / PDF export"
+ "use_en": "Print / PDF export",
+ "use_ja": "印刷/PDF出力"
}
],
"modes": [
@@ -88,40 +104,50 @@
"label": "pyramid",
"label_zh": "金字塔",
"label_en": "pyramid",
+ "label_ja": "ピラミッド",
"desc_zh": "结论先行、相互独立且完全穷尽的论证、每个数据都带比较。适合决策、分析、战略、汇报。",
- "desc_en": "Lead with the answer, use MECE reasoning, and compare every key data point. Best for decisions, analysis, strategy, and reporting."
+ "desc_en": "Lead with the answer, use MECE reasoning, and compare every key data point. Best for decisions, analysis, strategy, and reporting.",
+ "desc_ja": "結論を先に示し、MECEな論理構成で、主要データは必ず比較を添える。意思決定・分析・戦略・報告に最適。"
},
{
"id": "narrative",
"label": "narrative",
"label_zh": "叙事",
"label_en": "narrative",
+ "label_ja": "ナラティブ",
"desc_zh": "情境、张力、解决方案形成故事弧线,保留悬念与转折。适合路演、案例、品牌、融资。",
- "desc_en": "Build a story arc from context to tension to resolution, with suspense and turns. Best for roadshows, cases, brand stories, and fundraising."
+ "desc_en": "Build a story arc from context to tension to resolution, with suspense and turns. Best for roadshows, cases, brand stories, and fundraising.",
+ "desc_ja": "状況設定から緊張、解決へとストーリーアークを描き、意外性や転換を残す。ロードショー・事例紹介・ブランドストーリー・資金調達向け。"
},
{
"id": "instructional",
"label": "instructional",
"label_zh": "教学",
"label_en": "instructional",
+ "label_ja": "教育・解説",
"desc_zh": "概念拆解、分步推进、并列讲解。适合培训、教程、科普、知识分享。",
- "desc_en": "Break concepts down, advance step by step, and explain parallel ideas clearly. Best for training, tutorials, popular science, and knowledge sharing."
+ "desc_en": "Break concepts down, advance step by step, and explain parallel ideas clearly. Best for training, tutorials, popular science, and knowledge sharing.",
+ "desc_ja": "概念を分解し、段階的に進め、並列する要素を明確に説明する。研修・チュートリアル・科学解説・知識共有に最適。"
},
{
"id": "showcase",
"label": "showcase",
"label_zh": "展演",
"label_en": "showcase",
+ "label_ja": "ショーケース",
"desc_zh": "视觉主导,大图、大数和情绪节奏优先。适合发布、品牌秀、活动。",
- "desc_en": "Use visual rhythm, large images, and strong numbers as the lead. Best for launches, brand showcases, and events."
+ "desc_en": "Use visual rhythm, large images, and strong numbers as the lead. Best for launches, brand showcases, and events.",
+ "desc_ja": "ビジュアル主導で、大きな画像・大きな数字・感情のリズムを優先する。発表会・ブランドショー・イベント向け。"
},
{
"id": "briefing",
"label": "briefing",
"label_zh": "简报",
"label_en": "briefing",
+ "label_ja": "ブリーフィング",
"desc_zh": "中性完整、便于速览,采用主题式标题和均匀权重。适合周报、参考材料、常见问题、会议包。",
- "desc_en": "Stay neutral, complete, and scannable with topical headings and balanced weight. Best for weekly reports, reference packs, FAQs, and meeting decks."
+ "desc_en": "Stay neutral, complete, and scannable with topical headings and balanced weight. Best for weekly reports, reference packs, FAQs, and meeting decks.",
+ "desc_ja": "中立的かつ網羅的で一覧しやすく、トピック見出しと均等な重み付けを用いる。週次報告・参考資料・FAQ・会議資料に最適。"
}
],
"visual_styles": [
@@ -129,46 +155,57 @@
"group": "Corporate / product",
"group_zh": "企业 / 产品",
"group_en": "Corporate / product",
+ "group_ja": "企業/プロダクト",
"items": [
{
"id": "swiss-minimal",
"label": "swiss-minimal",
"label_zh": "瑞士极简",
"label_en": "swiss-minimal",
+ "label_ja": "スイス・ミニマル",
"desc_zh": "网格锁定、锐利层级、大留白、少装饰。",
- "desc_en": "Grid-locked layout, sharp hierarchy, generous whitespace, and minimal decoration."
+ "desc_en": "Grid-locked layout, sharp hierarchy, generous whitespace, and minimal decoration.",
+ "desc_ja": "グリッドに沿ったレイアウト、明快な階層、余白を活かした装飾の少ないデザイン。"
},
{
"id": "soft-rounded",
"label": "soft-rounded",
"label_zh": "柔和圆角",
"label_en": "soft-rounded",
+ "label_ja": "ソフト・ラウンド",
"desc_zh": "圆角卡片、柔和投影、亲和现代。",
- "desc_en": "Rounded cards, soft shadows, and a friendly modern tone."
+ "desc_en": "Rounded cards, soft shadows, and a friendly modern tone.",
+ "desc_ja": "角丸のカード、柔らかい影、親しみやすいモダンな雰囲気。"
},
{
"id": "glassmorphism",
"label": "glassmorphism",
"label_zh": "玻璃拟态",
"label_en": "glassmorphism",
+ "label_ja": "グラスモーフィズム",
"desc_zh": "半透明玻璃面板、渐变光感、漂浮层次。",
- "desc_en": "Translucent glass panels, gradient light, and floating depth."
+ "desc_en": "Translucent glass panels, gradient light, and floating depth.",
+ "desc_ja": "半透明のガラスパネル、グラデーションの光、浮遊感のある奥行き。"
},
{
"id": "dark-tech",
"label": "dark-tech",
"label_zh": "深色科技",
"label_en": "dark-tech",
+ "label_ja": "ダークテック",
"desc_zh": "深色画布、发光强调、几何精确。",
- "desc_en": "Dark canvas, glowing accents, and precise geometry."
+ "desc_en": "Dark canvas, glowing accents, and precise geometry.",
+ "desc_ja": "ダークな背景、光るアクセント、精密な幾何学表現。"
},
{
"id": "blueprint",
"label": "blueprint",
"label_zh": "蓝图",
"label_en": "blueprint",
+ "label_ja": "ブループリント",
"desc_zh": "深底蓝图线稿、等距结构、工程标注。",
- "desc_en": "Dark blueprint linework, isometric structure, and engineering annotations."
+ "desc_en": "Dark blueprint linework, isometric structure, and engineering annotations.",
+ "desc_ja": "濃紺の設計図風の線画、アイソメトリック構造、技術的な注記。"
}
]
},
@@ -176,38 +213,47 @@
"group": "Editorial / publication",
"group_zh": "编辑 / 出版",
"group_en": "Editorial / publication",
+ "group_ja": "エディトリアル/出版",
"items": [
{
"id": "editorial",
"label": "editorial",
"label_zh": "编辑出版",
"label_en": "editorial",
+ "label_ja": "エディトリアル",
"desc_zh": "杂志式层级、栏线、衬线与无衬线交织。",
- "desc_en": "Magazine hierarchy, column rules, and a serif/sans-serif mix."
+ "desc_en": "Magazine hierarchy, column rules, and a serif/sans-serif mix.",
+ "desc_ja": "雑誌のような階層構造、段組み罫線、セリフ・サンセリフの混在。"
},
{
"id": "photo-editorial",
"label": "photo-editorial",
"label_zh": "摄影编辑",
"label_en": "photo-editorial",
+ "label_ja": "フォトエディトリアル",
"desc_zh": "满版摄影主导,文字点缀与图注配合。",
- "desc_en": "Full-bleed photography leads, supported by light text and captions."
+ "desc_en": "Full-bleed photography leads, supported by light text and captions.",
+ "desc_ja": "裁ち落とし写真を主役に、控えめなテキストとキャプションで補う。"
},
{
"id": "data-journalism",
"label": "data-journalism",
"label_zh": "数据新闻",
"label_en": "data-journalism",
+ "label_ja": "データジャーナリズム",
"desc_zh": "多栏微图表、侧栏、来源线、信息密度高。",
- "desc_en": "Multi-column microcharts, sidebars, source lines, and dense information."
+ "desc_en": "Multi-column microcharts, sidebars, source lines, and dense information.",
+ "desc_ja": "多段組みの小型チャート、サイドバー、出典表記、高い情報密度。"
},
{
"id": "brutalist",
"label": "brutalist",
"label_zh": "粗野主义",
"label_en": "brutalist",
+ "label_ja": "ブルータリズム",
"desc_zh": "报纸密度、粗线框、原始结构、扁平表达。",
- "desc_en": "Newspaper-like density, heavy rules, raw structure, and flat treatment."
+ "desc_en": "Newspaper-like density, heavy rules, raw structure, and flat treatment.",
+ "desc_ja": "新聞のような情報密度、太い罫線、素朴な構造、フラットな表現。"
}
]
},
@@ -215,38 +261,47 @@
"group": "Expressive / print",
"group_zh": "表现 / 印刷",
"group_en": "Expressive / print",
+ "group_ja": "表現的/印刷",
"items": [
{
"id": "memphis",
"label": "memphis",
"label_zh": "孟菲斯",
"label_en": "memphis",
+ "label_ja": "メンフィス",
"desc_zh": "撞色块、几何碎片、粗描边。",
- "desc_en": "Contrasting color blocks, geometric scraps, and heavy outlines."
+ "desc_en": "Contrasting color blocks, geometric scraps, and heavy outlines.",
+ "desc_ja": "コントラストの強い色面、幾何学的な断片、太いアウトライン。"
},
{
"id": "zine",
"label": "zine",
"label_zh": "小刊",
"label_en": "zine",
+ "label_ja": "ジン(自主制作誌)",
"desc_zh": "孔版印刷错位、半调、有限色、印刷颗粒。",
- "desc_en": "Riso offsets, halftones, limited colors, and print grain."
+ "desc_en": "Riso offsets, halftones, limited colors, and print grain.",
+ "desc_ja": "リソグラフのズレ、ハーフトーン、限られた色数、印刷の粒感。"
},
{
"id": "vintage-poster",
"label": "vintage-poster",
"label_zh": "复古海报",
"label_en": "vintage-poster",
+ "label_ja": "ヴィンテージポスター",
"desc_zh": "中世纪扁平色块、半调、复古几何暖意。",
- "desc_en": "Mid-century flat color blocks, halftones, and warm vintage geometry."
+ "desc_en": "Mid-century flat color blocks, halftones, and warm vintage geometry.",
+ "desc_ja": "ミッドセンチュリー調のフラットな色面、ハーフトーン、温かみのあるレトロな幾何学模様。"
},
{
"id": "paper-cut",
"label": "paper-cut",
"label_zh": "剪纸",
"label_en": "paper-cut",
+ "label_ja": "切り絵",
"desc_zh": "层叠剪纸、层间柔影、手作质感。",
- "desc_en": "Layered cut paper, soft inter-layer shadows, and a handmade feel."
+ "desc_en": "Layered cut paper, soft inter-layer shadows, and a handmade feel.",
+ "desc_ja": "重なり合う切り紙、層間の柔らかな影、手作り感のある質感。"
}
]
},
@@ -254,38 +309,47 @@
"group": "Hand-drawn / brush",
"group_zh": "手绘 / 笔触",
"group_en": "Hand-drawn / brush",
+ "group_ja": "手描き/筆致",
"items": [
{
"id": "sketch-notes",
"label": "sketch-notes",
"label_zh": "手绘笔记",
"label_en": "sketch-notes",
+ "label_ja": "手描きノート",
"desc_zh": "暖纸底、涂鸦线条、柔和彩块。",
- "desc_en": "Warm paper, doodle lines, and soft color blocks."
+ "desc_en": "Warm paper, doodle lines, and soft color blocks.",
+ "desc_ja": "温かみのある紙の質感、落書き風の線、柔らかい色面。"
},
{
"id": "ink-notes",
"label": "ink-notes",
"label_zh": "墨迹笔记",
"label_en": "ink-notes",
+ "label_ja": "インクノート",
"desc_zh": "浅底、黑色手写墨迹、稀疏语义强调。",
- "desc_en": "Light background, black handwritten ink, and sparse semantic emphasis."
+ "desc_en": "Light background, black handwritten ink, and sparse semantic emphasis.",
+ "desc_ja": "明るい背景に黒の手書きインク、要所を絞った強調表現。"
},
{
"id": "chalkboard",
"label": "chalkboard",
"label_zh": "黑板",
"label_en": "chalkboard",
+ "label_ja": "黒板",
"desc_zh": "深板岩底、粉笔笔触、粉彩强调。",
- "desc_en": "Dark slate surface, chalk strokes, and pastel emphasis."
+ "desc_en": "Dark slate surface, chalk strokes, and pastel emphasis.",
+ "desc_ja": "濃いスレート調の背景に、チョークの筆致とパステルの強調色。"
},
{
"id": "ink-wash",
"label": "ink-wash",
"label_zh": "水墨",
"label_en": "ink-wash",
+ "label_ja": "水墨画",
"desc_zh": "宣纸留白、笔触、印章、静气,新中式表达。",
- "desc_en": "Rice-paper whitespace, brushwork, seals, and a quiet contemporary Chinese tone."
+ "desc_en": "Rice-paper whitespace, brushwork, seals, and a quiet contemporary Chinese tone.",
+ "desc_ja": "画仙紙の余白、筆致、落款印、静謐な現代中国風の表現。"
}
]
},
@@ -293,14 +357,17 @@
"group": "Specialty",
"group_zh": "特殊风格",
"group_en": "Specialty",
+ "group_ja": "特殊スタイル",
"items": [
{
"id": "pixel-art",
"label": "pixel-art",
"label_zh": "像素风",
"label_en": "pixel-art",
+ "label_ja": "ピクセルアート",
"desc_zh": "严格像素网格、块状形体、有限色、扁平表达。",
- "desc_en": "Strict pixel grid, blocky shapes, limited colors, and flat treatment."
+ "desc_en": "Strict pixel grid, blocky shapes, limited colors, and flat treatment.",
+ "desc_ja": "厳密なピクセルグリッド、ブロック状の形状、限られた色数、フラットな表現。"
}
]
}
@@ -311,46 +378,57 @@
"label": "chunk-filled",
"label_zh": "几何实心图标",
"label_en": "chunk-filled",
+ "label_ja": "幾何学的塗りつぶしアイコン",
"desc_zh": "实心、直线几何、锐利厚重,适合科技、工程、企业结构图。",
- "desc_en": "Solid, straight, geometric, sharp, and heavy. Good for tech, engineering, and corporate structure diagrams."
+ "desc_en": "Solid, straight, geometric, sharp, and heavy. Good for tech, engineering, and corporate structure diagrams.",
+ "desc_ja": "塗りつぶし・直線的な幾何形状で、鋭くしっかりした印象。テック、エンジニアリング、企業組織図に適する。"
},
{
"id": "tabler-filled",
"label": "tabler-filled",
"label_zh": "圆润实心图标",
"label_en": "tabler-filled",
+ "label_ja": "丸みのある塗りつぶしアイコン",
"desc_zh": "实心、圆润曲线、中等视觉重量,适合亲和现代风格。",
- "desc_en": "Solid, rounded, and medium-weight. Good for friendly modern styles."
+ "desc_en": "Solid, rounded, and medium-weight. Good for friendly modern styles.",
+ "desc_ja": "塗りつぶし・丸みのある曲線で、中程度の視覚的な重み。親しみやすいモダンなスタイルに適する。"
},
{
"id": "tabler-outline",
"label": "tabler-outline",
"label_zh": "线性描边图标",
"label_en": "tabler-outline",
+ "label_ja": "線形アウトラインアイコン",
"desc_zh": "线性描边,轻盈精致,适合屏幕阅读和编辑型图标。",
- "desc_en": "Linear stroke, light and refined. Good for screen reading and editable icons."
+ "desc_en": "Linear stroke, light and refined. Good for screen reading and editable icons.",
+ "desc_ja": "線形のストロークで、軽やかで洗練された印象。画面表示や編集用アイコンに適する。"
},
{
"id": "phosphor-duotone",
"label": "phosphor-duotone",
"label_zh": "双色层次图标",
"label_en": "phosphor-duotone",
+ "label_ja": "デュオトーン階調アイコン",
"desc_zh": "双色层次、中等重量,适合现代产品和平台类表达。",
- "desc_en": "Two-tone layering with medium weight. Good for modern product and platform narratives."
+ "desc_en": "Two-tone layering with medium weight. Good for modern product and platform narratives.",
+ "desc_ja": "2色の階調表現で中程度の重み。モダンなプロダクトやプラットフォームの説明に適する。"
},
{
"id": "emoji",
"label": "Emoji",
"label_zh": "表情符号",
"label_en": "Emoji",
+ "label_ja": "絵文字",
"desc_zh": "系统表情符号,适合轻量、社交、教学或快速识别场景;正式企业 / 咨询风谨慎使用。",
- "desc_en": "System emoji for lightweight, social, instructional, or quick-recognition contexts; use carefully in formal corporate or consulting decks."
+ "desc_en": "System emoji for lightweight, social, instructional, or quick-recognition contexts; use carefully in formal corporate or consulting decks.",
+ "desc_ja": "システム絵文字。軽やかなSNS・教育・素早い視認が求められる場面向き。フォーマルな企業/コンサル資料では慎重に使用すること。"
},
{
"id": "none",
"label": "不用图标",
"label_zh": "不用图标",
- "label_en": "No icons"
+ "label_en": "No icons",
+ "label_ja": "アイコンなし"
}
],
"image_usage": [
@@ -358,31 +436,36 @@
"id": "ai",
"label": "AI 生成",
"label_zh": "生成配图",
- "label_en": "AI-generated"
+ "label_en": "AI-generated",
+ "label_ja": "AI生成"
},
{
"id": "web",
"label": "Web 来源",
"label_zh": "网络来源",
- "label_en": "Web-sourced"
+ "label_en": "Web-sourced",
+ "label_ja": "Web由来"
},
{
"id": "provided",
"label": "用户提供",
"label_zh": "用户提供",
- "label_en": "User-provided"
+ "label_en": "User-provided",
+ "label_ja": "ユーザー提供"
},
{
"id": "placeholder",
"label": "占位符",
"label_zh": "占位符",
- "label_en": "Placeholder"
+ "label_en": "Placeholder",
+ "label_ja": "プレースホルダー"
},
{
"id": "none",
"label": "不使用图片",
"label_zh": "不使用图片",
- "label_en": "No images"
+ "label_en": "No images",
+ "label_ja": "画像なし"
}
],
"image_ai_path": [
@@ -390,31 +473,38 @@
"id": "auto",
"label": "Automatic Path A → Path B → Offline Manual",
"label_zh": "自动选择",
- "label_en": "Automatic Path A → Path B → Offline Manual"
+ "label_en": "Automatic Path A → Path B → Offline Manual",
+ "label_ja": "自動選択(Path A → Path B → オフライン手動)"
},
{
"id": "api",
"label": "Path A",
"label_zh": "接口后端",
"label_en": "Path A",
+ "label_ja": "Path A",
"desc_zh": "强制走接口后端,第 5 步运行 image_gen.py(需已配置 IMAGE_BACKEND)。",
- "desc_en": "Force the API backend — image_gen.py runs in Step 5 (requires IMAGE_BACKEND)."
+ "desc_en": "Force the API backend — image_gen.py runs in Step 5 (requires IMAGE_BACKEND).",
+ "desc_ja": "APIバックエンドを強制使用。ステップ5でimage_gen.pyを実行(IMAGE_BACKENDの設定が必要)。"
},
{
"id": "host-native",
"label": "Path B",
"label_zh": "宿主原生工具",
"label_en": "Path B",
+ "label_ja": "Path B",
"desc_zh": "强制使用当前环境的原生图像工具生成(即使配置了 IMAGE_BACKEND 也跳过接口);需宿主提供原生图像工具(Codex / Claude Code 等)。",
- "desc_en": "Force the host's native image tool (skips the API even if IMAGE_BACKEND is set); requires a host with a native image tool (Codex / Claude Code / similar)."
+ "desc_en": "Force the host's native image tool (skips the API even if IMAGE_BACKEND is set); requires a host with a native image tool (Codex / Claude Code / similar).",
+ "desc_ja": "現在の環境のネイティブ画像ツールを強制使用(IMAGE_BACKENDが設定されていてもAPIをスキップ)。ネイティブ画像ツールを持つホスト(Codex/Claude Codeなど)が必要。"
},
{
"id": "manual",
"label": "Offline Manual",
"label_zh": "离线手动",
"label_en": "Offline Manual",
+ "label_ja": "オフライン手動",
"desc_zh": "机制:写入图片提示词文件;用户在外部生成后放入项目图片目录。",
- "desc_en": "Prompts written to images/image_prompts.json; user generates externally and places files in project/images/."
+ "desc_en": "Prompts written to images/image_prompts.json; user generates externally and places files in project/images/.",
+ "desc_ja": "images/image_prompts.jsonにプロンプトを書き出し、ユーザーが外部で生成した画像をproject/images/に配置する方式。"
}
],
"formula_policy": [
@@ -423,24 +513,30 @@
"label": "mixed",
"label_zh": "混合",
"label_en": "mixed",
+ "label_ja": "混合",
"desc_zh": "复杂公式渲染为图片;简单行内公式保持为可编辑文本或字符。",
- "desc_en": "Render complex formula-worthy expressions to PNG; keep simple inline math as editable text / Unicode."
+ "desc_en": "Render complex formula-worthy expressions to PNG; keep simple inline math as editable text / Unicode.",
+ "desc_ja": "複雑な数式はPNG画像として描画し、簡単な行内数式は編集可能なテキスト/Unicode文字のまま残す。"
},
{
"id": "render-all",
"label": "render-all",
"label_zh": "全部渲染",
"label_en": "render-all",
+ "label_ja": "すべて画像化",
"desc_zh": "所有需要按公式处理的表达式都渲染为图片。",
- "desc_en": "Render every formula-worthy expression to PNG."
+ "desc_en": "Render every formula-worthy expression to PNG.",
+ "desc_ja": "数式として扱うべき表現はすべてPNG画像として描画する。"
},
{
"id": "text-only",
"label": "text-only",
"label_zh": "仅文本",
"label_en": "text-only",
+ "label_ja": "テキストのみ",
"desc_zh": "不渲染公式;表达式保持为可编辑文本或字符。",
- "desc_en": "Do not render formulas; keep expressions as editable text / Unicode."
+ "desc_en": "Do not render formulas; keep expressions as editable text / Unicode.",
+ "desc_ja": "数式は画像化せず、編集可能なテキスト/Unicode文字のまま保持する。"
}
],
"generation_mode": [
@@ -448,13 +544,15 @@
"id": "continuous",
"label": "continuous",
"label_zh": "连续模式",
- "label_en": "continuous"
+ "label_en": "continuous",
+ "label_ja": "連続モード"
},
{
"id": "split",
"label": "split",
"label_zh": "分段模式",
- "label_en": "split"
+ "label_en": "split",
+ "label_ja": "分割モード"
}
],
"delivery_purpose": [
@@ -463,24 +561,30 @@
"label": "text",
"label_zh": "文字型 · 近读",
"label_en": "text / read-close",
+ "label_ja": "文書型・近距離閲覧",
"desc_zh": "当文件读、近距离看(报告、数据密集 brief、留底材料)。正文 20px。",
- "desc_en": "Read close as a file (report, data-dense brief, leave-behind). Body 20px."
+ "desc_en": "Read close as a file (report, data-dense brief, leave-behind). Body 20px.",
+ "desc_ja": "資料として手元で読む用途(報告書、データ密度の高いブリーフ、配布資料)。本文20px。"
},
{
"id": "balanced",
"label": "balanced",
"label_zh": "均衡 · 商务",
"label_en": "balanced / business",
+ "label_ja": "バランス型・ビジネス",
"desc_zh": "既投影也阅读(路演、业务评审)。默认档,正文 24px。",
- "desc_en": "Both projected and read (roadshow, business review). The default tier, body 24px."
+ "desc_en": "Both projected and read (roadshow, business review). The default tier, body 24px.",
+ "desc_ja": "投影でも閲覧でも使う用途(ロードショー、事業レビュー)。デフォルトの選択、本文24px。"
},
{
"id": "presentation",
"label": "presentation",
"label_zh": "展示型 · 演讲",
"label_en": "presentation / keynote",
+ "label_ja": "プレゼン型・講演",
"desc_zh": "投影、远距离扫一眼、内容稀疏(keynote、发布、课堂)。正文 32px。",
- "desc_en": "Projected, glanced from the back, sparse (keynote, launch, classroom). Body 32px."
+ "desc_en": "Projected, glanced from the back, sparse (keynote, launch, classroom). Body 32px.",
+ "desc_ja": "投影用で後方からも一目で分かる、情報量を絞った構成(キーノート、発表会、講義)。本文32px。"
}
]
}
diff --git a/skills/ppt-master/scripts/confirm_ui/static/index.html b/skills/ppt-master/scripts/confirm_ui/static/index.html
index 85757b35..6c3fd4fa 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/index.html
+++ b/skills/ppt-master/scripts/confirm_ui/static/index.html
@@ -13,7 +13,14 @@
<h1 data-i18n="page_title">PPT Master - Confirm Design</h1>
<p id="topbar-hint" data-i18n="topbar_hint">After confirming, return to the chat and say “done”.</p>
</div>
- <button id="btn-lang-toggle" class="btn-lang-toggle" title="Switch language">中</button>
+ <div class="lang-select">
+ <button id="btn-lang-toggle" class="lang-select-btn" type="button" title="Switch language" aria-haspopup="listbox" aria-expanded="false"><span id="lang-current"></span><span class="lang-caret" aria-hidden="true">▾</span></button>
+ <ul id="lang-menu" class="lang-menu" role="listbox" hidden>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="zh">中文</li>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="en">English</li>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="ja">日本語</li>
+ </ul>
+ </div>
</div>
</header>
diff --git a/skills/ppt-master/scripts/confirm_ui/static/style.css b/skills/ppt-master/scripts/confirm_ui/static/style.css
index c0411c68..966a734c 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/style.css
+++ b/skills/ppt-master/scripts/confirm_ui/static/style.css
@@ -42,17 +42,46 @@ body {
.topbar-titles h1 { margin: 0; font-size: 18px; font-weight: 650; }
.topbar-titles p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
-.btn-lang-toggle {
- flex: none;
- width: 38px; height: 38px;
- border-radius: 50%;
+.lang-select { position: relative; flex: none; }
+.lang-select-btn {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ height: 38px;
+ padding: 0 12px;
+ border-radius: 10px;
border: 1px solid var(--line);
background: var(--card);
color: var(--ink);
font-size: 14px;
cursor: pointer;
}
-.btn-lang-toggle:hover { background: var(--bg); }
+.lang-select-btn:hover { background: var(--bg); }
+.lang-caret { font-size: 10px; color: var(--muted); }
+.lang-menu {
+ position: absolute;
+ right: 0;
+ top: calc(100% + 6px);
+ margin: 0;
+ padding: 4px;
+ list-style: none;
+ min-width: 110px;
+ background: var(--card);
+ border: 1px solid var(--line);
+ border-radius: 10px;
+ box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
+ z-index: 60;
+}
+.lang-menu li {
+ padding: 8px 12px;
+ border-radius: 6px;
+ font-size: 14px;
+ color: var(--ink);
+ cursor: pointer;
+}
+.lang-menu li:hover,
+.lang-menu li:focus { background: var(--bg); }
+.lang-menu li.selected { font-weight: 650; }
/* ---- form ---- */
#form { max-width: 880px; margin: 0 auto; padding: 24px; }
diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.md
index d96289ca..2ecd17c6 100644
--- a/skills/ppt-master/scripts/docs/confirm_ui.md
+++ b/skills/ppt-master/scripts/docs/confirm_ui.md
@@ -58,7 +58,7 @@ pip install flask
## Catalogs — `static/catalogs.json` (the finite option universe)
-The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while bilingual labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `icons`, `image_usage`, `image_ai_path`, `formula_policy`, `generation_mode`, `delivery_purpose`. Each entry is `{ "id", "label", "label_zh", "label_en", ... }`; descriptions use `desc_zh` / `desc_en`, and `visual_styles` groups use `group_zh` / `group_en`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must be bilingual. English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `mixed`, etc.); Chinese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_en", "items": [...] }]`. For `canvas` you only need to maintain the bilingual labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.
+The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while trilingual labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `icons`, `image_usage`, `image_ai_path`, `formula_policy`, `generation_mode`, `delivery_purpose`. Each entry is `{ "id", "label", "label_zh", "label_en", "label_ja", ... }`; descriptions use `desc_zh` / `desc_en` / `desc_ja`, and `visual_styles` groups use `group_zh` / `group_en` / `group_ja`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must cover all three languages (zh / en / ja). English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `mixed`, etc.); Chinese and Japanese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_en", "group_ja", "items": [...] }]`. For `canvas` you only need to maintain the trilingual labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.
## Round-trip data contract
@@ -135,9 +135,9 @@ The AI launches Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derive
]
},
"visual_style_spectrum": [
- { "id": "soft-rounded", "tag_zh": "稳妥专业", "tag_en": "Safe & professional", "note_zh": "像 Notion 官网", "note_en": "like the Notion site" },
- { "id": "editorial", "tag_zh": "编辑质感", "tag_en": "Editorial depth", "note_zh": "像经济学人专题", "note_en": "like an Economist feature" },
- { "id": "brutalist", "tag_zh": "硬核宣言", "tag_en": "Bold manifesto", "note_zh": "像研究机构年度宣言", "note_en": "like a research-house manifesto" }
+ { "id": "soft-rounded", "tag_zh": "稳妥专业", "tag_en": "Safe & professional", "tag_ja": "手堅くプロフェッショナル", "note_zh": "像 Notion 官网", "note_en": "like the Notion site", "note_ja": "Notion公式サイト風" },
+ { "id": "editorial", "tag_zh": "编辑质感", "tag_en": "Editorial depth", "tag_ja": "エディトリアルな質感", "note_zh": "像经济学人专题", "note_en": "like an Economist feature", "note_ja": "The Economistの特集記事風" },
+ { "id": "brutalist", "tag_zh": "硬核宣言", "tag_en": "Bold manifesto", "tag_ja": "大胆なマニフェスト", "note_zh": "像研究机构年度宣言", "note_en": "like a research-house manifesto", "note_ja": "研究機関の年次宣言風" }
],
"refine_spec": { "value": false }
}
@@ -150,16 +150,16 @@ The AI launches Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derive
- `image_notes` is the initial strategy note shown under the image source chips. Use it for page-role guidance and constraints: which source applies where, what to avoid, which user assets are authoritative, how realistic / abstract the imagery should be, and what can remain as placeholders. It is intent guidance, not a separate finite option.
- When `recommend.image_usage` includes `ai`, also set `recommend.image_ai_path` to one of `auto` / `api` / `host-native` / `manual`; the page presents these as explicit choices.
- **Color candidates carry the user-facing core `palette`**: `background`, `secondary_bg`, `primary`, `accent`, `secondary_accent`, and `body_text`. The page renders labelled swatches and offers per-role override inputs for precise single-role edits, plus a **Custom color card with a free-text box** (parallel to the custom typography box) — the user can describe the palette in words or paste HEX values instead of filling each role; this writes `color: { "name": "custom", "custom": "<text>" }` to `result.json` for the AI to interpret. Legacy `text` is accepted as an alias for `body_text`, but new files should write `body_text`. Strategist derives secondary text, borders, state colors, and visual-style neutral tiers later when writing `design_spec.md` / `spec_lock.md`; those are not user-facing confirmation choices.
-- **Candidate display text may be bilingual**: color / typography candidates can provide `name_zh` / `name_en` and `note_zh` / `note_en`; the page falls back to legacy `name` / `note`.
+- **Candidate display text may be multilingual**: color / typography candidates can provide `name_zh` / `name_en` / `name_ja` and `note_zh` / `note_en` / `note_ja`; the page falls back to legacy `name` / `note`. Labels resolve in the page language first, then fall back across the others (a `ja` page: ja → en → zh; zh/en pages keep their zh↔en fallback and try `_ja` last), so when `lang` is `ja` always include the `_ja` variants — otherwise the candidate labels render in English.
- **Typography candidates split CJK and Latin** for both `heading` and `body`; `css` is the fallback preview `font-family` stack. The page previews CJK sample text with `cjk + css` and Latin sample text with `latin + css`, so the two script choices are visible independently. Each candidate should include topic-matched `sample_heading`, `sample_heading_latin`, `sample_body`, and `sample_body_latin`; do not reuse unrelated fixed examples such as a digital-transformation headline for a travel, education, product, or brand deck. Each candidate should also include `body_size` — the body baseline in **px** (the system's only unit, every canvas). The initial value comes from the candidate's `body_size`, sized for the recommended delivery purpose: `text` ~20 · `balanced` ~24 · `presentation` ~32. On submit the page writes `typography.body_size` as px directly — no pt conversion, no `body_size_pt` provenance. The page exposes `body_size` as an editable numeric field whose hint shows the recommended size — **one fixed px per delivery purpose on PPT (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (non-PPT ≈2.5–3.3% of height in px). The user may still edit it; an out-of-range flag only warns if the value strays far (e.g. a unit mistake). **Inputs are independent — the hint updates with canvas / delivery purpose but never rewrites a value the user can see.** It also offers a custom typography text box so the user is not limited to the proposed candidates.
- **Per-role size override** (parallel to color's per-role HEX override): besides `body_size`, the page exposes **independent** editable inputs for `title` / `subtitle` / `annotation`. Each role is pre-filled **once** with a starting value — the candidate's `typography.sizes[role]` if provided, otherwise a one-time ramp suggestion (`body × ` mid-band ratio) — and then holds its own value. **There is no cross-field cascade**: changing `body_size`, `delivery_purpose`, or canvas updates only the recommended-value hint, never the role values; a re-render preserves exactly what the user sees. The final values are written to `result.json` as `typography.sizes: { "title", "subtitle", "annotation" }` in **px** — every canvas, no pt and no `sizes_pt` provenance. Seeding `sizes` in a candidate is optional — omit it and each role gets its one-time ramp suggestion.
- **`delivery_purpose`** (enumerable, PPT only) is the primary driver of the body baseline: `text` (read-close), `balanced` (business, the default), `presentation`. It is surfaced in the **§c key-information area** (beside audience, Tier 1) as a consumption-mode choice; the Tier-2 typography section then reads the confirmed value for the recommended body px — the pick itself does not rewrite the body field (inputs are independent). `recommend.delivery_purpose` pre-selects one (default `balanced`); the user's pick writes back to `result.json.delivery_purpose` as a plain id. Strategist uses it to set the px body baseline — **one fixed px per purpose (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (see [strategist.md §g](../../references/strategist.md)). Non-PPT canvases omit it.
- **Combined style preview** — a compact live "overall impression" strip sits just above the color section and is **sticky**: it pins under the topbar so it stays visible while the user scrolls through the color / icon / typography sections, keeping the picking controls and their combined effect on screen together. It applies the currently selected color palette **and** typography (heading sample in `primary` over `background`, body sample in `body_text`, an `accent` bar, a `secondary_bg` chip) and repaints on every color / HEX-override / font / `body_size` change. It does not replace the per-candidate swatches or font samples (those stay for picking); it is deliberately an abstract style chip, **not** a slide-layout preview — page layout preview remains the live-preview server's job (Step 6). No schema field; it derives entirely from the existing color + typography selections.
- **Generated image style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` includes `ai`. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.
-- **`visual_style_spectrum`** (optional) lets the AI surface the deck's aesthetic as a **personality spectrum** instead of one badged style. Each entry is `{ "id", "tag_zh"/"tag_en", "note_zh"/"note_en" }` where `id` is a real `visual_styles` catalog id; the page badges those chips with their temperament `tag` (replacing the single ★) and appends the `note` (a real-world analogy) inline. The full grouped style list and Custom box stay visible below, and `recommend.visual_style` is still the pre-selected default (it should equal the spectrum's safe pick). Author **≥3** spanning safe / shifted / bold (mirrors h.5; honest-shortfall exception applies — fewer only when the constraints genuinely cannot yield 3). The user's pick still writes back to `result.json.visual_style` as a plain id; the spectrum is presentation-only. Omit the field to fall back to the single-recommendation badge.
+- **`visual_style_spectrum`** (optional) lets the AI surface the deck's aesthetic as a **personality spectrum** instead of one badged style. Each entry is `{ "id", "tag_zh"/"tag_en"/"tag_ja", "note_zh"/"note_en"/"note_ja" }` (include the `_ja` variants when `lang` is `ja`) where `id` is a real `visual_styles` catalog id; the page badges those chips with their temperament `tag` (replacing the single ★) and appends the `note` (a real-world analogy) inline. The full grouped style list and Custom box stay visible below, and `recommend.visual_style` is still the pre-selected default (it should equal the spectrum's safe pick). Author **≥3** spanning safe / shifted / bold (mirrors h.5; honest-shortfall exception applies — fewer only when the constraints genuinely cannot yield 3). The user's pick still writes back to `result.json.visual_style` as a plain id; the spectrum is presentation-only. Omit the field to fall back to the single-recommendation badge.
- `recommend.generation_mode` and `refine_spec` mirror the two mandatory notes in SKILL.md Step 4. Confirmed `generation_mode: "split"` / `refine_spec: true` are explicit user choices, equivalent to opting in through chat.
- `content_divergence` is a **free-text** field shown right under the audience box in §c — the user states in their own words how closely to follow the source vs how freely to reshape it (e.g. "stick closely to the document" / "freely restructure and expand within the source"). It is **not** a fixed-option field; blank means a balanced default. Whatever the level, facts stay sourced — reshaping develops what is in the source, never imports facts from outside it. The Strategist consumes the prose when authoring the §IX outline and records it in `design_spec.md §I`; it is **not** written to `spec_lock.md` (the Executor never reads it). It carries no page-count coupling and no source-signal recommendation — it is purely the user's stated intent. Beautify / template-fill keep content verbatim and do not surface this field.
-- `lang` is a soft default; an explicit user language choice in the page (persisted to `localStorage`) wins.
+- `lang` is a soft default (`zh` / `en` / `ja` — the page UI supports all three); an explicit user language choice in the page (persisted to `localStorage`) wins.
### Output — `result.json` (written on submit, read by the AI)
diff --git a/skills/ppt-master/scripts/svg_editor/static/app.js b/skills/ppt-master/scripts/svg_editor/static/app.js
index d91044eb..40c8763f 100644
--- a/skills/ppt-master/scripts/svg_editor/static/app.js
+++ b/skills/ppt-master/scripts/svg_editor/static/app.js
@@ -83,6 +83,82 @@
nav_counter: "{current} / {total}",
nav_empty: "— / —"
},
+ ja: {
+ page_title: "PPT Master - ライブプレビュー",
+ panel_slides: "スライド",
+ panel_annotations: "注釈",
+ panel_edit_annotate: "編集 / 注釈",
+ placeholder_select_slide: "左のスライドを選択して開始",
+ label_selected_element: "選択中の要素",
+ empty_selected_element: "スライド上の要素をクリックして選択",
+ btn_select_group: "親グループを選択",
+ label_batch_edit: "一括編集",
+ label_group_edit: "グループ編集",
+ section_geometry: "位置・サイズ",
+ section_style: "スタイル",
+ section_text_style: "テキスト",
+ section_raw_attrs: "生の属性",
+ label_edit_instruction: "編集指示",
+ pending_none: "未適用の変更はありません",
+ pending_summary: "直接編集{edits}件、AI注釈のあるページ{annotations}件が未適用",
+ pending_pages: "対象ページ:{pages}",
+ quick_align: "整列 / 移動",
+ quick_resize: "サイズ変更",
+ quick_replace_image: "画像を差し替え",
+ quick_copy: "文言を修正",
+ quick_relayout: "この領域を再レイアウト",
+ placeholder_annotation: "この要素をAIにどう修正してほしいか記述…",
+ placeholder_annotation_multi: "選択した{count}個の要素をどう修正するか記述…",
+ btn_add_annotation: "注釈を追加",
+ label_annotations_on_slide: "このスライドの注釈",
+ btn_submit_annotations: "変更を適用",
+ btn_exit_preview: "プレビューを終了",
+ modal_submit: "送信",
+ modal_cancel: "キャンセル",
+ empty_waiting_slides: "スライドの生成を待っています…",
+ empty_no_slides: "スライドが見つかりません",
+ placeholder_live_ready: "ライブプレビュー準備完了。生成されたスライドがここに表示されます。",
+ placeholder_slide_writing: "スライドはまだ書き込み中です。次の更新を待っています…",
+ empty_annotations: "注釈はまだありません",
+ tooltip_remove_annotation: "注釈を削除",
+ multi_selected: "{count}個の要素を選択中",
+ multi_mixed: "混在",
+ err_load_slides: "スライド一覧の読み込みに失敗: ",
+ err_load_slide: "スライドの読み込みに失敗: ",
+ err_add_annotation: "注釈の追加に失敗: ",
+ err_remove_annotation: "注釈の削除に失敗: ",
+ err_save: "保存に失敗: ",
+ err_edit: "編集に失敗: ",
+ label_direct_edit: "オブジェクト属性(「変更を適用」までは保留)",
+ prop_multiline_hint: "複数行テキストです — 文字を編集するには1行(tspan)を選択してください",
+ edit_saved_hint: "変更を一時保存しました。「変更を適用」で svg_output に書き込まれます。",
+ btn_undo: "元に戻す",
+ undo_done: "直前の一時保存済み編集を取り消しました",
+ undo_empty: "取り消せる編集はありません",
+ overlap_caption: "要素が重なっています — 1つ選択してください",
+ err_empty_svg: "スライドは読み込めましたがキャンバスが空です。SVGが不正か、ルート<svg>要素がない可能性があります。",
+ warn_icon_inline: "{count}個のアイコンを描画できませんでした: {names}",
+ warn_svg_no_dims: "SVGにwidth/height属性がありません。shared-standards.md §4に厳密に従い、SVGルート要素にwidthとheightを含めるようAIに依頼してください。",
+ warn_matrix_transform: "このジオメトリ編集は transform matrix として保存されます。プレビューは正確ですが、PPTX出力にはmatrix対応の現行エクスポーターが必要です。",
+ modal_matrix_transform_note: "\n\n注意:一時保存済みのジオメトリ編集に transform matrix を使うものがあります。matrixが反映されるよう、現行のPPTXエクスポーターで再エクスポートしてください。",
+ slide_error_tooltip: "このスライドの解析に失敗: ",
+ reload_banner: "このスライドはディスク上で更新されました。クリックで再読み込み。",
+ modal_confirm_submit: "一時保存済みの直接編集とAI注釈をディスクに書き込みますか?\n\nプレビューサービスは動き続けます。止めたいときは「プレビューを終了」を押してください。",
+ modal_success_submit: "変更を svg_output に保存しました。\n\nプレビューサービスは引き続き動作中です。",
+ modal_success_direct_only: "変更を svg_output に保存しました。\n\n直接編集はSVGソースに反映済みです。PPTXを更新したいときは、チャットに戻って再エクスポートを依頼してください。プレビューサービスは引き続き動作中です。",
+ modal_success_annotations_only: "注釈を svg_output に保存しました。\n\nAIに注釈を解釈・反映させたいときは、チャットに戻って注釈の適用を依頼してください。プレビューサービスは引き続き動作中です。",
+ modal_success_mixed: "直接編集と注釈を svg_output に保存しました。\n\nチャットに戻ってAI判断が必要な注釈の適用を先に依頼し、確認できたらPPTXを再エクスポートしてください。プレビューサービスは引き続き動作中です。",
+ modal_confirm_exit: "プレビューを終了してローカルサーバーを停止しますか?\n\n未適用の編集と注釈は破棄されます。",
+ modal_success_exit: "プレビューを停止しました。\n\nこのタブを閉じてチャットに戻れます。",
+ modal_stopping: "プレビューサーバーを停止しています…",
+ lang_toggle_title: "言語を切り替え",
+ nav_first: "最初のスライド (Home)",
+ nav_prev: "前のスライド (←)",
+ nav_next: "次のスライド (→)",
+ nav_last: "最後のスライド (End)",
+ nav_counter: "{current} / {total}",
+ nav_empty: "— / —"
+ },
zh: {
page_title: "PPT Master - 实时预览",
panel_slides: "幻灯片",
@@ -164,10 +240,12 @@
var LANG = (function () {
try {
var stored = window.localStorage.getItem("ppt_lang");
- if (stored === "zh" || stored === "en") return stored;
+ if (stored === "zh" || stored === "en" || stored === "ja") return stored;
} catch (e) { /* ignore */ }
var nav = (navigator.language || navigator.userLanguage || "en").toLowerCase();
- return nav.indexOf("zh") === 0 ? "zh" : "en";
+ if (nav.indexOf("zh") === 0) return "zh";
+ if (nav.indexOf("ja") === 0) return "ja";
+ return "en";
})();
function t(key, params) {
@@ -184,7 +262,7 @@
}
function applyI18n() {
- document.documentElement.setAttribute("lang", LANG === "zh" ? "zh-CN" : "en");
+ document.documentElement.setAttribute("lang", LANG === "zh" ? "zh-CN" : (LANG === "ja" ? "ja" : "en"));
document.title = t("page_title");
document.querySelectorAll("[data-i18n]").forEach(function (el) {
el.textContent = t(el.getAttribute("data-i18n"));
@@ -198,16 +276,27 @@
updateNavLabel();
}
+ var LANG_NAMES = { zh: "中文", en: "English", ja: "日本語" };
+
+ function refreshLangUI(lang) {
+ // Custom dropdown (OS-independent): button shows the CURRENT language.
+ var cur = document.getElementById("lang-current");
+ if (cur) cur.textContent = LANG_NAMES[lang] || lang;
+ var btn = document.getElementById("btn-lang-toggle");
+ if (btn) btn.title = t("lang_toggle_title");
+ document.querySelectorAll("#lang-menu li").forEach(function (li) {
+ var selected = li.getAttribute("data-lang") === lang;
+ li.classList.toggle("selected", selected);
+ li.setAttribute("aria-selected", selected ? "true" : "false");
+ });
+ }
+
function setLang(lang) {
- if (lang !== "zh" && lang !== "en") return;
+ if (lang !== "zh" && lang !== "en" && lang !== "ja") return;
LANG = lang;
try { window.localStorage.setItem("ppt_lang", lang); } catch (e) { /* ignore */ }
applyI18n();
- var toggleBtn = document.getElementById("btn-lang-toggle");
- if (toggleBtn) {
- toggleBtn.textContent = lang === "zh" ? "EN" : "中";
- toggleBtn.title = t("lang_toggle_title");
- }
+ refreshLangUI(lang);
// Re-render dynamic regions so they pick up the new language
updateSelectionPanel();
updateAnnotationList();
@@ -336,7 +425,7 @@
btn.textContent = t(action.key);
btn.addEventListener("click", function () {
var label = t(action.key);
- var prefix = LANG === "zh" ? label + ":" : label + ": ";
+ var prefix = (LANG === "zh" || LANG === "ja") ? label + ":" : label + ": ";
if (!annotationText.value.trim()) {
annotationText.value = prefix;
} else if (annotationText.value.indexOf(prefix) === -1) {
@@ -2781,11 +2870,73 @@
initAnnotationQuickActions();
updatePendingStatus();
var langToggleBtn = document.getElementById("btn-lang-toggle");
- if (langToggleBtn) {
- langToggleBtn.textContent = LANG === "zh" ? "EN" : "中";
- langToggleBtn.title = t("lang_toggle_title");
- langToggleBtn.addEventListener("click", function () {
- setLang(LANG === "zh" ? "en" : "zh");
+ var langMenu = document.getElementById("lang-menu");
+ if (langToggleBtn && langMenu) {
+ refreshLangUI(LANG);
+ var setMenuOpen = function (open) {
+ langMenu.hidden = !open;
+ langToggleBtn.setAttribute("aria-expanded", open ? "true" : "false");
+ if (open) {
+ var sel = langMenu.querySelector("li.selected") || langMenu.querySelector("li[data-lang]");
+ if (sel) sel.focus();
+ }
+ };
+ var chooseLang = function (v) {
+ setMenuOpen(false);
+ langToggleBtn.focus();
+ if (v) setLang(v);
+ };
+ langToggleBtn.addEventListener("click", function (e) {
+ e.stopPropagation();
+ setMenuOpen(langMenu.hidden);
+ });
+ langToggleBtn.addEventListener("keydown", function (e) {
+ if (e.key === "Escape" && !langMenu.hidden) {
+ e.stopPropagation();
+ setMenuOpen(false);
+ } else if ((e.key === "ArrowDown" || e.key === "ArrowUp") && langMenu.hidden) {
+ e.preventDefault();
+ e.stopPropagation();
+ setMenuOpen(true);
+ }
+ });
+ langMenu.addEventListener("click", function (e) {
+ e.stopPropagation();
+ var li = e.target && e.target.closest ? e.target.closest("li[data-lang]") : null;
+ if (li) chooseLang(li.getAttribute("data-lang"));
+ else setMenuOpen(false);
+ });
+ langMenu.addEventListener("keydown", function (e) {
+ e.stopPropagation(); // keep nudge / slide-nav shortcuts away while the menu is open
+ var items = Array.prototype.slice.call(langMenu.querySelectorAll("li[data-lang]"));
+ var idx = items.indexOf(document.activeElement);
+ if (e.key === "Escape") {
+ setMenuOpen(false);
+ langToggleBtn.focus();
+ } else if (e.key === "ArrowDown") {
+ e.preventDefault();
+ (items[idx + 1] || items[0]).focus();
+ } else if (e.key === "ArrowUp") {
+ e.preventDefault();
+ (items[idx - 1] || items[items.length - 1]).focus();
+ } else if (e.key === "Home") {
+ e.preventDefault();
+ items[0].focus();
+ } else if (e.key === "End") {
+ e.preventDefault();
+ items[items.length - 1].focus();
+ } else if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
+ e.preventDefault();
+ } else if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ if (idx >= 0) chooseLang(items[idx].getAttribute("data-lang"));
+ }
+ });
+ langToggleBtn.parentElement.addEventListener("focusout", function (e) {
+ if (!langMenu.hidden && !langToggleBtn.parentElement.contains(e.relatedTarget)) setMenuOpen(false);
+ });
+ document.addEventListener("click", function () {
+ if (!langMenu.hidden) setMenuOpen(false);
});
}
diff --git a/skills/ppt-master/scripts/svg_editor/static/index.html b/skills/ppt-master/scripts/svg_editor/static/index.html
index f902e7eb..d6569933 100644
--- a/skills/ppt-master/scripts/svg_editor/static/index.html
+++ b/skills/ppt-master/scripts/svg_editor/static/index.html
@@ -30,7 +30,14 @@
</div>
</div>
<div id="panel-right">
- <button id="btn-lang-toggle" class="btn-lang-toggle" title="Switch language">中</button>
+ <div class="lang-select">
+ <button id="btn-lang-toggle" class="lang-select-btn" type="button" title="Switch language" aria-haspopup="listbox" aria-expanded="false"><span id="lang-current"></span><span class="lang-caret" aria-hidden="true">▾</span></button>
+ <ul id="lang-menu" class="lang-menu" role="listbox" hidden>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="zh">中文</li>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="en">English</li>
+ <li role="option" tabindex="0" aria-selected="false" data-lang="ja">日本語</li>
+ </ul>
+ </div>
<div class="panel-header" data-i18n="panel_edit_annotate">Edit / Annotate</div>
<div id="pending-status" class="pending-status"></div>
<div id="selection-info">
diff --git a/skills/ppt-master/scripts/svg_editor/static/style.css b/skills/ppt-master/scripts/svg_editor/static/style.css
index ce66a1c1..8200404a 100644
--- a/skills/ppt-master/scripts/svg_editor/static/style.css
+++ b/skills/ppt-master/scripts/svg_editor/static/style.css
@@ -528,29 +528,63 @@ body.svg-dragging * {
flex-shrink: 0;
}
-.btn-lang-toggle {
+.lang-select {
position: absolute;
top: 10px;
right: 12px;
- z-index: 2;
+ z-index: 5;
+}
+
+.lang-select-btn {
+ display: flex;
+ align-items: center;
+ gap: 5px;
min-width: 34px;
padding: 3px 10px;
font-size: 12px;
font-weight: 600;
color: #c0c0d8;
- background: transparent;
+ background: #1e1e3a;
border: 1px solid #3a3a5a;
border-radius: 4px;
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
-.btn-lang-toggle:hover {
+.lang-select-btn:hover {
color: #ffffff;
background: #2a2a4a;
border-color: #5a5a7a;
}
+.lang-caret { font-size: 9px; color: #8a8aa8; }
+
+.lang-menu {
+ position: absolute;
+ right: 0;
+ top: calc(100% + 4px);
+ margin: 0;
+ padding: 4px;
+ list-style: none;
+ min-width: 96px;
+ background: #1e1e3a;
+ border: 1px solid #3a3a5a;
+ border-radius: 6px;
+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
+}
+
+.lang-menu li {
+ padding: 6px 10px;
+ border-radius: 4px;
+ font-size: 12px;
+ color: #c0c0d8;
+ cursor: pointer;
+}
+
+.lang-menu li:hover,
+.lang-menu li:focus { background: #2a2a4a; color: #ffffff; }
+.lang-menu li.selected { color: #ffffff; font-weight: 600; }
+
#btn-save {
padding: 11px 0;
font-size: 14px;
diff --git a/skills/ppt-master/workflows/beautify-pptx.md b/skills/ppt-master/workflows/beautify-pptx.md
index 13dbeb47..08f192d1 100644
--- a/skills/ppt-master/workflows/beautify-pptx.md
+++ b/skills/ppt-master/workflows/beautify-pptx.md
@@ -176,14 +176,14 @@ Write `<project_path>/confirm_ui/recommendations.json` and launch the same confi
"page_count": <source-slide-count>,
"audience": "<carry over from the deck's apparent audience, or leave blank>",
"color": { "selected": 0, "candidates": [
- { "name_zh": "复刻源 PPT(推荐)", "name_en": "Source replica (recommended)", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
- { "name_zh": "实际用色(observed)", "name_en": "Observed palette", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
- { "name_zh": "备选配色 A", "name_en": "Alternative palette A", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } }
+ { "name_zh": "复刻源 PPT(推荐)", "name_en": "Source replica (recommended)", "name_ja": "元PPTを再現(推奨)", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
+ { "name_zh": "实际用色(observed)", "name_en": "Observed palette", "name_ja": "実際の使用色(observed)", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
+ { "name_zh": "备选配色 A", "name_en": "Alternative palette A", "name_ja": "代替配色A", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } }
] },
"typography": { "selected": 0, "candidates": [
- { "name_zh": "复刻源 PPT(推荐)", "name_en": "Source replica (recommended)", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <dominant observed.sizes_pt × 4/3, as px> },
- { "name_zh": "实际字体(observed)", "name_en": "Observed fonts", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <dominant observed.sizes_pt × 4/3, as px> },
- { "name_zh": "备选字体 A", "name_en": "Alternative pairing A", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <canvas-appropriate baseline> }
+ { "name_zh": "复刻源 PPT(推荐)", "name_en": "Source replica (recommended)", "name_ja": "元PPTを再現(推奨)", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <dominant observed.sizes_pt × 4/3, as px> },
+ { "name_zh": "实际字体(observed)", "name_en": "Observed fonts", "name_ja": "実際のフォント(observed)", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <dominant observed.sizes_pt × 4/3, as px> },
+ { "name_zh": "备选字体 A", "name_en": "Alternative pairing A", "name_ja": "代替ペアリングA", "heading": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body": { "cjk": "...", "latin": "...", "css": "<PPT-safe stack>" }, "body_size": <canvas-appropriate baseline> }
] }
}
```
diff --git a/skills/ppt-master/workflows/live-preview.md b/skills/ppt-master/workflows/live-preview.md
index a80b3663..3238ff5e 100644
--- a/skills/ppt-master/workflows/live-preview.md
+++ b/skills/ppt-master/workflows/live-preview.md
@@ -73,7 +73,7 @@ Triggered by the user signals listed in "When to Run".
## Notes (editor invariants — referenced from SKILL.md Step 6)
-- **UI**: bilingual (EN/中); auto-detects from `navigator.language`, persists in `localStorage`, toggled via the **中 / EN** button on the right panel. The right panel is an **Edit / Annotate** surface: direct SVG edits and AI-needed annotations are visually separated, with a pending-status strip showing staged direct edits and pages with unsaved annotations. Slide navigation: first/prev/next/last buttons at the top of the center panel, plus `←` / `→` / `Home` / `End` (suppressed while typing in the annotation textarea).
+- **UI**: trilingual (中文 / English / 日本語); auto-detects from `navigator.language`, persists in `localStorage`, switched via the language dropdown on the right panel. The right panel is an **Edit / Annotate** surface: direct SVG edits and AI-needed annotations are visually separated, with a pending-status strip showing staged direct edits and pages with unsaved annotations. Slide navigation: first/prev/next/last buttons at the top of the center panel, plus `←` / `→` / `Home` / `End` (suppressed while typing in the annotation textarea).
- **Buttons**: `Add annotation` stages annotation text in memory; `Apply changes` writes staged direct edits plus annotation markers to disk and keeps the service running; `Exit preview` is the only UI action that stops Flask.
- **Direct edit (no AI)**: selection mode determines the right-panel surface. Single element = full object inspector (geometry, safe text content, computed text styles for the selected text node or descendant text inside a selected textbox/group, raw SVG attributes except protected fields like `id`, UI `class`, event handlers, and hrefs). SVG `<g>` group = group-level edit surface; select via `Alt/Option` + click or **Select parent group** from a child element. Multi-select = limited batch editor over top-level selected objects only: shared x/y plus `fill` / `stroke` / `opacity`; text style fields (`font-size` / `font-family` / `font-weight` / `text-anchor`) appear only when every selected object is `text`/`tspan`. Preview updates immediately; disk writes wait for **Apply changes**.
- **Drag to move**: press and drag an already-selected element on the canvas to reposition it (selection stays a separate click, so the background is never dragged by accident); the whole selection moves together under multi-select. The pointer delta is mapped through each element's own CTM, so moves track the cursor regardless of viewport scale or group transforms. Each release stages one direct edit per moved element (the same `x`/`y`-or-`transform` write the geometry inputs produce), previewed live and written only on **Apply changes**; dragging on empty canvas is still rubber-band selection. A failed stage rolls the canvas back to the pre-drag position.