egatari 0.6.9 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.ja.md +151 -116
  3. package/README.md +145 -116
  4. package/bin/egatari.mjs +10 -7
  5. package/components.lock.json +12 -6
  6. package/components2.lock.json +151 -1
  7. package/kit/check-messages.mjs +123 -114
  8. package/kit/check.mjs +12 -8
  9. package/kit/core/article-messages.mjs +7 -7
  10. package/kit/core/build-core.mjs +8 -8
  11. package/kit/core/check-parity.mjs +1 -1
  12. package/kit/core/check-source.mjs +4 -0
  13. package/kit/core/colab-core.mjs +1 -1
  14. package/kit/core/llm-fix.mjs +15 -15
  15. package/kit/core/llm-insert.mjs +7 -7
  16. package/kit/core/llm-outline.mjs +6 -6
  17. package/kit/core/llm-pack-data.mjs +33 -33
  18. package/kit/core/narration-parse.mjs +3 -3
  19. package/kit/core/new-deck.mjs +1 -1
  20. package/kit/core/predict-steps.mjs +46 -0
  21. package/kit/core/template-text.mjs +2 -2
  22. package/kit/instruction-version.json +1 -1
  23. package/kit/player.json +1 -1
  24. package/kit/player.lock.json +2 -2
  25. package/kit/templates/new-deck.mjs +1 -1
  26. package/package.json +1 -1
  27. package/render/only.mjs +2 -2
  28. package/render/render.mjs +4 -4
  29. package/tools/ids.mjs +7 -7
  30. package/vendor/components/CATALOG.md +1 -1
  31. package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/README.en.md +32 -0
  32. package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/index.js +352 -0
  33. package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/README.en.md +40 -0
  34. package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/index.js +341 -0
  35. package/vendor/components-2/manifest-2.6.2.json +2104 -0
@@ -1,11 +1,12 @@
1
1
  // 品質チェック(kit/check.mjs)の指摘の言葉(日本語・英語)。どの指摘も「何が違うか」と「どう直すか」を言い、規格があればその名前
2
- // (docs/authoring-with-llms.md の R-…)を添える。どこか(スライドの番号・id・見出し、段階)は check.mjs が前に付ける
2
+ // (docs/authoring-with-llms.md の R-…)を添える。どこか(スライドの番号・id・見出し、ステップ)は check.mjs が前に付ける
3
3
  // MESSAGES[code] = {rule?, ja(a), en(a)} a はその知らせの値。rule は規格の名前の文字列か、a から決める関数(ruleOf)
4
- // where(lang, {n, id, title, step}) 「スライド 3「見出し」(s-k3f9q2)、段階 2」 / "Slide 3 “Heading” (s-k3f9q2), step 2"
4
+ // where(lang, {n, id, title, step}) 「スライド 3「見出し」(s-k3f9q2)、ステップ 2」 / "Slide 3 “Heading” (s-k3f9q2), step 2"
5
5
  import { CLIP_ATTR } from './core/layout-scan.mjs';
6
6
  import { catalogueMessage } from './core/parts2.mjs';
7
7
  import { DEFAULT_METRICS, limitsOf } from './core/theme-metrics.mjs';
8
8
  import { quoteJa } from './core/quote-ja.mjs';
9
+ import { PREDICT_COUNT_STEP } from './core/predict-steps.mjs';
9
10
  import { ARTICLE_MESSAGES, articleMessage } from './core/article-messages.mjs';
10
11
 
11
12
  // 値にないときの既定(テーマの寸法の既定。kit/core/theme-metrics.mjs):結論の行の上端・1 行の高さ・横の右の限り
@@ -16,12 +17,12 @@ const moreJa = (a) => (a.n > 1 ? ` ほか ${a.n - 1} か所` : '');
16
17
  const moreEn = (a) => (a.n > 1 ? ` and ${a.n - 1} more` : '');
17
18
  // 表紙と章の扉に置ける子要素(kit/layouts.css の .cover・.sec。docs/reference.md「Sections and classes」)。textOffSlide・textOverlap が添える
18
19
  const PLACE_JA = {
19
- cover: '。表紙に置けるのは .venue(会場)・h1(題名)・.au(著者・所属)で、ロゴはテーマが入れる。副題は h1 の 2 行目(<br> のあと)か .venue に書く。ほかの字を足すなら、デッキの <style> で position:absolute と top を決めて空いた場所に置く',
20
- sec: '。章の扉に置けるのは h1(章の名前)と .lead(一言)。ほかの字を足すなら、デッキの <style> で position:absolute と top を決めて空いた場所に置く',
20
+ cover: '。表紙に置けるのは .venue(会場)・h1(題名)・.au(著者・所属)で、ロゴはテーマが入れる。副題は h1 の 2 行目(<br> のあと)か .venue に書く。ほかの字を足すなら、教材の <style> で position:absolute と top を決めて空いた場所に置く',
21
+ sec: '。章の扉に置けるのは h1(章の名前)と .lead(一言)。ほかの字を足すなら、教材の <style> で position:absolute と top を決めて空いた場所に置く',
21
22
  };
22
23
  const PLACE_EN = {
23
- cover: '; a cover holds .venue (venue), h1 (title) and .au (authors, affiliation), and the theme adds the logos: put a subtitle on a second line of the h1 (after <br>) or in .venue, and place any other text in free space with position:absolute and top in the deck\'s <style>',
24
- sec: '; a section divider holds h1 (chapter name) and .lead (one line): place any other text in free space with position:absolute and top in the deck\'s <style>',
24
+ cover: '; a cover holds .venue (venue), h1 (title) and .au (authors, affiliation), and the theme adds the logos: put a subtitle on a second line of the h1 (after <br>) or in .venue, and place any other text in free space with position:absolute and top in the lesson\'s <style>',
25
+ sec: '; a section divider holds h1 (chapter name) and .lead (one line): place any other text in free space with position:absolute and top in the lesson\'s <style>',
25
26
  };
26
27
  const WHERE_JA = { slides: 'スライド', narration: '台本', article: '本' }, WHERE_EN = { slides: 'slides', narration: 'script', article: 'book' };
27
28
  const mibOf = (n) => (n / 1048576).toFixed(1) + ' MiB';
@@ -32,22 +33,22 @@ const ROLE_ALLOWED = {
32
33
  en: { pdf: 'PDF', data: 'CSV, TSV, JSON, text, xlsx', code: 'program source, text, ipynb, environment definitions (requirements.txt, pyproject.toml, environment.yml, …)', source: 'TeX, Markdown, text (e.g. BibTeX), docx', supplement: 'PNG, JPEG, WebP, PDF, text' },
33
34
  };
34
35
  const FORBID = {
35
- ja: { script: 'OS が実行する・スクリプトとして開く形式(.js・.bat・.ps1・.command など。JavaScript の原稿は .mjs・.cjs・.ts にする)', executable: '実行できるファイル', wasm: 'WebAssembly', 'office-legacy': '古い形式の Office(doc・xls・ppt)か RTF', 'office-macro': 'マクロを入れられる Office(docm・xlsm など)', html: 'HTML', svg: 'SVG', egatari: 'ほかの 1 ファイル(.ega.html)', archive: 'アーカイブ・入れ物(ZIP など)' },
36
- en: { script: 'a file type that operating systems run or open as a script (.js, .bat, .ps1, .command, …; attach JavaScript source as .mjs, .cjs or .ts)', executable: 'an executable', wasm: 'WebAssembly', 'office-legacy': 'a legacy Office document (doc, xls, ppt) or RTF', 'office-macro': 'a macro-enabled Office document (docm, xlsm, …)', html: 'HTML', svg: 'SVG', egatari: 'another single file (.ega.html)', archive: 'an archive or container (ZIP, …)' },
36
+ ja: { script: 'OS が実行する・スクリプトとして開く形式(.js・.bat・.ps1・.command など。JavaScript の原稿は .mjs・.cjs・.ts にする)', executable: '実行できるファイル', wasm: 'WebAssembly', 'office-legacy': '古い形式の Office(doc・xls・ppt)か RTF', 'office-macro': 'マクロを入れられる Office(docm・xlsm など)', html: 'HTML', svg: 'SVG', egatari: 'ほかの Egatari ファイル(.ega.html)', archive: 'アーカイブ・入れ物(ZIP など)' },
37
+ en: { script: 'a file type that operating systems run or open as a script (.js, .bat, .ps1, .command, …; attach JavaScript source as .mjs, .cjs or .ts)', executable: 'an executable', wasm: 'WebAssembly', 'office-legacy': 'a legacy Office document (doc, xls, ppt) or RTF', 'office-macro': 'a macro-enabled Office document (docm, xlsm, …)', html: 'HTML', svg: 'SVG', egatari: 'another Egatari file (.ega.html)', archive: 'an archive or container (ZIP, …)' },
37
38
  };
38
39
  const UNSAFE = {
39
40
  ja: { javascript: 'PDF に JavaScript がある', 'auto-action': 'PDF に開いたときに動く、文書の中へ移る(GoTo)のほかの動作(OpenAction・AA)がある', action: 'PDF に、文書の中へ移る(GoTo)とリンクを開く(URI)のほかの動作がある', launch: 'PDF にほかのプログラムを起こす動作(Launch)がある', 'embedded-file': 'PDF にファイルが埋め込まれている',
40
- 'active-content': 'PDF に動く中身(XFA・RichMedia)がある', macro: 'マクロ(vbaProject)がある', activex: 'ActiveX の部品がある', 'embedded-object': '埋め込んだ object(OLE など)がある',
41
+ 'active-content': 'PDF に動く中身(XFA・RichMedia)がある', macro: 'マクロ(vbaProject)がある', activex: 'ActiveX のコントロールがある', 'embedded-object': '埋め込んだ object(OLE など)がある',
41
42
  'external-link': '外のファイル・データへの参照(外部リンク)がある', 'external-data': '外のデータを取りにいく(接続・Web クエリ・WEBSERVICE などの関数)', dde: 'DDE を使う数式がある', 'field-code': '実行する・取りにいくフィールド(DDEAUTO・INCLUDETEXT など)がある', 'remote-template': '外のテンプレートを使う' },
42
43
  en: { javascript: 'the PDF contains JavaScript', 'auto-action': 'the PDF runs an action other than going to a place in the document (GoTo) when opened (OpenAction, AA)', action: 'the PDF has actions other than going to a place in the document (GoTo) and opening a link (URI)', launch: 'the PDF can launch programs (Launch)', 'embedded-file': 'the PDF carries embedded files',
43
44
  'active-content': 'the PDF has active content (XFA, RichMedia)', macro: 'the document contains macros (vbaProject)', activex: 'the document contains ActiveX controls', 'embedded-object': 'the document contains embedded objects (OLE, …)',
44
45
  'external-link': 'the document refers to external files or data (external links)', 'external-data': 'the document fetches external data (connections, web queries, functions such as WEBSERVICE)', dde: 'a formula uses DDE', 'field-code': 'a field code runs or fetches something (DDEAUTO, INCLUDETEXT, …)', 'remote-template': 'the document uses a remote template' },
45
46
  };
46
- const stepJa = (s) => (s === 'concl' ? '結論の段階' : `段階 ${s}`);
47
+ const stepJa = (s) => (s === 'concl' ? '結論のステップ' : `ステップ ${s}`);
47
48
  const stepEn = (s) => (s === 'concl' ? 'conclusion step' : `step ${s}`);
48
49
 
49
50
  export function where(lang, { n, id, title, step }) {
50
- if (n === null || n === undefined) return lang === 'en' ? 'Whole deck' : 'デッキ全体';
51
+ if (n === null || n === undefined) return lang === 'en' ? 'Whole lesson' : '教材全体';
51
52
  const st = step === null || step === undefined ? '' : (lang === 'en' ? ', ' + stepEn(step) : '、' + stepJa(step));
52
53
  return lang === 'en'
53
54
  ? `Slide ${n}${title ? ` “${title}”` : ''}${id ? ` (${id})` : ''}${st}`
@@ -61,7 +62,7 @@ function driftList(items, lang) {
61
62
  const m = Array.isArray(x.measured) ? (ja ? `本文の下端 ${x.measured[0]}〜${x.field === 'body.floor' ? `ページ番号の上端 ${x.measured[1]}` : x.measured[1]} の間のはず` : `should lie between the body bottom ${x.measured[0]} and ${x.field === 'body.floor' ? `the page number top ${x.measured[1]}` : x.measured[1]}`)
62
63
  : x.field === '--bar-h' ? (ja ? `${x.measured}px、720 − body.floor の ${x.declared}px まで` : `${x.measured}px, at most 720 − body.floor = ${x.declared}px`)
63
64
  : (ja ? `描いた箱は ${x.measured}` : `rendered ${x.measured}`);
64
- const by = x.by === 'deck' ? (ja ? '、デッキの CSS' : ', deck CSS') : (ja ? '、テーマの CSS' : ', theme CSS');
65
+ const by = x.by === 'deck' ? (ja ? '、教材の CSS' : ', lesson CSS') : (ja ? '、テーマの CSS' : ', theme CSS');
65
66
  return x.field === '--bar-h' ? `--bar-h ${m}${by}` : `${x.field} ${x.declared}${ja ? ':' : ': '}${m}${by}`;
66
67
  }).join(ja ? ';' : '; ');
67
68
  }
@@ -69,8 +70,8 @@ function driftHow(a, lang) {
69
70
  const ja = lang === 'ja', theme = (a.items || []).some((x) => x.by !== 'deck'), deck = (a.items || []).some((x) => x.by === 'deck');
70
71
  const t = theme ? (ja ? `テーマの CSS に合う metrics を theme.json に書く(node tools/theme-metrics.mjs measure ${a.theme} が描いた箱の値を出す)か、CSS を宣言に合わせる`
71
72
  : `write metrics in theme.json that match the theme's CSS (node tools/theme-metrics.mjs measure ${a.theme} prints the rendered values), or make the CSS match the declaration`) : '';
72
- const d = deck ? (ja ? 'デッキの <style> で体裁の箱(.body・.concl・見出し)を動かさない。動かすならテーマで動かし、テーマの metrics に宣言する(デッキの CSS では限りは変わらない)'
73
- : 'do not move the layout boxes (.body, .concl, the heading) in the deck\'s <style>; move them in a theme and declare them in its metrics (deck CSS does not change the limits)') : '';
73
+ const d = deck ? (ja ? '教材の <style> で体裁の箱(.body・.concl・見出し)を動かさない。動かすならテーマで動かし、テーマの metrics に宣言する(教材の CSS では限りは変わらない)'
74
+ : 'do not move the layout boxes (.body, .concl, the heading) in the lesson\'s <style>; move them in a theme and declare them in its metrics (lesson CSS does not change the limits)') : '';
74
75
  return [t, d].filter(Boolean).join(ja ? '。' : '; ');
75
76
  }
76
77
 
@@ -95,8 +96,8 @@ export const MESSAGES = {
95
96
  en: (a) => a.w + (/^narration: スライドが見つからない/.test(a.w) ? ': make the “## heading” in narration.md the same text as the slide heading, or end it with {#slide id} (R-headings)' : '') },
96
97
  // 鍵(見出し)の重なり(slide key: …)は R-headings。id の書式・id の重なりは規格の名前なし
97
98
  slideId: { rule: (a) => (/^slide key: /.test(a.msg) ? 'R-headings' : null), ja: (a) => a.msg, en: (a) => a.msg },
98
- legacyDataKey: { ja: (a) => `鍵「${a.key}」が手書きの data-key で決まっている(${a.line} 行目):<section> に id を付ける(npm run ids)`, en: (a) => `the slide key “${a.key}” comes from a hand-written data-key (line ${a.line}): give the <section> an id (npm run ids)` },
99
- legacyIndex: { ja: (a) => `見出しも id もないので、鍵が位置の「${a.key}」になり、スライドを足すと変わる(${a.line} 行目):<section> に id を付ける(npm run ids)`, en: (a) => `no heading and no id, so the key is the position “${a.key}” and changes when slides are added (line ${a.line}): give the <section> an id (npm run ids)` },
99
+ legacyDataKey: { ja: (a) => `スライドの id「${a.key}」が手書きの data-key で決まっている(${a.line} 行目):<section> に id を付ける(npm run ids)`, en: (a) => `the slide id “${a.key}” comes from a hand-written data-key (line ${a.line}): give the <section> an id (npm run ids)` },
100
+ legacyIndex: { ja: (a) => `見出しも id もないので、スライドの id が位置の「${a.key}」になり、スライドを足すと変わる(${a.line} 行目):<section> に id を付ける(npm run ids)`, en: (a) => `no heading and no id, so the slide id is the position “${a.key}” and changes when slides are added (line ${a.line}): give the <section> an id (npm run ids)` },
100
101
  // 1.0 の語彙にない書き方(format spec §8.0。kit/core/legacy-vocab.mjs)。警告だけ
101
102
  legacyColorClass: { ja: (a) => `クラス「${a.what}」は色の名前で、1.0 の語彙にない(${a.n} か所、最初は ${a.line} 行目):意味のクラス「${a.to}」にする(term は用語・問い、emph は結論・問題、muted は既知のこと)`,
102
103
  en: (a) => `the class “${a.what}” names a colour and is not in the 1.0 vocabulary (${a.n} place(s), first on line ${a.line}): use the meaning class “${a.to}” (term for terms and questions, emph for conclusions and problems, muted for known results)` },
@@ -109,82 +110,82 @@ export const MESSAGES = {
109
110
  en: (a) => (a.kind === 'hue'
110
111
  ? `a colour derived by changing the hue (relative colour syntax) is a new colour without a role (${a.n} place(s), first on line ${a.line}: ${a.list}); to follow the theme, use the role colour as it is (var(--emph) …); to make it lighter, mix the role with --bg in color-mix(), and when only lightness or opacity changes keep the hue h`
111
112
  : `colours are written directly (${a.n} place(s), first on line ${a.line}: ${a.list}); to follow the theme, use its classes (term, emph, muted) or variables var(--fg) var(--term) var(--emph) var(--muted) var(--accent2) var(--line) var(--lit)`) },
112
- legacyLectureMode: { ja: (a) => `<html data-mode="lecture"> は 1.0 の語彙にない(${a.line} 行目):見せ方は再生の設定の「先のステップを薄く見せる」で選ぶ。原稿からは外す`,
113
- en: (a) => `<html data-mode="lecture"> is not in the 1.0 vocabulary (line ${a.line}): the participant chooses “Show later steps faintly” in the player; remove it from the source` },
114
- narrHeadingDiffers: { rule: 'R-headings', ja: (a) => `narration.md ${a.line} 行目の見出し${quoteJa(a.heading)}がスライドの見出し${quoteJa(a.slide)}と違う({#${a.id}} で対応しているので動きは変わらない)`, en: (a) => `the narration heading “${a.heading}” (narration.md line ${a.line}) differs from the slide heading “${a.slide}” (matched by {#${a.id}}, so nothing breaks)` },
113
+ legacyLectureMode: { ja: (a) => `<html data-mode="lecture"> は 1.0 の語彙にない(${a.line} 行目):見せ方は再生の設定の「先のステップを薄く見せる」で選ぶ。スライド(deck.html)からは外す`,
114
+ en: (a) => `<html data-mode="lecture"> is not in the 1.0 vocabulary (line ${a.line}): the participant chooses “Show later steps faintly” in the player; remove it from the slides (deck.html)` },
115
+ narrHeadingDiffers: { rule: 'R-headings', ja: (a) => `narration.md ${a.line} 行目の見出し${quoteJa(a.heading)}がスライドの見出し${quoteJa(a.slide)}と違う({#${a.id}} で対応しているので動きは変わらない)`, en: (a) => `the script heading “${a.heading}” (narration.md line ${a.line}) differs from the slide heading “${a.slide}” (matched by {#${a.id}}, so nothing breaks)` },
115
116
  // ---------------------------------------------------------------- リンク
116
- linkFileMissing: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のファイル ${a.file} が作業フォルダから見つからない:ファイルを置くか、リンクを直す(1 ファイル(.ega.html)には入らない)`, en: (a) => `the link “${a.text}” (href="${a.href}") points to ${a.file}, which is not in the working folder: add the file or fix the link (it is not packed into the single file (.ega.html))` },
117
+ linkFileMissing: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のファイル ${a.file} が作業フォルダから見つからない:ファイルを置くか、リンクを直す(Egatari ファイル(.ega.html)には入らない)`, en: (a) => `the link “${a.text}” (href="${a.href}") points to ${a.file}, which is not in the working folder: add the file or fix the link (it is not packed into the Egatari file (.ega.html))` },
117
118
  linkEmpty: { ja: (a) => `リンク「${a.text}」(href="${a.href}")に行き先がない(# だけ):href="#<スライドの id>" にする`, en: (a) => `the link “${a.text}” (href="${a.href}") has no target (only #): use href="#<slide id>"` },
118
- linkUnknown: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の行き先のスライド「${a.slide}」がない:あるスライドの id(npm run ids で付けたもの)を書く`, en: (a) => `the link “${a.text}” (href="${a.href}") points to slide “${a.slide}”, which does not exist: use the id of an existing slide (from npm run ids)` },
119
- linkNumberRange: { ja: (a) => `リンク「${a.text}」(href="${a.href}")のスライド ${a.slide} がない(${a.count} 枚):スライドの id で #<id> と書く`, en: (a) => `the link “${a.text}” (href="${a.href}") points to slide ${a.slide}, but the deck has ${a.count}: link by slide id, #<id>` },
120
- linkNoConcl: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のスライド「${a.slide}」に結論(.concl)の段階がない::concl を外すか、段階の番号にする`, en: (a) => `the link “${a.text}” (href="${a.href}") asks for the conclusion step of “${a.slide}”, which has none: drop :concl or use a step number` },
121
- linkStepRange: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のスライド「${a.slide}」に段階 ${a.step} がない(段階は 0〜${a.max}${a.concl ? '、結論は concl' : ''}):ある段階にする`, en: (a) => `the link “${a.text}” (href="${a.href}") asks for step ${a.step} of “${a.slide}”, which has steps 0–${a.max}${a.concl ? ' and concl' : ''}: use an existing step` },
122
- linkBadStep: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の段階の鍵「${a.step}」が読めない:0・1・… か concl にする`, en: (a) => `the link “${a.text}” (href="${a.href}") has an unreadable step key “${a.step}”: use 0, 1, … or concl` },
119
+ linkUnknown: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の行き先のスライド「${a.slide}」がない:あるスライドの id(npm run ids で付けたもの)を書く`, en: (a) => `the link “${a.text}” (href="${a.href}") points to slide “${a.slide}”, which does not exist: use an existing slide id (from npm run ids)` },
120
+ linkNumberRange: { ja: (a) => `リンク「${a.text}」(href="${a.href}")のスライド ${a.slide} がない(${a.count} 枚):スライドの id で #<id> と書く`, en: (a) => `the link “${a.text}” (href="${a.href}") points to slide ${a.slide}, but the lesson has ${a.count}: link by slide id, #<id>` },
121
+ linkNoConcl: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のスライド「${a.slide}」に結論(.concl)のステップがない::concl を外すか、ステップの番号にする`, en: (a) => `the link “${a.text}” (href="${a.href}") asks for the conclusion step of “${a.slide}”, which has none: drop :concl or use a step number` },
122
+ linkStepRange: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のスライド「${a.slide}」にステップ ${a.step} がない(ステップは 0〜${a.max}${a.concl ? '、結論は concl' : ''}):あるステップにする`, en: (a) => `the link “${a.text}” (href="${a.href}") asks for step ${a.step} of “${a.slide}”, which has steps 0–${a.max}${a.concl ? ' and concl' : ''}: use an existing step` },
123
+ linkBadStep: { ja: (a) => `リンク「${a.text}」(href="${a.href}")のステップの指定「${a.step}」が読めない:使えるステップの指定は 0・1・… と concl`, en: (a) => `the link “${a.text}” (href="${a.href}") has an unreadable step label “${a.step}”: the valid step labels are 0, 1, … and concl` },
123
124
  linkNumber: { ja: (a) => `リンク「${a.text}」(href="${a.href}")は番号なので、スライドを足すとずれる:スライドの id で #<id> と書く`, en: (a) => `the link “${a.text}” (href="${a.href}") uses a slide number, which shifts when slides are added: link by slide id, #<id>` },
124
125
  linkNoId: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のスライドに id がなく、見出しを直すと切れる:npm run ids で id を付けて #<id> と書く`, en: (a) => `the link “${a.text}” (href="${a.href}") targets a slide without an id, so it breaks when the heading changes: run npm run ids and link to #<id>` },
125
126
  linkCount: { ja: (a) => `スライドへのリンク:${a.ok} 本(ほかのファイルへ ${a.other} 本)`, en: (a) => `links to slides: ${a.ok} (to other files: ${a.other})` },
126
127
  // ---------------------------------------------------------------- 参照音声(AI 音声が声をまねる元の録音。format spec §5 の recipe。kit/core/ref-voice.mjs)
127
- // where:slides(スライドが使う:エクスポートが断る)・audio(audio/manifest.json の段階の音声:入れない)・attachments(添付:入れない)・folder(作業フォルダのほかの所)
128
- // 音声が古い段階(K。format spec §5.4)。v0.6.8 までは code が言葉そのもの('audio: stale — …')だった。言葉は変えない(日本語だけ)
128
+ // where:slides(スライドが使う:エクスポートが断る)・audio(audio/manifest.json のステップの音声:入れない)・attachments(添付:入れない)・folder(作業フォルダのほかの所)
129
+ // 音声が古いステップ(K。format spec §5.4)。v0.6.8 までは code が言葉そのもの('audio: stale — …')だった。頭の「audio: stale — 」は変えない
129
130
  audioStale: {
130
- ja: (a) => `audio: stale — 段階 ${a.k} の音声は今の口述原稿から作ったものではない(${a.kind === 'recorded' ? '録音' : a.kind === 'imported' ? '取り込み' : 'TTS'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`,
131
- en: (a) => `audio: stale — 段階 ${a.k} の音声は今の口述原稿から作ったものではない(${a.kind === 'recorded' ? '録音' : a.kind === 'imported' ? '取り込み' : 'TTS'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`,
131
+ ja: (a) => `audio: stale — ステップ ${a.k} の音声は今の台本から作ったものではない(${a.kind === 'recorded' ? '録音' : a.kind === 'imported' ? '取り込み' : 'AI 音声'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`,
132
+ en: (a) => `audio: stale — the audio of step ${a.k} was not made from the current script (${a.kind === 'recorded' ? 'recorded' : a.kind === 'imported' ? 'imported' : 'AI voice'}; record it again in the editor's “Audio” panel, or make it again with tts/synth.py)`,
132
133
  },
133
134
  refVoice: {
134
- ja: (a) => `参照音声「${a.path}」(voice.json の声の元の録音)が${{ slides: 'スライドで使われている:教材には参照音声を入れないので、Egatari ファイル(.ega.html)へのエクスポートは断る。スライドから外す', audio: ' audio/manifest.json で段階の音声になっている:Egatari ファイル(.ega.html)には入れない(その段階は音声なし)。その声で作った音声に替える', attachments: '添付の場所(attachments/)にある:Egatari ファイル(.ega.html)には入れない', folder: '作業フォルダの中にある:Egatari ファイル(.ega.html)には入れないが、作業フォルダごと人に渡すと一緒に渡る' }[a.where]}。録音は作業フォルダの外に置き、voice.json にはその場所か名前を書く(教材には、その声で作った音声だけが入る)`,
135
+ ja: (a) => `参照音声「${a.path}」(voice.json の声の元の録音)が${{ slides: 'スライドで使われている:教材には参照音声を入れないので、Egatari ファイル(.ega.html)へのエクスポートは断る。スライドから外す', audio: ' audio/manifest.json でステップの音声になっている:Egatari ファイル(.ega.html)には入れない(そのステップは音声なし)。その声で作った音声に替える', attachments: '添付の場所(attachments/)にある:Egatari ファイル(.ega.html)には入れない', folder: '作業フォルダの中にある:Egatari ファイル(.ega.html)には入れないが、作業フォルダごと人に渡すと一緒に渡る' }[a.where]}。録音は作業フォルダの外に置き、voice.json にはその場所か名前を書く(教材には、その声で作った音声だけが入る)`,
135
136
  en: (a) => `the reference voice “${a.path}” (the recording a voice in voice.json imitates) ${{ slides: 'is used by the slides: a lesson does not carry reference voices, so export to an Egatari file (.ega.html) is refused. Remove it from the slides', audio: 'is a step\'s audio in audio/manifest.json: it is left out of the Egatari file (.ega.html) and that step has no audio. Replace it with audio made with the voice', attachments: 'is in the attachments folder (attachments/): it is left out of the Egatari file (.ega.html)', folder: 'is inside the working folder: it is left out of the Egatari file (.ega.html), but goes along if you share the whole working folder' }[a.where]}. Keep the recording outside the working folder and give its location or name in voice.json (a lesson carries only the audio made with the voice)`,
136
137
  },
137
138
  // ---------------------------------------------------------------- 添付(attachments/。format spec §3.8)
138
- extensionVersion: { ja: (a) => `拡張 ${a.name} の v${a.v} には未対応(対応は v${a.supported}):拡張を使わず、そのまま保存する。使うには対応する版で開く`, en: (a) => `extension ${a.name} v${a.v} is not supported (implements v${a.supported}): ignore and preserve it; open in a supporting version to use it` },
139
+ extensionVersion: { ja: (a) => `拡張 ${a.name} の v${a.v} には未対応(対応は v${a.supported}):拡張を使わず、そのまま残す。使うには対応する版で開く`, en: (a) => `extension ${a.name} v${a.v} is not supported (implements v${a.supported}): ignore and preserve it; open in a supporting version to use it` },
139
140
  attachBadConfig: { ja: (a) => `egatari.json の attachments が読めない(${a.why}):[{"path": "attachments/…", "role": "pdf", "title": "…"}] の形にする`, en: (a) => `attachments in egatari.json cannot be read (${a.why}): use [{"path": "attachments/…", "role": "pdf", "title": "…"}]` },
140
141
  attachBadName: { ja: (a) => `添付「${a.path}」の名前は使えない(${a.why}):attachments/ の下の、ふつうの名前(.. ・ \\ ・ : * ? " < > | ・制御文字・末尾の点や空白・CON などの予約名なし)にする`, en: (a) => `the attachment name “${a.path}” is not allowed (${a.why}): use a plain name under attachments/ (no .., \\, : * ? " < > |, control characters, trailing dot or space, or reserved names such as CON)` },
141
- attachExcluded: { ja: (a) => `添付「${a.path}」は 1 ファイル(.ega.html)に入らない(${a.why}):入れるなら名前を替える`, en: (a) => `the attachment “${a.path}” is left out of the single file (.ega.html) (${a.why}): rename it to include it` },
142
+ attachExcluded: { ja: (a) => `添付「${a.path}」は Egatari ファイル(.ega.html)に入らない(${a.why}):入れるなら名前を替える`, en: (a) => `the attachment “${a.path}” is left out of the Egatari file (.ega.html) (${a.why}): rename it to include it` },
142
143
  attachDuplicate: { ja: (a) => `添付「${a.path}」が egatari.json に 2 度書いてある(「${a.other}」と同じ。大文字小文字は区別しない):1 つにする`, en: (a) => `the attachment “${a.path}” is listed twice in egatari.json (same as “${a.other}”, ignoring case): keep one entry` },
143
144
  attachBadRole: { ja: (a) => `添付「${a.path}」の役割「${a.role}」は使えない:source・pdf・code・data・supplement のどれかにする(読み手の一覧に出ない)`, en: (a) => `the attachment “${a.path}” has the role “${a.role}”: use source, pdf, code, data or supplement (it is not listed for readers)` },
144
- attachBadTitle: { ja: (a) => `添付「${a.path}」の題(title)が使えない${a.why ? `(${a.why})` : ''}:${a.max} 字までの 1 行にする(1 ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the title of the attachment “${a.path}” cannot be used${a.why ? ` (${a.why})` : ''}: use one line of at most ${a.max} characters (it is packed but not listed for readers)` },
145
+ attachBadTitle: { ja: (a) => `添付「${a.path}」の題(title)が使えない${a.why ? `(${a.why})` : ''}:${a.max} 字までの 1 行にする(Egatari ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the title of the attachment “${a.path}” cannot be used${a.why ? ` (${a.why})` : ''}: use one line of at most ${a.max} characters (it is packed into the Egatari file but not listed for readers)` },
145
146
  attachMissing: { ja: (a) => `egatari.json の添付「${a.path}」のファイルがない:attachments/ に置くか、項目を消す`, en: (a) => `the attachment “${a.path}” in egatari.json does not exist: put the file in attachments/ or remove the entry` },
146
- attachNoRole: { ja: (a) => `添付「${a.path}」に役割がない:egatari.json の attachments に {"path": "${a.path}", "role": "pdf"}(source・pdf・code・data・supplement)を書く(1 ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the attachment “${a.path}” has no role: add {"path": "${a.path}", "role": "pdf"} (source, pdf, code, data or supplement) to attachments in egatari.json (it is packed but not listed for readers)` },
147
- attachNoTitle: { ja: (a) => `添付「${a.path}」に題(title)がない:egatari.json の attachments の項目に "title": "…"(ダウンロードの一覧に出す短い名前)を書く(題は要る。1 ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the attachment “${a.path}” has no title: add "title": "…" (a short name for the download list) to its entry in egatari.json (a title is required; it is packed but not listed for readers)` },
148
- attachMedia: { ja: (a) => `添付「${a.path}」は${a.kind === 'video' ? '動画' : '音声'}(${a.by === 'content' ? '中身' : '名前'}から):音声と動画は添付にできない(1 ファイルに入らない)。教材で鳴らすなら原稿から参照する`, en: (a) => `the attachment “${a.path}” is ${a.kind === 'video' ? 'a video' : 'audio'} (by its ${a.by === 'content' ? 'content' : 'name'}): audio and video cannot be attached (it is not packed); reference it from the slides if the lesson plays it` },
149
- attachType: { ja: (a) => a.role ? `添付「${a.path}」(.${a.ext})は役割「${ROLE_JA[a.role] || a.role}」に入れられない(§3.8。この役割は ${ROLE_ALLOWED.ja[a.role] || '?'}):役割を替えるか、許される形式にする(1 ファイルに入らない)` : `添付「${a.path}」(.${a.ext})は添付にできない形式(§3.8 の役割ごとの形式のどれでもない):PDF・CSV・テキスト・画像(PNG・JPEG・WebP)などにする(1 ファイルに入らない)`,
150
- en: (a) => a.role ? `the attachment “${a.path}” (.${a.ext}) is not allowed for the role ${a.role} (§3.8; this role takes ${ROLE_ALLOWED.en[a.role] || '?'}): change the role or the format (it is not packed)` : `the attachment “${a.path}” (.${a.ext}) is not a format that may be attached (none of the formats of §3.8): use PDF, CSV, text, images (PNG, JPEG, WebP) and so on (it is not packed)` },
151
- attachForbidden: { ja: (a) => `添付「${a.path}」は${FORBID.ja[a.kind] || a.kind}(${a.by === 'content' ? '中身' : '名前'}から):§3.8 では添付にできない(開くと動くもの・入れ物は入れない。1 ファイルに入らない)`,
152
- en: (a) => `the attachment “${a.path}” is ${FORBID.en[a.kind] || a.kind} (by its ${a.by === 'content' ? 'content' : 'name'}): §3.8 does not allow it (nothing that runs when opened, no containers; it is not packed)` },
153
- attachMismatch: { ja: (a) => `添付「${a.path}」の中身が名前の形式(${a.kind})と合わない${a.actual ? `(中身は ${a.actual})` : ''}${a.why ? `(${a.why})` : ''}:§3.8 では中身と形式が合うものだけを入れる。正しいファイルにする(1 ファイルに入らない)`,
154
- en: (a) => `the content of the attachment “${a.path}” does not match its format (${a.kind})${a.actual ? ` (it looks like ${a.actual})` : ''}${a.why ? ` (${a.why})` : ''}: §3.8 takes only files whose content matches their type; use the right file (it is not packed)` },
155
- attachPolyglot: { ja: (a) => `添付「${a.path}」はほかの形式(${a.also})を重ねたファイル:§3.8 では添付にできない。元のファイルを書き出し直す(1 ファイルに入らない)`,
156
- en: (a) => `the attachment “${a.path}” is also ${a.also} (a file of two types): §3.8 does not allow it; export the original again (it is not packed)` },
157
- attachUnsafe: { ja: (a) => `添付「${a.path}」:${UNSAFE.ja[a.what] || a.what}${a.detail ? `(${a.detail})` : ''}。§3.8 の条件に合わない:それを除いて保存し直す(PDF は印刷し直す・Office はマクロや外の参照を外す)(1 ファイルに入らない)`,
158
- en: (a) => `the attachment “${a.path}”: ${UNSAFE.en[a.what] || a.what}${a.detail ? ` (${a.detail})` : ''}, which §3.8 does not allow: save it again without that (print the PDF again; remove macros or external references in Office) (it is not packed)` },
159
- attachUnchecked: { ja: (a) => `添付「${a.path}」は中身を確かめられない(${a.why}):§3.8 では確かめられないものは入れない。暗号化や特別な圧縮を外して保存し直す(1 ファイルに入らない)`,
160
- en: (a) => `the attachment “${a.path}” cannot be checked (${a.why}): §3.8 attachments are checked before packing; save it again without encryption or unusual compression (it is not packed)` },
147
+ attachNoRole: { ja: (a) => `添付「${a.path}」に役割がない:egatari.json の attachments に {"path": "${a.path}", "role": "pdf"}(source・pdf・code・data・supplement)を書く(Egatari ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the attachment “${a.path}” has no role: add {"path": "${a.path}", "role": "pdf"} (source, pdf, code, data or supplement) to attachments in egatari.json (it is packed into the Egatari file but not listed for readers)` },
148
+ attachNoTitle: { ja: (a) => `添付「${a.path}」に題(title)がない:egatari.json の attachments の項目に "title": "…"(ダウンロードの一覧に出す短い名前)を書く(題は要る。Egatari ファイルには入るが、読み手の一覧に出ない)`, en: (a) => `the attachment “${a.path}” has no title: add "title": "…" (a short name for the download list) to its entry in egatari.json (a title is required; it is packed into the Egatari file but not listed for readers)` },
149
+ attachMedia: { ja: (a) => `添付「${a.path}」は${a.kind === 'video' ? '動画' : '音声'}(${a.by === 'content' ? '中身' : '名前'}から):音声と動画は添付にできない(Egatari ファイルに入らない)。教材で鳴らすならスライド(deck.html)から参照する`, en: (a) => `the attachment “${a.path}” is ${a.kind === 'video' ? 'a video' : 'audio'} (by its ${a.by === 'content' ? 'content' : 'name'}): audio and video cannot be attached (it is not packed into the Egatari file); reference it from the slides (deck.html) if the lesson plays it` },
150
+ attachType: { ja: (a) => a.role ? `添付「${a.path}」(.${a.ext})は役割「${ROLE_JA[a.role] || a.role}」に入れられない(§3.8。この役割は ${ROLE_ALLOWED.ja[a.role] || '?'}):役割を替えるか、許される形式にする(Egatari ファイルに入らない)` : `添付「${a.path}」(.${a.ext})は添付にできない形式(§3.8 の役割ごとの形式のどれでもない):PDF・CSV・テキスト・画像(PNG・JPEG・WebP)などにする(Egatari ファイルに入らない)`,
151
+ en: (a) => a.role ? `the attachment “${a.path}” (.${a.ext}) is not allowed for the role ${a.role} (§3.8; this role takes ${ROLE_ALLOWED.en[a.role] || '?'}): change the role or the format (it is not packed into the Egatari file)` : `the attachment “${a.path}” (.${a.ext}) is not a format that may be attached (none of the formats of §3.8): use PDF, CSV, text, images (PNG, JPEG, WebP) and so on (it is not packed into the Egatari file)` },
152
+ attachForbidden: { ja: (a) => `添付「${a.path}」は${FORBID.ja[a.kind] || a.kind}(${a.by === 'content' ? '中身' : '名前'}から):§3.8 では添付にできない(開くと動くもの・入れ物は入れない。Egatari ファイルに入らない)`,
153
+ en: (a) => `the attachment “${a.path}” is ${FORBID.en[a.kind] || a.kind} (by its ${a.by === 'content' ? 'content' : 'name'}): §3.8 does not allow it (nothing that runs when opened, no containers; it is not packed into the Egatari file)` },
154
+ attachMismatch: { ja: (a) => `添付「${a.path}」の中身が名前の形式(${a.kind})と合わない${a.actual ? `(中身は ${a.actual})` : ''}${a.why ? `(${a.why})` : ''}:§3.8 では中身と形式が合うものだけを入れる。正しいファイルにする(Egatari ファイルに入らない)`,
155
+ en: (a) => `the content of the attachment “${a.path}” does not match its format (${a.kind})${a.actual ? ` (it looks like ${a.actual})` : ''}${a.why ? ` (${a.why})` : ''}: §3.8 takes only files whose content matches their type; use the right file (it is not packed into the Egatari file)` },
156
+ attachPolyglot: { ja: (a) => `添付「${a.path}」はほかの形式(${a.also})を重ねたファイル:§3.8 では添付にできない。元のアプリでエクスポートし直す(Egatari ファイルに入らない)`,
157
+ en: (a) => `the attachment “${a.path}” is also ${a.also} (a file of two types): §3.8 does not allow it; export it again from the app that made it (it is not packed into the Egatari file)` },
158
+ attachUnsafe: { ja: (a) => `添付「${a.path}」:${UNSAFE.ja[a.what] || a.what}${a.detail ? `(${a.detail})` : ''}。§3.8 の条件に合わない:それを除いて保存し直す(PDF は印刷し直す・Office はマクロや外の参照を外す)(Egatari ファイルに入らない)`,
159
+ en: (a) => `the attachment “${a.path}”: ${UNSAFE.en[a.what] || a.what}${a.detail ? ` (${a.detail})` : ''}, which §3.8 does not allow: save it again without that (print the PDF again; remove macros or external references in Office) (it is not packed into the Egatari file)` },
160
+ attachUnchecked: { ja: (a) => `添付「${a.path}」は中身を確かめられない(${a.why}):§3.8 では確かめられないものは入れない。暗号化や特別な圧縮を外して保存し直す(Egatari ファイルに入らない)`,
161
+ en: (a) => `the attachment “${a.path}” cannot be checked (${a.why}): §3.8 attachments are checked before packing; save it again without encryption or unusual compression (it is not packed into the Egatari file)` },
161
162
  attachInjection: { ja: (a) => `添付「${a.path}」の ${a.n} 個の値が = + - @ やタブで始まり、表計算のソフトで数式として読まれうる${a.row ? `(最初は ${a.row} 行 ${a.col} 列)` : a.where ? `(${a.where})` : ''}:意図したものか確かめる(入れる)`,
162
163
  en: (a) => `${a.n} value(s) in the attachment “${a.path}” start with = + - @ or a tab and may be read as formulas by a spreadsheet${a.row ? ` (first at row ${a.row}, column ${a.col})` : a.where ? ` (in ${a.where})` : ''}: check that this is intended (it is packed)` },
163
- attachPrivate: { ja: (a) => `添付「${a.path}」に${({ 'private key': '秘密鍵', 'access key': 'アクセスの鍵', 'password or token': 'パスワードかトークン', 'device-specific path': 'この端末のパス' })[a.what] || a.what}らしい文字がある:配る前に確かめて消す(入れる)`,
164
- en: (a) => `the attachment “${a.path}” seems to contain a ${a.what}: check and remove it before sharing (it is packed)` },
164
+ attachPrivate: { ja: (a) => `添付「${a.path}」に${({ 'private key': '秘密鍵', 'access key': 'アクセスキー', 'password or token': 'パスワードかトークン', 'device-specific path': 'この端末のパス' })[a.what] || a.what}らしい文字がある:配る前に確かめて消す(入れる)`,
165
+ en: (a) => `the attachment “${a.path}” seems to contain a ${({ 'device-specific path': 'path specific to this device' })[a.what] || a.what}: check and remove it before sharing (it is packed)` },
165
166
  attachBadDescription: { ja: (a) => `添付「${a.path}」の説明(description)が使えない(${a.why}):${a.max} 字までの 1〜2 文(改行なし)にする(説明なしで一覧に出す)`,
166
167
  en: (a) => `the description of the attachment “${a.path}” cannot be used (${a.why}): write one or two sentences, at most ${a.max} characters, without line breaks (listed without it)` },
167
- attachTooLarge: { ja: (a) => `添付「${a.path}」が大きすぎる(${mibOf(a.n)}。1 つ ${mibOf(a.max)} まで):小さくするか、別の場所で配る(1 ファイルに入らない)`, en: (a) => `the attachment “${a.path}” is too large (${mibOf(a.n)}; at most ${mibOf(a.max)} each): make it smaller or share it elsewhere (it is not packed)` },
168
- attachTotal: { ja: (a) => `添付を合わせると大きすぎる(「${a.path}」で ${mibOf(a.n)}。合わせて ${mibOf(a.max)} まで):減らす(この添付から後は 1 ファイルに入らない)`, en: (a) => `the attachments are too large together (${mibOf(a.n)} with “${a.path}”; at most ${mibOf(a.max)}): remove some (this one and later ones are not packed)` },
169
- attachCount: { ja: (a) => `添付が多すぎる(${a.max} 個まで):「${a.path}」は 1 ファイルに入らない`, en: (a) => `too many attachments (at most ${a.max}): “${a.path}” is not packed` },
170
- attachList: { ja: (a) => `添付:${a.n} 個(${a.size}。読み手の一覧に ${a.listed} 個)。1 ファイル(.ega.html)の再生ではダウンロードだけで、再生専用(--play-only)には入らない`, en: (a) => `attachments: ${a.n} (${a.size}; ${a.listed} listed for readers). In the single file (.ega.html) they are download-only; play-only files (--play-only) do not carry them` },
168
+ attachTooLarge: { ja: (a) => `添付「${a.path}」が大きすぎる(${mibOf(a.n)}。1 つ ${mibOf(a.max)} まで):小さくするか、別の場所で配る(Egatari ファイルに入らない)`, en: (a) => `the attachment “${a.path}” is too large (${mibOf(a.n)}; at most ${mibOf(a.max)} each): make it smaller or share it elsewhere (it is not packed into the Egatari file)` },
169
+ attachTotal: { ja: (a) => `添付を合わせると大きすぎる(「${a.path}」で ${mibOf(a.n)}。合わせて ${mibOf(a.max)} まで):減らす(この添付から後は Egatari ファイルに入らない)`, en: (a) => `the attachments are too large together (${mibOf(a.n)} with “${a.path}”; at most ${mibOf(a.max)}): remove some (this one and later ones are not packed into the Egatari file)` },
170
+ attachCount: { ja: (a) => `添付が多すぎる(${a.max} 個まで):「${a.path}」は Egatari ファイルに入らない`, en: (a) => `too many attachments (at most ${a.max}): “${a.path}” is not packed into the Egatari file` },
171
+ attachList: { ja: (a) => `添付:${a.n} 個(${a.size}。読み手の一覧に ${a.listed} 個)。Egatari ファイル(.ega.html)の再生ではダウンロードだけで、再生専用(--play-only)には入らない`, en: (a) => `attachments: ${a.n} (${a.size}; ${a.listed} listed for readers). In the Egatari file (.ega.html) they are download-only; play-only files (--play-only) do not carry them` },
171
172
  // ---------------------------------------------------------------- 体裁(はみ出し・字数・表記)
172
- titleLong: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 字で長い(26 字まで。全角 1・半角 0.5):${quoteJa(a.t)}を短くするか、言いたいことを結論の行に移す`, en: (a) => `the heading has ${a.n} units, over 26 (full-width 1, ASCII 0.5): shorten “${a.t}” or move the point to the conclusion line` },
173
- titleLongEn: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 文字で長い(英語は 60 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the heading has ${a.n} characters, over 60: shorten “${a.t}”` },
173
+ titleLong: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 字で長い(26 字まで。全角 1・半角 0.5):${quoteJa(a.t)}を短くするか、要点を結論の行に移す`, en: (a) => `the heading has ${a.n} units, over 26 (full-width 1, ASCII 0.5): shorten “${a.t}” or move the point to the conclusion line` },
174
+ titleLongEn: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 文字で長い(英文は 60 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the heading has ${a.n} characters, over 60: shorten “${a.t}”` },
174
175
  titleColon: { rule: 'R-title', ja: (a) => `見出し${quoteJa(a.t)}がコロンで終わっている:コロンを取り、見出しだけで言い切る`, en: (a) => `the heading “${a.t}” ends with a colon: remove it and let the heading stand on its own` },
175
176
  tateTitle: { rule: 'R-title', ja: (a) => `縦組みの見出しが列に収まらない(${a.h}px > ${a.max}px。14 字ほどまで):見出しを短くする`, en: (a) => `the vertical heading does not fit its column (${a.h}px > ${a.max}px, about 14 characters): shorten it` },
176
177
  conclLong: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 字で長い(35 字まで):「${a.t}」を 1 つの短い文にする`, en: (a) => `the conclusion line has ${a.n} units, over 35: make “${a.t}” one short sentence` },
177
- conclLongEn: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 文字で長い(英語は 70 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the conclusion line has ${a.n} characters, over 70: shorten “${a.t}”` },
178
+ conclLongEn: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 文字で長い(英文は 70 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the conclusion line has ${a.n} characters, over 70: shorten “${a.t}”` },
178
179
  conclOverflow: { rule: 'R-concl', ja: () => '結論の行が枠からはみ出す:結論の行を短くして 1 行に収める', en: () => 'the conclusion line overflows its box: shorten it to one line' },
179
180
  // 結論の行の上端(conclTop)・1 行の高さ(line)・右の限り(bodyRight の lim)はテーマの寸法(metrics)が既定と違うときだけ値にある(なければ既定の値)
180
181
  bodyBottom: { rule: 'R-fit',
181
- ja: (a) => { const L = a.line || DEF_LINE, o = Math.ceil(a.px - a.lim), n = Math.max(1, Math.ceil(o / L)); return `本文が下に ${o} px はみ出す(${a.px}px > ${a.lim}px${a.concl ? `、結論の行の上端は ${a.conclTop ?? DEF_CONCL_TOP}px` : ''}):本文をおよそ ${n} 行(1 行 ${L} px)減らすか、部品を ${o} px 低くするか、スライドを 2 枚に分ける(字は縮めない)`; },
182
- en: (a) => { const L = a.line || DEF_LINE, o = Math.ceil(a.px - a.lim), n = Math.max(1, Math.ceil(o / L)); return `the body overflows at the bottom by ${o} px (${a.px}px > ${a.lim}px${a.concl ? `; the conclusion line starts at ${a.conclTop ?? DEF_CONCL_TOP}px` : ''}): cut about ${n} line${n > 1 ? 's' : ''} (${L} px each), make the component ${o} px lower, or split the slide in two (do not shrink text)`; } },
182
+ ja: (a) => { const L = a.line || DEF_LINE, o = Math.ceil(a.px - a.lim), n = Math.max(1, Math.ceil(o / L)); return `本文が下に ${o} px はみ出す(${a.px}px > ${a.lim}px${a.concl ? `、結論の行の上端は ${a.conclTop ?? DEF_CONCL_TOP}px` : ''}):本文をおよそ ${n} 行(1 行 ${L} px)減らすか、パーツを ${o} px 低くするか、スライドを 2 枚に分ける(字は縮めない)`; },
183
+ en: (a) => { const L = a.line || DEF_LINE, o = Math.ceil(a.px - a.lim), n = Math.max(1, Math.ceil(o / L)); return `the body overflows at the bottom by ${o} px (${a.px}px > ${a.lim}px${a.concl ? `; the conclusion line starts at ${a.conclTop ?? DEF_CONCL_TOP}px` : ''}): cut about ${n} line${n > 1 ? 's' : ''} (${L} px each), make the part ${o} px lower, or split the slide in two (do not shrink text)`; } },
183
184
  bodyRight: { rule: 'R-fit', ja: (a) => `本文が右にはみ出す(${a.px}px > ${a.lim ?? DEF_RIGHT}px):長い式や表を分けるか、横並び(.cols)の幅を見直す`, en: (a) => `the body overflows to the right (${a.px}px > ${a.lim ?? DEF_RIGHT}px): break the long equation or table, or rebalance the .cols widths` },
184
185
  tateBodyHead: { rule: 'R-fit', ja: (a) => `本文が見出しの列に重なる(${a.px}px > ${a.lim}px):縦書きの本文を減らすか、スライドを分ける`, en: (a) => `the body runs into the heading column (${a.px}px > ${a.lim}px): cut the vertical text or split the slide` },
185
186
  bodyConclCol: { rule: 'R-fit', ja: (a) => `本文が結論の列に重なる(${a.px}px < ${a.lim}px):縦書きの本文を減らすか、スライドを分ける`, en: (a) => `the body runs into the conclusion column (${a.px}px < ${a.lim}px): cut the vertical text or split the slide` },
186
187
  bodyLeft: { rule: 'R-fit', ja: (a) => `本文が左にはみ出す(${a.px}px < ${a.lim}px):縦書きの本文を減らすか、スライドを分ける`, en: (a) => `the body overflows to the left (${a.px}px < ${a.lim}px): cut the vertical text or split the slide` },
187
- // テーマの寸法の宣言(theme.json の metrics。docs/contract.md §12)。デッキに 1 回。テーマの知らせなので規格の名前はない
188
+ // テーマの寸法の宣言(theme.json の metrics。docs/contract.md §12)。教材に 1 回。テーマの知らせなので規格の名前はない
188
189
  themeMetricsDrift: {
189
190
  ja: (a) => `テーマ「${a.theme}」の${a.declared ? '寸法の宣言(theme.json の metrics)と描いた体裁の箱が違う' : '体裁の箱が既定の位置から動いているのに、寸法の宣言(theme.json の metrics)がない'}(${driftList(a.items, 'ja')})。本文の場所の限りは${a.declared ? '宣言' : '既定'}の値で決めるので、はみ出しの指摘がずれる:${driftHow(a, 'ja')}`,
190
191
  en: (a) => `the theme “${a.theme}” ${a.declared ? 'renders its layout boxes differently from its declared geometry (metrics in theme.json)' : 'moves layout boxes from their default positions but declares no geometry (metrics in theme.json)'} (${driftList(a.items, 'en')}). The body limits come from the ${a.declared ? 'declared' : 'default'} values, so overflow findings may be off: ${driftHow(a, 'en')}` },
@@ -192,8 +193,8 @@ export const MESSAGES = {
192
193
  ja: (a) => `テーマ「${a.theme}」の寸法と描いた箱を比べなかった:同梱の字体(${(a.fonts || []).join('・')})が読み込めず、代わりの字体では測らないため(themeMetricsDrift を確かめていない):npm ci か node tools/get-fonts.mjs で字体をそろえて組み直すか、テーマの --font-sans に同梱の字体を入れる`,
193
194
  en: (a) => `the theme “${a.theme}” was not compared with its rendered boxes: the bundled fonts (${(a.fonts || []).join(', ')}) did not load, and a fallback font is never measured (themeMetricsDrift was not checked): restore the fonts (npm ci or node tools/get-fonts.mjs) and rebuild, or put a bundled font in the theme's --font-sans` },
194
195
  themeMetricsInvalid: {
195
- ja: (a) => `テーマ「${a.theme}」の寸法の宣言(theme.json の metrics)に使えない値がある:${a.list.join(';')}。その値は親のテーマ(なければ既定)の値で検査した:theme.json の metrics を直す(docs/contract.md §12、node tools/theme-metrics.mjs measure <テーマ> で描いた箱の値を出せる)`,
196
- en: (a) => `the theme “${a.theme}” declares geometry (metrics in theme.json) that cannot be used: ${a.list.join('; ')}. Those values were checked with the parent theme's (or the default) values: fix metrics in theme.json (docs/contract.md §12; node tools/theme-metrics.mjs measure <theme> prints the rendered values)` },
196
+ ja: (a) => `テーマ「${a.theme}」の寸法の宣言(theme.json の metrics)に使えない値がある:${a.list.join(';')}。その値の代わりに親のテーマ(なければ既定)の値で品質チェックした:theme.json の metrics を直す(docs/contract.md §12、node tools/theme-metrics.mjs measure <テーマ> で描いた箱の値を出せる)`,
197
+ en: (a) => `the theme “${a.theme}” declares geometry (metrics in theme.json) that cannot be used: ${a.list.join('; ')}. The quality check used the parent theme's (or the default) values instead: fix metrics in theme.json (docs/contract.md §12; node tools/theme-metrics.mjs measure <theme> prints the rendered values)` },
197
198
  fontsExtraMissing: {
198
199
  ja: (a) => `字体(${(a.fonts || []).join('・')})は別の包み ${a.pkg} にあり、入っていないのでファイルに入らない(開く端末の字体で出る):${a.install} で入れて組み直す(npx なら npx -p egatari -p ${a.pkg} egatari …)。または既定の字体のテーマにする`,
199
200
  en: (a) => `the fonts (${(a.fonts || []).join(', ')}) are in the separate package ${a.pkg}, which is not installed, so they are not embedded (each device shows its own font): install it with ${a.install} and build again (with npx: npx -p egatari -p ${a.pkg} egatari …), or use a theme with the default fonts` },
@@ -211,9 +212,9 @@ export const MESSAGES = {
211
212
  // 切れる字・外に出る字(kit/core/layout-scan.mjs。警告)。わざと切るところは要素に印(CLIP_ATTR)を付けると見ない
212
213
  textClipped: { rule: 'R-fit', ja: (a) => `字が箱で切れている(「${a.t}」${moreJa(a)}、${a.px}px):箱(overflow が hidden など)を大きくするか、字を減らすか、スライドを分ける。わざと切って見せるなら、その要素に ${CLIP_ATTR} を付ける`, en: (a) => `text is cut off by its box (“${a.t}”${moreEn(a)}, ${a.px}px): make the box (overflow hidden or similar) larger, cut the text or split the slide; if the clipping is intended, add ${CLIP_ATTR} to that element` },
213
214
  svgTextOut: { rule: 'R-fit',
214
- ja: (a) => (a.edge === 'viewBox' ? `図の字が SVG の枠(viewBox)で切れている(「${a.t}」${moreJa(a)}、${a.px}px):viewBox を広げるか、字を枠の内に置く` : `図の字がスライドの外に出る(「${a.t}」${moreJa(a)}、${a.px}px):部品や図を小さくするか位置を直すか、ラベルを短くする`),
215
- en: (a) => (a.edge === 'viewBox' ? `text in a figure is cut off by its SVG viewport (viewBox) (“${a.t}”${moreEn(a)}, ${a.px}px): widen the viewBox or move the text inside it` : `text in a figure goes off the slide (“${a.t}”${moreEn(a)}, ${a.px}px): make the component or figure smaller, move it, or shorten the label`) },
216
- svgTextBox: { rule: 'R-fit', ja: (a) => `図の字が囲みの箱からはみ出す(「${a.t}」${moreJa(a)}、${a.px}px):ラベルを短くするか改行するか、箱を広げる(m-flow なら w を大きくする)`, en: (a) => `text in a figure overflows the box drawn around it (“${a.t}”${moreEn(a)}, ${a.px}px): shorten the label, break it into lines, or widen the box (in m-flow, a larger w)` },
215
+ ja: (a) => (a.edge === 'viewBox' ? `図の字が SVG の枠(viewBox)で切れている(「${a.t}」${moreJa(a)}、${a.px}px):viewBox を広げるか、字を枠の内に置く` : `図の字がスライドの外に出る(「${a.t}」${moreJa(a)}、${a.px}px):パーツや図を小さくするか位置を直すか、ラベルを短くする`),
216
+ en: (a) => (a.edge === 'viewBox' ? `text in a figure is cut off by its SVG viewport (viewBox) (“${a.t}”${moreEn(a)}, ${a.px}px): widen the viewBox or move the text inside it` : `text in a figure goes off the slide (“${a.t}”${moreEn(a)}, ${a.px}px): make the part or figure smaller, move it, or shorten the label`) },
217
+ svgTextBox: { rule: 'R-fit', ja: (a) => `図の字がラベルの枠からはみ出す(「${a.t}」${moreJa(a)}、${a.px}px):ラベルを短くするか改行するか、枠を広げる(m-flow なら w を大きくする)`, en: (a) => `text in a figure overflows its label frame (“${a.t}”${moreEn(a)}, ${a.px}px): shorten the label, break it into lines, or widen the frame (in m-flow, a larger w)` },
217
218
  outsideBody: { rule: 'R-fit',
218
219
  ja: (a) => `本文(.body)の外に置いた字が${{ slide: `スライドの外に出る(${a.px}px)`, title: '見出しに重なる', concl: '結論の行に重なる', pn: 'ページ番号に重なる' }[a.why] || 'はみ出す'}(「${a.t}」${moreJa(a)}):本文の中に置くか、位置を直す`,
219
220
  en: (a) => `text placed outside the body (.body) ${{ slide: `goes off the slide (${a.px}px)`, title: 'overlaps the heading', concl: 'overlaps the conclusion line', pn: 'overlaps the page number' }[a.why] || 'overflows'} (“${a.t}”${moreEn(a)}): put it inside the body or fix its position` },
@@ -222,12 +223,12 @@ export const MESSAGES = {
222
223
  ja: (a) => `字がスライドの外に出る(「${a.t}」${moreJa(a)}、${a.px}px):字を短くするか、位置を直して 1280×720 の内に収める${PLACE_JA[a.kind] || ''}`,
223
224
  en: (a) => `text goes off the slide (“${a.t}”${moreEn(a)}, ${a.px}px): shorten it or move it inside the 1280×720 slide${PLACE_EN[a.kind] || ''}` },
224
225
  textOverlap: { rule: 'R-fit',
225
- ja: (a) => `${a.with === 'band' ? `字がスライドの帯(飾り)に重なる(「${a.t}」${moreJa(a)})` : `字の箱がほかの字に重なる(「${a.t}」と「${a.u}」${moreJa(a)})`}:重ならない位置に置き直すか、字を減らす${a.svg ? (a.component === 'm-flow' ? '。m-flow の逆向きの辺には shift を付ける' : a.component === 'm-quad' ? '。m-quad の項目の x/y を変え、象限の名前と重ならない位置に動かす' : a.component ? `。部品 <${a.component}> のデータを変え、ラベルどうしが重ならないようにする` : '。字の x/y か text-anchor を変えるか、軸の名前を軸の端より外に置く') : ''}${PLACE_JA[a.kind] || ''}`,
226
- en: (a) => `${a.with === 'band' ? `text overlaps the slide's decorative band (“${a.t}”${moreEn(a)})` : `a text box overlaps other text (“${a.t}” and “${a.u}”${moreEn(a)})`}: move it to free space or cut the text${a.svg ? (a.component === 'm-flow' ? '; add shift to the reverse edge in m-flow' : a.component === 'm-quad' ? '; change the item’s x/y in m-quad to move it away from the quadrant name' : a.component ? `; change the data in the component <${a.component}> so the labels do not meet` : '; change the text’s x/y or text-anchor, or put the axis name beyond the axis end') : ''}${PLACE_EN[a.kind] || ''}` },
226
+ ja: (a) => `${a.with === 'band' ? `字がスライドの帯(飾り)に重なる(「${a.t}」${moreJa(a)})` : `字の箱がほかの字に重なる(「${a.t}」と「${a.u}」${moreJa(a)})`}:重ならない位置に置き直すか、字を減らす${a.svg ? (a.component === 'm-flow' ? '。m-flow の逆向きの辺には shift を付ける' : a.component === 'm-quad' ? '。m-quad の項目の x/y を変え、象限の名前と重ならない位置に動かす' : a.component ? `。パーツ <${a.component}> のデータを変え、ラベルどうしが重ならないようにする` : '。字の x/y か text-anchor を変えるか、軸の名前を軸の端より外に置く') : ''}${PLACE_JA[a.kind] || ''}`,
227
+ en: (a) => `${a.with === 'band' ? `text overlaps the slide's decorative band (“${a.t}”${moreEn(a)})` : `a text box overlaps other text (“${a.t}” and “${a.u}”${moreEn(a)})`}: move it to free space or cut the text${a.svg ? (a.component === 'm-flow' ? '; add shift to the reverse edge in m-flow' : a.component === 'm-quad' ? '; change the item’s x/y in m-quad to move it away from the quadrant name' : a.component ? `; change the data in the part <${a.component}> so the labels do not meet` : '; change the text’s x/y or text-anchor, or put the axis name beyond the axis end') : ''}${PLACE_EN[a.kind] || ''}` },
227
228
  cellWordBreak: { rule: 'R-fit',
228
229
  ja: (a) => `表のセルの短い語が途中で折り返している(「${a.t}」が ${a.lines} 行:${a.split}${moreJa(a)}):表の列を減らすか、語を短くするか、その列を広げる(ほかの列の字を減らす)`,
229
230
  en: (a) => `a short word in a table cell breaks across lines (“${a.t}” on ${a.lines} lines: ${a.split}${moreEn(a)}): use fewer columns, shorten the word, or widen that column (cut text in the other columns)` },
230
- desuMasu: { rule: 'R-style', ja: (a) => `スライドの字に です・ます がある(「${a.t}」):スライドは常体(だ・である、体言止め)で書く。です・ます は口述原稿だけ`, en: (a) => `the slide text uses です・ます (“${a.t}”): write slides in plain style (だ・である or a noun ending); keep です・ます for the narration` },
231
+ desuMasu: { rule: 'R-style', ja: (a) => `スライドの字に です・ます がある(「${a.t}」):スライドは常体(だ・である、体言止め)で書く。です・ます は台本だけ`, en: (a) => `the slide text uses です・ます (“${a.t}”): write slides in plain style (だ・である or a noun ending); keep です・ます for the script` },
231
232
  rawMath: { rule: 'R-math', ja: (a) => `数式が KaTeX で組まれずに残っている(「${a.t}」):\\( … \\) か \\[ … \\] で囲み、$ … $ は使わない`, en: (a) => `math was left unrendered (“${a.t}”): wrap it in \\( … \\) or \\[ … \\], not $ … $` },
232
233
  katexError: { rule: 'R-math', ja: (a) => `KaTeX が式を組めない(「${a.t}」):式の書き方を直す(< は \\lt、使えるマクロは \\hlE \\hlT \\hlM \\htmlId \\htmlData \\morph)`, en: (a) => `KaTeX cannot render an equation (“${a.t}”): fix its syntax (write < as \\lt; allowed macros are \\hlE \\hlT \\hlM \\htmlId \\htmlData \\morph)` },
233
234
  // 同じ重さの短い要点だけの本文(kit/core/layout-scan.mjs、backlog #189。情報だけ:直すかは作成者が決める)
@@ -241,76 +242,84 @@ export const MESSAGES = {
241
242
  en: (a) => (a.tate
242
243
  ? `Content sits to the right (centre of mass ${Math.abs(Math.round(a.hOffset))}% right of the centre; ${Math.round(a.left - a.right)}% empty on the left)`
243
244
  : `Content sits high (centre of mass ${Math.abs(Math.round(a.vOffset))}% above the optical centre; ${Math.round(a.bottom - a.top)}% empty at the bottom)`) },
244
- step0: { ja: (a) => `段階 0 の本文:「${a.t}」`, en: (a) => `body text at step 0: “${a.t}”` },
245
- punctMixed: { rule: 'R-style', ja: (a) => `句読点が混ざっている:${a.minor}が ${a.n} 個あり、デッキの多くは${a.major}:このスライドも${a.major}にそろえる`, en: (a) => `mixed punctuation: ${a.n} × ${a.minor} while most of the deck uses ${a.major}: use ${a.major} here too` },
246
- // ---------------------------------------------------------------- 口述原稿
247
- // 雛形のまま(kit/core/template-text.mjs):仮の口述原稿の行・スライドに残った雛形の字
248
- narrPlaceholder: { ja: (a) => `口述原稿が雛形の仮の行のまま(narration.md ${a.line} 行目「${a.t}」):話す言葉に書き換える(このままでは TTS が読み、字幕にも出る)`, en: (a) => `the narration is still the template placeholder (narration.md line ${a.line}, “${a.t}”): replace it with what you say (otherwise TTS reads it and it shows in the captions)` },
249
- templateText: { ja: (a) => `雛形の字が残っている:${a.list}。自分の内容に書き換える`, en: (a) => `template text left on the slide: ${a.listEn}. Replace it with your own content` },
250
- narrNote: { ja: (a) => `発表者への指示 ${a.t} の書式が正しくない(narration.md ${a.line} 行目):{note:…} を } で閉じ、中に { や } を入れない`, en: (a) => `invalid stage direction ${a.t} (narration.md line ${a.line}): close {note:…} with } and do not put { or } inside` },
251
- narrMissing: { rule: 'R-narr-steps', ja: (a) => `この段階の口述原稿がない:narration.md のこのスライドの節に [${a.step}] の行を書く(その段階で現れるものについて話す)`, en: (a) => `no narration for this step: add a [${a.step}] line to this slide’s section of narration.md (about what appears at that step)` },
252
- narrFormula: { rule: 'R-formula', ja: (a) => `口述原稿が式を読み上げている(「${a.t}」):記号や演算子を書かず、式の意味を言葉で言う`, en: (a) => `the narration reads an equation aloud (“${a.t}”): say what it means in words, without symbols and operators` },
253
- narrLang: { ja: (a) => `口述原稿の言語(${a.lang}。${a.source === 'voice.json' ? 'voice.json の lang' : '発言の文字から'})がスライドの言語(${a.deck})と違う:式の読み上げと長い発言は、発言ごとにその言語の規則で見た`, en: (a) => `the narration language (${a.lang}, ${a.source === 'voice.json' ? 'from lang in voice.json' : 'from the text'}) differs from the slide language (${a.deck}): equations read aloud and long turns were checked with the rules of each turn's language` },
254
- turnLong: { ja: (a) => `1 回の発言が長い(${a.n} ${a.unit}):2 つの発言か 2 つの段階に分けるとよい`, en: (a) => `a long turn (${a.n} ${a.unit === '字' ? 'characters' : 'words'}): consider splitting it into two turns or two steps` },
255
- // 部品のデータが合わないスライド:口述原稿と段階の数は、データを直してから確かめ直す(narrMissing・narrOrphan はそのスライドでは出さない)
256
- narrRecheck: { ja: (a) => `このスライドの部品 ${(a.comps || []).map((t) => `<${t}>`).join('・')} はデータが合わず描けないので、口述原稿と段階の数はデータを直してから確かめ直す(口述原稿は消さない)`,
257
- en: (a) => `the component ${(a.comps || []).map((t) => `<${t}>`).join(', ')} on this slide cannot draw its data, so the narration and the step count are checked again after its data is fixed (keep the narration)` },
258
- // a = {step, line, end, range, static, keys, n, concl, target, lines: [{n, text}], comps: [部品の名前…]}(keys 以下は narration-lint の orphanDetail)
245
+ step0: { ja: (a) => `ステップ 0 の本文:「${a.t}」`, en: (a) => `body text at step 0: “${a.t}”` },
246
+ punctMixed: { rule: 'R-style', ja: (a) => `句読点が混ざっている:${a.minor}が ${a.n} 個あり、教材の多くは${a.major}:このスライドも${a.major}にそろえる`, en: (a) => `mixed punctuation: ${a.n} × ${a.minor} while most of the lesson uses ${a.major}: use ${a.major} on this slide too` },
247
+ // ---------------------------------------------------------------- 台本
248
+ // テンプレートのまま(kit/core/template-text.mjs):仮の台本の行・スライドに残ったテンプレートの字
249
+ narrPlaceholder: { ja: (a) => `台本がテンプレートの仮の行のまま(narration.md ${a.line} 行目「${a.t}」):話す言葉に書き換える(このままでは AI 音声が読み、字幕にも出る)`, en: (a) => `the script is still the template placeholder (narration.md line ${a.line}, “${a.t}”): replace it with what you say (otherwise the AI voice reads it and it shows in the captions)` },
250
+ templateText: { ja: (a) => `テンプレートの字が残っている:${a.list}。自分の内容に書き換える`, en: (a) => `template text left on the slide: ${a.listEn}. Replace it with your own content` },
251
+ narrNote: { ja: (a) => `発表者への指示 ${a.t} の書式が正しくない(narration.md ${a.line} 行目):{note:…} を } で閉じ、中に { や } を入れない`, en: (a) => `invalid presenter instruction (stage direction) ${a.t} (narration.md line ${a.line}): close {note:…} with } and do not put { or } inside` },
252
+ narrMissing: { rule: 'R-narr-steps', ja: (a) => `このステップの台本がない:narration.md のこのスライドの節に [${a.step}] の行を書く(そのステップで現れるものについて話す)`, en: (a) => `no script for this step: add a [${a.step}] line to this slide’s section of narration.md (about what appears at that step)` },
253
+ // 予想(m-predict)の答えが、数の棒と −1・+1 の操作(パーツのステップ 1)と同時かそれより前に開く(kit/core/predict-steps.mjs。answer-step が 1 以下)
254
+ predictAnswerWithCount: { rule: 'R-steps',
255
+ ja: () => `予想(m-predict)の答えが、人数を数えるステップと同時に出ます。answer-step を ${PREDICT_COUNT_STEP + 1} 以上にして、数えてから答えを開いてください。`,
256
+ en: () => `The prediction (m-predict) shows its answer at the same step as the vote count. Set answer-step to ${PREDICT_COUNT_STEP + 1} or more so the class counts first, then sees the answer.` },
257
+ // 予想(m-predict)の steps が答えのステップ(answer-step)より小さい:プレーヤーはパーツのステップを steps で止めるので、答えが出ない(kit/core/predict-steps.mjs)
258
+ predictAnswerNeverShown: { rule: 'R-steps',
259
+ ja: () => '予想(m-predict)の答えが出ません。steps が answer-step より小さくなっています。steps を answer-step 以上にしてください。',
260
+ en: () => 'The prediction (m-predict) never shows its answer: steps is smaller than answer-step. Set steps to answer-step or more.' },
261
+ narrFormula: { rule: 'R-formula', ja: (a) => `台本が式を読み上げている(「${a.t}」):記号や演算子を書かず、式の意味を言葉で言う`, en: (a) => `the script reads an equation aloud (“${a.t}”): say what it means in words, without symbols and operators` },
262
+ narrLang: { ja: (a) => `台本の言語(${a.lang}。${a.source === 'voice.json' ? 'voice.json の lang' : '発言の文字から'})がスライドの言語(${a.deck})と違う:式の読み上げと長い発言は、発言ごとにその言語の規則で見た`, en: (a) => `the script language (${a.lang}, ${a.source === 'voice.json' ? 'from lang in voice.json' : 'from the text'}) differs from the slide language (${a.deck}): equations read aloud and long turns were checked with the rules of each turn's language` },
263
+ turnLong: { ja: (a) => `1 回の発言が長い(${a.n} ${a.unit}):2 つの発言か 2 つのステップに分けるとよい`, en: (a) => `a long turn (${a.n} ${a.unit === '字' ? 'characters' : 'words'}): consider splitting it into two turns or two steps` },
264
+ // パーツのデータが合わないスライド:台本とステップの数は、データを直してから確かめ直す(narrMissing・narrOrphan はそのスライドでは出さない)
265
+ narrRecheck: { ja: (a) => `このスライドのパーツ ${(a.comps || []).map((t) => `<${t}>`).join('・')} はデータが合わず描けないので、台本とステップの数はデータを直してから確かめ直す(台本は消さない)`,
266
+ en: (a) => `the part ${(a.comps || []).map((t) => `<${t}>`).join(', ')} on this slide cannot draw its data, so the script and the step count are checked again after its data is fixed (keep the script)` },
267
+ // a = {step, line, end, range, static, keys, n, concl, target, lines: [{n, text}], comps: [パーツの名前…]}(keys 以下は narration-lint の orphanDetail)
259
268
  narrOrphan: { rule: 'R-narr-steps',
260
269
  ja: (a) => {
261
270
  const L = a.end > a.line ? `${a.line}〜${a.end}` : `${a.line}`;
262
- if (!a.keys) return `口述原稿の [${a.step}] に当たる段階がスライドにない(narration.md ${L} 行目。このスライドの段階は ${a.range.ja}):その行を前の段階に移すか、${a.step === 'concl' ? 'スライドに結論の行 <div class="concl"><span>…</span></div> を足す(noconcl・static を外す)' : a.static ? 'static を外して段階を付ける' : `スライドに data-step="${a.step}" の要素を足す`}`;
263
- const add = a.step === 'concl' ? 'スライドに結論の行 <div class="concl"><span>…</span></div> を足す(noconcl・static を外す)' : a.static ? 'static を外して段階を付ける' : `スライドに data-step="${a.step}" の要素を足す`;
271
+ if (!a.keys) return `台本の [${a.step}] に当たるステップがスライドにない(narration.md ${L} 行目。このスライドのステップは ${a.range.ja}):その行を前のステップに移すか、${a.step === 'concl' ? 'スライドに結論の行 <div class="concl"><span>…</span></div> を足す(noconcl・static を外す)' : a.static ? 'static を外してステップを付ける' : `スライドに data-step="${a.step}" の要素を足す`}`;
272
+ const add = a.step === 'concl' ? 'スライドに結論の行 <div class="concl"><span>…</span></div> を足す(noconcl・static を外す)' : a.static ? 'static を外してステップを付ける' : `スライドに data-step="${a.step}" の要素を足す`;
264
273
  const lines = (a.lines || []).map((l) => `${l.n} 行目「${l.text.trim()}」`).join('、');
265
- return `口述原稿の [${a.step}] に当たる段階がスライドにない${a.line ? `(narration.md ${L} 行目)` : ''}。このスライドの段階は${a.static ? 'static なので 0 だけ' : `番号が 0〜${a.n}${a.concl ? ' と結論' : ''}`}で、使える鍵は ${a.keys.map((k) => `[${k}]`).join(' ')}。`
266
- + `直し方:(1) 行の頭の「[${a.step}]」を消し、その発言を前の段階 [${a.target}] の発言の後ろに続ける(前の段階に合わせる)か、(2) ${add}`
274
+ return `台本の [${a.step}] に当たるステップがスライドにない${a.line ? `(narration.md ${L} 行目)` : ''}。このスライドのステップは${a.static ? 'static なので 0 だけ' : `番号が 0〜${a.n}${a.concl ? ' と結論' : ''}`}で、使えるステップの指定は ${a.keys.map((k) => `[${k}]`).join(' ')}。`
275
+ + `直し方:(1) 行の頭の「[${a.step}]」を消し、その発言を前のステップ [${a.target}] の発言の後ろに続ける(前のステップに合わせる)か、(2) ${add}`
267
276
  + (lines ? `。直す行:${lines}` : '')
268
- + (a.comps && a.comps.length ? `。このスライドの部品 ${a.comps.map((t) => `<${t}>`).join('・')} はデータが合わず描けないので、その段階を数えていない:先に部品のデータを直す(R-components)` : '');
277
+ + (a.comps && a.comps.length ? `。このスライドのパーツ ${a.comps.map((t) => `<${t}>`).join('・')} はデータが合わず描けないので、そのステップを数えていない:先にパーツのデータを直す(R-components)` : '');
269
278
  },
270
279
  en: (a) => {
271
280
  const L = a.end > a.line ? `lines ${a.line}–${a.end}` : `line ${a.line}`;
272
- if (!a.keys) return `narration [${a.step}] has no matching step on the slide (narration.md ${L}; the slide has ${a.range.en}): move the line into an existing step, or ${a.step === 'concl' ? 'add a conclusion line <div class="concl"><span>…</span></div> (remove noconcl / static)' : a.static ? 'remove static and add steps' : `add an element with data-step="${a.step}"`}`;
281
+ if (!a.keys) return `script [${a.step}] has no matching step on the slide (narration.md ${L}; the slide has ${a.range.en}): move the line into an existing step, or ${a.step === 'concl' ? 'add a conclusion line <div class="concl"><span>…</span></div> (remove noconcl / static)' : a.static ? 'remove static and add steps' : `add an element with data-step="${a.step}"`}`;
273
282
  const add = a.step === 'concl' ? 'add a conclusion line <div class="concl"><span>…</span></div> to the slide (remove noconcl / static)' : a.static ? 'remove static and add steps' : `add an element with data-step="${a.step}" to the slide`;
274
283
  const lines = (a.lines || []).map((l) => `line ${l.n}: “${l.text.trim()}”`).join('; ');
275
- return `narration [${a.step}] has no matching step on the slide${a.line ? ` (narration.md ${L})` : ''}. The slide has ${a.static ? 'only step 0 (static)' : `steps 0–${a.n}${a.concl ? ' and concl' : ''}`}; the valid keys are ${a.keys.map((k) => `[${k}]`).join(' ')}. `
284
+ return `script [${a.step}] has no matching step on the slide${a.line ? ` (narration.md ${L})` : ''}. The slide has ${a.static ? 'only step 0 (static)' : `steps 0–${a.n}${a.concl ? ' and concl' : ''}`}; the valid step labels are ${a.keys.map((k) => `[${k}]`).join(' ')}. `
276
285
  + `Fix: (1) delete “[${a.step}]” at the start of the line and append its turns to the previous step [${a.target}] (merge into that step), or (2) ${add}`
277
286
  + (lines ? `. Lines to change: ${lines}` : '')
278
- + (a.comps && a.comps.length ? `. The component ${a.comps.map((t) => `<${t}>`).join(', ')} on this slide cannot draw its data, so its steps are not counted: fix its data first (R-components)` : '');
287
+ + (a.comps && a.comps.length ? `. The part ${a.comps.map((t) => `<${t}>`).join(', ')} on this slide cannot draw its data, so its steps are not counted: fix its data first (R-components)` : '');
279
288
  } },
280
289
  readingExpr: { rule: 'R-reading', ja: (a) => `読みの指定 ${a.t} が式を読んでいる(narration.md ${a.line} 行目):読みは 1 つの記号か用語だけに付け({θ|シータ})、式は意味を言葉で言う`, en: (a) => `the reading ${a.t} reads an expression (narration.md line ${a.line}): give readings to single symbols or terms only ({θ|theta}) and say the relation in words` },
281
290
  readingSeveral: { rule: 'R-reading', ja: (a) => `読みの指定 ${a.t} に記号が 2 つ以上ある(narration.md ${a.line} 行目):記号ごとに分ける({θ|シータ} と {η|イータ})`, en: (a) => `the reading ${a.t} covers several symbols (narration.md line ${a.line}): give each symbol its own reading ({θ|theta} and {η|eta})` },
282
- // ---------------------------------------------------------------- 色・部品・注目の演出・モーフ・読み上げ
291
+ // ---------------------------------------------------------------- 色・パーツ・強調・モーフ・読み上げ
283
292
  palette: { ja: (a) => `パレット:${a.v} ${a.css} = rgb(${a.rgb})${a.ratio ? ` vs --bg → コントラスト ${a.ratio}:1` : ''}`, en: (a) => `palette: ${a.v} ${a.css} = rgb(${a.rgb})${a.ratio ? ` vs --bg → contrast ${a.ratio}:1` : ''}` },
284
- contrastLow: { rule: 'R-colors', ja: (a) => `${a.v} と --bg のコントラストが低い(${a.ratio}:1 < ${a.min}:1):テーマの色を直す(デッキの中で色を書いていれば消し、テーマの class と変数だけを使う)`, en: (a) => `low contrast between ${a.v} and --bg (${a.ratio}:1 < ${a.min}:1): fix the theme colors (remove any colors written in the deck; use only theme classes and variables)` },
285
- compOrder: { ja: (a) => `部品の描画が呼び出し順に依存している(段階 ${a.k}):render(k, t) が前の呼び出しの状態に頼らないように部品を直す(docs/contract.md §3)`, en: (a) => `the component draws differently depending on call order (step ${a.k}): make render(k, t) independent of previous calls (docs/contract.md §3)` },
286
- compOrderNoise: { ja: (a) => `部品の描画の揺れを許した(段階 ${a.k}):2 回の描画で部品の DOM はバイトまで同じで、違う画素 ${a.n} 個は${a.faint ? `、縁から遠いわずかな違いの ${a.faint} 個(ばらばらで、各チャンネル 24/255 以下)のほかは` : ''}どれも図形の縁にあり、上限 ${a.cap} 以下(描き方のアンチエイリアスの揺れで、呼び出し順への依存ではない。kit/render-compare.mjs)`, en: (a) => `renderer noise accepted (step ${a.k}): the component DOM was byte-identical in both renders and the ${a.n} differing pixel(s) all lie on shape edges${a.faint ? ` except ${a.faint} isolated faint pixel(s) (each channel ≤ 24/255)` : ''}, within the cap of ${a.cap} (anti-aliasing noise, not call-order dependence; kit/render-compare.mjs)` },
287
- compOrderDetail: { ja: (a) => `呼び出し順の検査の詳しい結果(段階 ${a.k}):${a.note}`, en: (a) => `call-order check details (step ${a.k}): ${a.note}` },
288
- markMissing: { rule: 'R-marks', ja: (a) => `注目の演出 {mark:${a.id}} の目印がこのスライドにない:目印の要素に id="${a.id}" か data-mark="${a.id}" を付ける(式の一部は \\htmlId{${a.id}}{…})か、{mark:…} を消す`, en: (a) => `the mark {mark:${a.id}} has no target on this slide: put id="${a.id}" or data-mark="${a.id}" on the element (\\htmlId{${a.id}}{…} in math), or remove the {mark:…}` },
289
- marks: { ja: (a) => `注目の演出:${a.list}`, en: (a) => `attention marks: ${a.list}` },
290
- morphNoSrc: { ja: (a) => `モーフの元のスライド「${a.want}」が見つからない:data-morph="元のスライドの id" にするか、空にして前のスライドから`, en: (a) => `the morph source slide “${a.want}” was not found: set data-morph to the source slide’s id, or leave it empty for the previous slide` },
293
+ contrastLow: { rule: 'R-colors', ja: (a) => `${a.v} と --bg のコントラストが低い(${a.ratio}:1 < ${a.min}:1):テーマの色を直す(教材の中で色を書いていれば消し、テーマの class と変数だけを使う)`, en: (a) => `low contrast between ${a.v} and --bg (${a.ratio}:1 < ${a.min}:1): fix the theme colors (remove any colors written in the lesson; use only theme classes and variables)` },
294
+ compOrder: { ja: (a) => `パーツの描画が呼び出し順に依存している(ステップ ${a.k}):render(k, t) が前の呼び出しの状態に頼らないようにパーツを直す(docs/contract.md §3)`, en: (a) => `the part draws differently depending on call order (step ${a.k}): make render(k, t) independent of previous calls (docs/contract.md §3)` },
295
+ compOrderNoise: { ja: (a) => `パーツの描画の揺れを許した(ステップ ${a.k}):2 回の描画でパーツの DOM はバイトまで同じで、違う画素 ${a.n} 個は${a.faint ? `、縁から遠いわずかな違いの ${a.faint} 個(ばらばらで、各チャンネル 24/255 以下)のほかは` : ''}どれも図形の縁にあり、上限 ${a.cap} 以下(描き方のアンチエイリアスの揺れで、呼び出し順への依存ではない。kit/render-compare.mjs)`, en: (a) => `renderer noise accepted (step ${a.k}): the part DOM was byte-identical in both renders and the ${a.n} differing pixel(s) all lie on shape edges${a.faint ? ` except ${a.faint} isolated faint pixel(s) (each channel ≤ 24/255)` : ''}, within the cap of ${a.cap} (anti-aliasing noise, not call-order dependence; kit/render-compare.mjs)` },
296
+ compOrderDetail: { ja: (a) => `品質チェック(呼び出し順)の詳しい結果(ステップ ${a.k}):${a.note}`, en: (a) => `quality check details (call order, step ${a.k}): ${a.note}` },
297
+ markMissing: { rule: 'R-marks', ja: (a) => `強調 {mark:${a.id}} の目印がこのスライドにない:目印の要素に id="${a.id}" か data-mark="${a.id}" を付ける(式の一部は \\htmlId{${a.id}}{…})か、{mark:…} を消す`, en: (a) => `the emphasis {mark:${a.id}} has no target on this slide: put id="${a.id}" or data-mark="${a.id}" on the element (\\htmlId{${a.id}}{…} in math), or remove the {mark:…}` },
298
+ marks: { ja: (a) => `強調:${a.list}`, en: (a) => `emphasis: ${a.list}` },
299
+ morphNoSrc: { ja: (a) => `モーフの元のスライド「${a.want}」が見つからない:data-morph="元のスライドの id" にするか、空にして前のスライドから`, en: (a) => `the morph source slide “${a.want}” was not found: set data-morph to the slide id of the source slide, or leave it empty for the previous slide` },
291
300
  morphNoIds: { ja: (a) => `モーフ:元のスライド「${a.src}」と同じ data-id の要素がない:動かす要素の両方に同じ data-id を付ける(式の一部は \\morph{ID}{…})`, en: (a) => `morph: no element shares a data-id with the source slide “${a.src}”: give the moving elements the same data-id on both slides (\\morph{ID}{…} in math)` },
292
301
  morphPairs: { ja: (a) => `モーフ(「${a.src}」から):${a.ids}`, en: (a) => `morph (from “${a.src}”): ${a.ids}` },
293
- morphLater: { ja: (a) => `モーフ:段階 0 で見えないので動かさない:${a.ids}`, en: (a) => `morph: not moved because not visible at step 0: ${a.ids}` },
302
+ morphLater: { ja: (a) => `モーフ:ステップ 0 で見えないので動かさない:${a.ids}`, en: (a) => `morph: not moved because not visible at step 0: ${a.ids}` },
294
303
  morphDupSrc: { ja: (a) => `モーフ:元のスライドに data-id「${a.id}」が 2 つ以上ある(初めのものだけを使う):1 つにする`, en: (a) => `morph: the source slide has data-id “${a.id}” more than once (only the first is used): keep one` },
295
304
  morphDupDst: { ja: (a) => `モーフ:data-id「${a.id}」が 2 つ以上ある(初めのものだけを使う):1 つにする`, en: (a) => `morph: data-id “${a.id}” appears more than once (only the first is used): keep one` },
296
305
  imgAlt: { ja: (a) => `alt の無い画像が ${a.n} 枚(${a.list}):内容を alt="…" に書く(飾りなら alt="")`, en: (a) => `${a.n} image(s) without alt (${a.list}): describe them in alt="…" (alt="" if decorative)` },
297
306
  svgName: { ja: (a) => `名前の無い SVG の図が ${a.n} 個:aria-label="…" か <title>…</title> を付ける(飾りなら aria-hidden="true")`, en: (a) => `${a.n} SVG figure(s) without a name: add aria-label="…" or <title>…</title> (aria-hidden="true" if decorative)` },
298
- compName: { ja: (a) => `名前の無い部品:${a.list}(読み上げ用に aria-label="…" を付けられる)`, en: (a) => `components without a name: ${a.list} (an aria-label="…" helps screen readers)` },
299
- timelineTotal: { ja: (a) => `タイムライン合計:${a.s} 秒(${a.n} 段階)`, en: (a) => `timeline total: ${a.s} s (${a.n} steps)` },
307
+ compName: { ja: (a) => `名前の無いパーツ:${a.list}(読み上げ用に aria-label="…" を付けられる)`, en: (a) => `parts without a name: ${a.list} (an aria-label="…" helps screen readers)` },
308
+ timelineTotal: { ja: (a) => `タイムライン合計:${a.s} 秒(${a.n} ステップ)`, en: (a) => `timeline total: ${a.s} s (${a.n} steps)` },
300
309
  slideLength: { ja: (a) => `この枚の長さ:${a.s} 秒`, en: (a) => `slide length: ${a.s} s` },
301
310
  compLayout: { rule: 'R-fit',
302
- ja: (a) => `${compName(a, true)}を置く場所が足りない:${a.msg}。部品を置く場所を広げるか、表示する内容を減らす`,
303
- en: (a) => `${compName(a, false)} does not have enough room: ${a.msg}. Give it more space or show less content` },
311
+ ja: (a) => `${compName(a, true)}を置く場所が足りない:${a.msg}。パーツを置く場所を広げるか、表示する内容を減らす`,
312
+ en: (a) => `${compName(a, false)} does not have enough room: ${a.msg}. Give the part more space or show less content` },
304
313
  compReport: { rule: 'R-components',
305
314
  ja: (a) => `${compName(a, true)}からの知らせ:${a.msg}。表示する値や量、テーマの色を確かめる`,
306
315
  en: (a) => `${compName(a, false)} reports a problem: ${a.msg}. Check the values, the amount of content and the theme colours` },
307
316
  compData: { rule: 'R-components',
308
317
  ja: (a) => `${compName(a, true)}のデータが合わない:${compWhat(a, true)}${compHow(a, true) ? `。${compHow(a, true)}` : ''}`,
309
318
  en: (a) => `${compName(a, false)} has data it cannot draw: ${compWhat(a, false)}${compHow(a, false) ? `. Write it like this: ${compHow(a, false)}` : ''}` },
310
- consoleError: { ja: (a) => `コンソールエラー:${a.e}(デッキの部品やスクリプトを直す)`, en: (a) => `console error: ${a.e} (fix the deck’s component or script)` },
319
+ consoleError: { ja: (a) => `コンソールエラー:${a.e}(教材のパーツやスクリプトを直す)`, en: (a) => `console error: ${a.e} (fix the lesson’s part or script)` },
311
320
  };
312
321
 
313
- // ---------------------------------------------------------------- 部品のデータ(kit/deck.js の DECK.componentErrors。形は kit/shape.js)
322
+ // ---------------------------------------------------------------- パーツのデータ(kit/deck.js の DECK.componentErrors。形は kit/shape.js)
314
323
  // a = {tag, label, index, kind, path, why, expected, got, key, near, keys, attrKeys, arrayKey, inner, msg, attr, dataLike, shape, example}
315
324
  function compWhat(a, ja) {
316
325
  const p = (x) => (x ? x + (ja ? ' ' : '') : ja ? 'データ全体' : 'the data');
@@ -337,15 +346,15 @@ function compWhat(a, ja) {
337
346
  case 'json': return ja ? `データの JSON が読めない(${a.msg})。JSON の書き方(" で囲んだ名前、最後の , なし)に直す` : `the data is not valid JSON (${a.msg}): fix the JSON syntax (quoted names, no trailing commas)`;
338
347
  case 'attrJson': return ja ? `属性 ${a.attr} の値が JSON として読めない(${a.msg})` : `the attribute ${a.attr} is not valid JSON (${a.msg})`;
339
348
  case 'attr': return ja ? `属性 ${a.attr}${a.path ? ` の ${a.path}` : ''} は ${a.expected} のはずが ${a.got}` : `the attribute ${a.attr}${a.path ? ` at ${a.path}` : ''} must be ${a.expected} but is ${a.got}`;
340
- case 'notText': return ja ? 'この部品は JSON ではなく、要素の中に字で書く' : 'this component is written as text inside the element, not as JSON';
349
+ case 'notText': return ja ? 'このパーツは JSON ではなく、要素の中に字で書く' : 'this part is written as text inside the element, not as JSON';
341
350
  case 'empty': return ja ? '要素の中に字がない' : 'there is no text inside the element';
342
- case 'notLinks': return ja ? 'この部品は JSON ではなく、子のリンク <a href> で書く' : 'this component is written as child <a href> links, not as JSON';
351
+ case 'notLinks': return ja ? 'このパーツは JSON ではなく、子のリンク <a href> で書く' : 'this part is written as child <a href> links, not as JSON';
343
352
  case 'noLinks': return ja ? '子のリンク <a href> がない' : 'there are no child <a href> links';
344
- // 部品が ctx.report で知らせた(format spec §8.4。code は data・attr・error など。msg は部品の言葉で [名前] から始まる)
345
- case 'report': return ja ? `部品が知らせた(${a.code}):${a.msg}` : `the component reported (${a.code}): ${a.msg}`;
353
+ // パーツが ctx.report で知らせた(format spec §8.4。code は data・attr・error など。msg はパーツの言葉で [名前] から始まる)
354
+ case 'report': return ja ? `パーツが知らせた(${a.code}):${a.msg}` : `the part reported (${a.code}): ${a.msg}`;
346
355
  default: return a.dataLike
347
- ? (ja ? `部品が描けずに止まった(${a.msg})。データの形が部品の形と合っていないときに出る誤り` : `the component stopped while drawing (${a.msg}); this usually means the data does not have the component’s shape`)
348
- : (ja ? `部品が描けずに止まった(${a.msg})` : `the component stopped while drawing (${a.msg})`);
356
+ ? (ja ? `パーツが描けずに止まった(${a.msg})。データの形がパーツの形と合っていないときに出る誤り` : `the part stopped while drawing (${a.msg}); this usually means the data does not have the part’s shape`)
357
+ : (ja ? `パーツが描けずに止まった(${a.msg})` : `the part stopped while drawing (${a.msg})`);
349
358
  }
350
359
  }
351
360
  function compHow(a, ja) {
@@ -356,7 +365,7 @@ function compHow(a, ja) {
356
365
  }
357
366
  function compName(a, ja) {
358
367
  const n = a.index > 0 ? (ja ? `(${a.index + 1} 個目)` : ` (#${a.index + 1})`) : '';
359
- return ja ? `部品 <${a.tag}>${n}${a.label ? `「${a.label}」` : ''}` : `the component <${a.tag}>${n}${a.label ? ` “${a.label}”` : ''}`;
368
+ return ja ? `パーツ <${a.tag}>${n}${a.label ? `「${a.label}」` : ''}` : `the part <${a.tag}>${n}${a.label ? ` “${a.label}”` : ''}`;
360
369
  }
361
370
 
362
371
  // 知らせの規格の名前(なければ null)。rule は文字列か、値 a から決める関数
@@ -375,7 +384,7 @@ export function message(lang, code, a = {}) {
375
384
  return rule && !t.includes(rule) ? t + (lang === 'en' ? ` (${rule})` : `(${rule})`) : t;
376
385
  }
377
386
 
378
- // 部品の見た目の知らせ(§8.4)。データ・属性・例外は componentErrors が別に扱う。
387
+ // パーツの見た目の知らせ(§8.4)。データ・属性・例外は componentErrors が別に扱う。
379
388
  export function partReportFinding(r) {
380
389
  if (!r || r.kind !== 'report' || ['data', 'attr', 'error'].includes(r.code)) return null;
381
390
  return { slide: r.slide, sev: 'warn', code: r.code === 'layout' ? 'compLayout' : 'compReport', a: r };