From bd3529304cde8505faee547e75330acfdf2600a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasunori=20Morishima=EF=BC=88=E7=9B=9B=E5=B3=B6=E5=BA=B7?= =?UTF-8?q?=E5=BE=B3=EF=BC=89?= Date: Fri, 4 Sep 2026 06:52:59 +0900 Subject: [PATCH 1/5] ja: fix the rule vocabulary outside navigate.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five rule files still carried seed mistranslations of the same kind #746 cleared from navigate.yaml: doubled words, furniture and equipment where mathematics was meant, and English word order glued between Japanese tokens. ClearSpeak multi-line labels: case was ケースケース, step was ステップステップ, equation was 設備 (equipment) and line was ライン; now ケース, ステップ, 式 and 行, in both the count rule and the per-line rule. SharedRules/default.yaml: "table with 3 rows and 4 columns" was テーブルと 3 行 および 4 コラム (the noun first, as in English, and コラム is a newspaper column); it is now 3 行 および 4 列 の表. The menclose line notation was ライン + 左から/アクセス/トップトップ/ボトム ("line" + "from the left" / "access" / "top top" / "bottom"); it is now 左に/右に/上に/下に + 線, side first and the noun last. "with 2 prescripts" was 付き 2 プレスクリプト; it is now 2 個の前置き添字 付き, and the overflow branch's 終了原稿 ("end manuscript", the same seed error family as 事前原稿 in navigate) is 前置き添字終了, with "and alternating prescripts" as および交互の前置き添字. These three are line reorders inside a rule, no lines added or removed. overview.yaml: "the 2 by 3 table" ended in テーブル (furniture); it now ends in の表, the way 行列 is already read. definitions.yaml: "change in" (Δ) was 変更点 ("modification point"), now 変化量. SharedRules/calculus.yaml: ラ・プラハシアン was the en TTS respelling "LahPlahsian" copied as katakana; definitions.yaml already says ラプラシアン, so it does now too. Per AGENTS.md the 22 verified lines are promoted t: -> T:. audit-translations: untranslated text 3674 -> 3652, rule differences 28 -> 28, missing/extra rules 0 -> 0. Two tests cover the multi-line case label and the menclose side line. Left alone on purpose: "such that" (そのようなこと, 4 sites), round (ラウンド値) and fenced-group (フェンスグループ) need a wording decision rather than a swap. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh --- Rules/Languages/ja/ClearSpeak_Rules.yaml | 16 +++++------ Rules/Languages/ja/SharedRules/calculus.yaml | 2 +- Rules/Languages/ja/SharedRules/default.yaml | 24 ++++++++--------- Rules/Languages/ja/definitions.yaml | 2 +- Rules/Languages/ja/overview.yaml | 2 +- tests/Languages/ja/ja.rs | 28 ++++++++++++++++++++ 6 files changed, 51 insertions(+), 23 deletions(-) diff --git a/Rules/Languages/ja/ClearSpeak_Rules.yaml b/Rules/Languages/ja/ClearSpeak_Rules.yaml index f6877ae5..3e30752f 100644 --- a/Rules/Languages/ja/ClearSpeak_Rules.yaml +++ b/Rules/Languages/ja/ClearSpeak_Rules.yaml @@ -612,17 +612,17 @@ - x: "$LineCount" - test: - if: "($ClearSpeak_MultiLineLabel = 'Auto' and self::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case'" - then: [t: "ケースケース"] # phrase(this is the first 'case' of three cases) + then: [T: "ケース"] # phrase(this is the first 'case' of three cases) - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line' or $ClearSpeak_MultiLineLabel = 'None'" # already dealt with Auto/Case - then: [t: "ライン"] # phrase(this is the first 'line' of three lines) + then: [T: "行"] # phrase(this is the first 'line' of three lines) - else_if: "$ClearSpeak_MultiLineLabel = 'Constraint'" then: [t: "制約条件"] # phrase(this is the first 'constraint' of three constraints) - else_if: "$ClearSpeak_MultiLineLabel = 'Equation'" - then: [t: "設備"] # phrase(this is the first 'equation' of three equations) + then: [T: "式"] # phrase(this is the first 'equation' of three equations) - else_if: "$ClearSpeak_MultiLineLabel = 'Row'" then: [t: "行"] # phrase(this is the first 'row' of three rows) - else_if: "$ClearSpeak_MultiLineLabel = 'Step'" - then: [t: "ステップステップ"] # phrase(this is the first 'step' of three steps) + then: [T: "ステップ"] # phrase(this is the first 'step' of three steps) # else 'None -- don't say anything' - test: - if: "$LineCount != 1" @@ -642,17 +642,17 @@ - pause: medium - test: - if: "($ClearSpeak_MultiLineLabel = 'Auto' and parent::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case'" - then: [t: "ケースケース"] # phrase(in this 'case' x is not equal to y) + then: [T: "ケース"] # phrase(in this 'case' x is not equal to y) - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line'" # already dealt with Auto/Case - then: [t: "ライン"] # phrase(the straight 'line' between x and y) + then: [T: "行"] # phrase(the straight 'line' between x and y) - else_if: "$ClearSpeak_MultiLineLabel = 'Constraint'" then: [t: "制約条件"] # phrase(there is a 'constraint' on possible values) - else_if: "$ClearSpeak_MultiLineLabel = 'Equation'" - then: [t: "設備"] # phrase(the 'equation' pi r squared gives the area of a circle) + then: [T: "式"] # phrase(the 'equation' pi r squared gives the area of a circle) - else_if: "$ClearSpeak_MultiLineLabel = 'Row'" then: [t: "行"] # phrase(the values on the top 'row' are relevant) - else_if: "$ClearSpeak_MultiLineLabel = 'Step'" - then: [t: "ステップステップ"] # phrase(this is a 'step' by step process) + then: [T: "ステップ"] # phrase(this is a 'step' by step process) # else 'None -- don't say anything' - x: "count(preceding-sibling::*[not(contains(@data-intent-property, ':continued-row:'))]) + 1" - test: diff --git a/Rules/Languages/ja/SharedRules/calculus.yaml b/Rules/Languages/ja/SharedRules/calculus.yaml index 3ec41db2..b1999c5c 100644 --- a/Rules/Languages/ja/SharedRules/calculus.yaml +++ b/Rules/Languages/ja/SharedRules/calculus.yaml @@ -4,7 +4,7 @@ tag: laplacian match: "count(*) <= 1" # can be on ∇^2 or on enclosing mrow replace: - - t: "ラ・プラハシアン" # phrase('laplacian' of x) -- "LahPlahsian" sounds better with speech engines tested + - T: "ラプラシアン" # phrase('laplacian' of x) -- "LahPlahsian" sounds better with speech engines tested - test: if: "count(*) = 1" then: diff --git a/Rules/Languages/ja/SharedRules/default.yaml b/Rules/Languages/ja/SharedRules/default.yaml index 97d5dc15..070a04c3 100644 --- a/Rules/Languages/ja/SharedRules/default.yaml +++ b/Rules/Languages/ja/SharedRules/default.yaml @@ -295,9 +295,9 @@ - test: # only bother announcing if there is more than one prescript if: "count($Prescripts) > 2" then: - - t: "付き" # phrase(substitute x 'with' y) - x: "count($Prescripts) div 2" - - t: "プレスクリプト" # phrase(in this equation certain 'prescripts' apply) + - T: "個の前置き添字" # phrase(in this equation certain 'prescripts' apply) + - T: "付き" # phrase(substitute x 'with' y) - pause: short - test: if: "not($Prescripts[1][self::m:none])" @@ -332,9 +332,9 @@ - test: if: "count($Prescripts) > 4" # give up and just dump them out so at least the content is there then: - - t: "プレスクリプトの改変" # phrase(in this case there are values 'and alternating prescripts') + - T: "および交互の前置き添字" # phrase(in this case there are values 'and alternating prescripts') - x: "$Prescripts[position() > 4]" - - t: "終了原稿" # phrase(This is where 'end prescripts' occurs) + - T: "前置き添字終了" # phrase(This is where 'end prescripts' occurs) - test: if: "$Postscripts" then: @@ -428,7 +428,6 @@ - NumColumns: "count(*[1]/*) - IfThenElse(*/self::m:mlabeledtr, 1, 0)" match: "." replace: - - t: "テーブルと" # phrase(the 'table with' 3 rows) - x: count(*) - test: if: count(*)=1 @@ -438,8 +437,9 @@ - x: "$NumColumns" - test: if: "NumColumns=1" - then: [t: "コラム"] # phrase(the table with 3 rows and 1 'column') - else: [t: "コラム"] # phrase(the table with 3 rows and 4 'columns') + then: [T: "列"] # phrase(the table with 3 rows and 1 'column') + else: [T: "列"] # phrase(the table with 3 rows and 4 'columns') + - T: "の表" # phrase(the 'table with' 3 rows) - pause: long - x: "*" @@ -524,19 +524,19 @@ - test: if: ".[ contains(concat(' ', normalize-space(@notation), ' '), ' left ') or contains(concat(' ', normalize-space(@notation), ' '), ' right ') or contains(@notation,'top') or contains(@notation,'bottom') ]" then: - - t: "ライン" # phrase(draw a straight 'line' on the page) - test: if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' left ')]" - then: [t: "左から", pause: short] # phrase(line on 'left' of the expression) + then: [T: "左に", pause: short] # phrase(line on 'left' of the expression) - test: if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' right ')]" - then: [t: "アクセス", pause: short] # phrase(line on 'right' of the expression) + then: [T: "右に", pause: short] # phrase(line on 'right' of the expression) - test: if: ".[contains(@notation,'top')]" - then: [t: "トップトップ", pause: short] # phrase(line on 'top' of the expression) + then: [T: "上に", pause: short] # phrase(line on 'top' of the expression) - test: if: ".[contains(@notation,'bottom')]" - then: [t: "ボトム", pause: short] # phrase(line on the 'bottom' of the expression) + then: [T: "下に", pause: short] # phrase(line on the 'bottom' of the expression) + - T: "線" # phrase(draw a straight 'line' on the page) - test: if: ".[ contains(@notation,'updiagonalstrike') or contains(@notation,'downdiagonalstrike') or contains(@notation,'verticalstrike') or contains(@notation,'horizontalstrike') ]" then: diff --git a/Rules/Languages/ja/definitions.yaml b/Rules/Languages/ja/definitions.yaml index fc0b2767..c92c2a31 100644 --- a/Rules/Languages/ja/definitions.yaml +++ b/Rules/Languages/ja/definitions.yaml @@ -252,7 +252,7 @@ ## Default fixity prefix "angle": "prefix=角", "angle-measure": "prefix=角の大きさ", - "change": "prefix=変更点", + "change": "prefix=変化量", "for-all": "prefix=すべての", "measured-angle": "prefix=測定角", "not": "prefix=でない", diff --git a/Rules/Languages/ja/overview.yaml b/Rules/Languages/ja/overview.yaml index 8c25e191..d16565cb 100644 --- a/Rules/Languages/ja/overview.yaml +++ b/Rules/Languages/ja/overview.yaml @@ -86,7 +86,7 @@ - x: count(*[2]/*) - t: "かける" - x: count(*[2]/*[self::m:mtr][1]/*) - - t: "テーブル" + - T: "の表" - name: short-mrow tag: mrow diff --git a/tests/Languages/ja/ja.rs b/tests/Languages/ja/ja.rs index 41d1f0f0..846a3869 100644 --- a/tests/Languages/ja/ja.rs +++ b/tests/Languages/ja/ja.rs @@ -641,3 +641,31 @@ fn permutation_p_notation() -> Result<()> { test("ja", "SimpleSpeak", expr, "5 個から 2 個取る順列")?; return Ok(()); } + +/// Multi-line labels: a system of equations labelled as cases is announced as +/// "2 ケース" and each line as "ケース 1", "ケース 2" (the seed doubled the word +/// and used 設備 "equipment" for equation). +#[test] +fn multiline_case_label() -> Result<()> { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + "; + test_ClearSpeak("ja", "ClearSpeak_MultiLineLabel", "Case", expr, + "2 ケース; ケース 1; x プラス y, イコール 7; ケース 2; 2 x プラス 3 y; イコール 17")?; + return Ok(()); +} + +/// menclose with a line on one side: the side comes first and the noun last, +/// "左に 線" ("a line on the left"); the seed said ライン アクセス for line-on-right. +#[test] +fn menclose_line_on_left() -> Result<()> { + let expr = " + 32 + "; + test("ja", "ClearSpeak", expr, "左に 線, 2 分の 3 を囲む 囲み終了")?; + return Ok(()); +} From f121987f0fb38393d807fd52bdd875ab137320f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasunori=20Morishima=EF=BC=88=E7=9B=9B=E5=B3=B6=E5=BA=B7?= =?UTF-8?q?=E5=BE=B3=EF=BC=89?= Date: Fri, 4 Sep 2026 07:11:55 +0900 Subject: [PATCH 2/5] ja: finish the vocabulary in the same rules (postscripts, enclosure, matrix column) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up inside the same commit's scope, found by re-reading the rules the first pass touched. The postscripts branch is the mirror of the prescripts one and had the same two faults: 付き N 投稿原稿 read "with N postscripts" in English order and 投稿原稿 is a manuscript submitted to a magazine; the overflow branch said スクリプトの変更と変更 ("script change and change") and エンドスクリプト. They now read N 個の後置き添字 付き, および交互の添字 and 添字終了, matching the prescripts wording. menclose's own enclosure markers were transliterations: エンクロージャー and エンドエンクロージャ. The marker is emitted before the content, so a verb phrase does not work; it is 囲み ... 囲み終了, the marker/end-marker shape this language already uses (上付き ... 上付き終了). The side pause moved with the noun, so the announcement is 左に 線, ... rather than 左に, 線 .... The matrix column rule still said コラム after the table rule was fixed; it is now 列 like the rest. audit-translations: untranslated text 3674 -> 3645, rule differences 28 -> 28, missing/extra rules 0 -> 0. Left alone on purpose: ロングディビジョンシンボル ("long division symbol") needs a wording decision, as do such-that, round and fenced-group. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh --- Rules/Languages/ja/SharedRules/default.yaml | 25 +++++++++++---------- tests/Languages/ja/ja.rs | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Rules/Languages/ja/SharedRules/default.yaml b/Rules/Languages/ja/SharedRules/default.yaml index 070a04c3..22eb9ee4 100644 --- a/Rules/Languages/ja/SharedRules/default.yaml +++ b/Rules/Languages/ja/SharedRules/default.yaml @@ -349,9 +349,9 @@ - test: if: "$Prescripts" then: [t: "および"] # phrase(10 is greater than 8 'and' less than 15) - - t: "付き" # phrase(substitute x 'with' y) - x: "count($Postscripts) div 2" - - t: "投稿原稿" # phrase(this material includes several 'postscripts') + - T: "個の後置き添字" # phrase(this material includes several 'postscripts') + - T: "付き" # phrase(substitute x 'with' y) - pause: short - test: if: "not($Postscripts[1][self::m:none])" @@ -417,9 +417,9 @@ - test: if: "count($Postscripts) > 8" # give up and just dump them out so at least the content is there then: - - t: "スクリプトの変更と変更" # phrase(this situation involves complexities 'and alternating scripts') + - T: "および交互の添字" # phrase(this situation involves complexities 'and alternating scripts') - x: "$Postscripts[position() > 8]" - - t: "エンドスクリプト" # phrase(At this point 'end scripts' occurs) + - T: "添字終了" # phrase(At this point 'end scripts' occurs) - name: default tag: mtable @@ -474,7 +474,7 @@ # if: not($IsColumnSilent) and ($ClearSpeak_Matrix = 'SpeakColNum' or count(preceding-sibling::*) != 0) if: "not($IsColumnSilent)" then: - - t: "コラム" # phrase(the first 'column' of the matrix) + - T: "列" # phrase(the first 'column' of the matrix) - x: "count(preceding-sibling::*)+IfThenElse(parent::m:mlabeledtr, 0, 1)" - pause: medium - x: "*" @@ -526,17 +526,18 @@ then: - test: if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' left ')]" - then: [T: "左に", pause: short] # phrase(line on 'left' of the expression) + then: [T: "左に"] # phrase(line on 'left' of the expression) - test: if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' right ')]" - then: [T: "右に", pause: short] # phrase(line on 'right' of the expression) + then: [T: "右に"] # phrase(line on 'right' of the expression) - test: if: ".[contains(@notation,'top')]" - then: [T: "上に", pause: short] # phrase(line on 'top' of the expression) + then: [T: "上に"] # phrase(line on 'top' of the expression) - test: if: ".[contains(@notation,'bottom')]" - then: [T: "下に", pause: short] # phrase(line on the 'bottom' of the expression) - - T: "線" # phrase(draw a straight 'line' on the page) + then: [T: "下に"] # phrase(line on the 'bottom' of the expression) + - T: "線" + - pause: short # phrase(draw a straight 'line' on the page) - test: if: ".[ contains(@notation,'updiagonalstrike') or contains(@notation,'downdiagonalstrike') or contains(@notation,'verticalstrike') or contains(@notation,'horizontalstrike') ]" then: @@ -609,14 +610,14 @@ - test: if: ".[contains(@notation,'radical')]" then: [t: "平方根", pause: short] # phrase(5 is the 'square root' of 25) - - t: "エンクロージャー" # phrase(parentheses are 'enclosing' part of the equation) + - T: "囲み" # phrase(parentheses are 'enclosing' part of the equation) - test: if: "*[self::m:mtext and .=' ']" then: [t: "スペース"] # otherwise there is complete silence # phrase(there is a 'space' between the words) else: [x: "*"] - test: if: "$Impairment = 'Blindness' and ( $SpeechStyle != 'SimpleSpeak' or not(IsNode(*[1], 'leaf')) )" - then: [t: "エンドエンクロージャ"] # phrase(reached the 'end enclosure' point) + then: [T: "囲み終了"] # phrase(reached the 'end enclosure' point) - pause: short - name: semantics diff --git a/tests/Languages/ja/ja.rs b/tests/Languages/ja/ja.rs index 846a3869..5ac1003c 100644 --- a/tests/Languages/ja/ja.rs +++ b/tests/Languages/ja/ja.rs @@ -666,6 +666,6 @@ fn menclose_line_on_left() -> Result<()> { let expr = " 32 "; - test("ja", "ClearSpeak", expr, "左に 線, 2 分の 3 を囲む 囲み終了")?; + test("ja", "ClearSpeak", expr, "左に 線, 囲み 2 分の 3 囲み終了")?; return Ok(()); } From 55af209053759aeeb9daa8904f96c84d4c2c43ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasunori=20Morishima=EF=BC=88=E7=9B=9B=E5=B3=B6=E5=BA=B7?= =?UTF-8?q?=E5=BE=B3=EF=BC=89?= Date: Fri, 4 Sep 2026 07:20:26 +0900 Subject: [PATCH 3/5] ja: unify the laplacian reading in unicode-full.yaml too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Caught in review. unicode-full.yaml was already inconsistent with itself: the verbose branch said ラプラシアン の while the two terse branches still said ラ・プラハシアン, the en TTS respelling "LahPlahsian" copied as katakana. All three now say ラプラシアン, matching definitions.yaml, unicode.yaml and SharedRules/calculus.yaml. This file is otherwise being left for the MathPlayer-derived seed; these three lines are only the reading of one word already decided elsewhere, so a reseed can overwrite them harmlessly. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh --- Rules/Languages/ja/unicode-full.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rules/Languages/ja/unicode-full.yaml b/Rules/Languages/ja/unicode-full.yaml index e2e236b9..6e143239 100644 --- a/Rules/Languages/ja/unicode-full.yaml +++ b/Rules/Languages/ja/unicode-full.yaml @@ -691,9 +691,9 @@ if: "following-sibling::*" then_test: if: "$Verbosity!='Terse'" - then: [t: "ラプラシアン の"] # "LahPlahsian" sounds better than "laplacian" in speech engines tested - else: [t: "ラ・プラハシアン"] - else: [t: "ラ・プラハシアン"] + then: [T: "ラプラシアン の"] # "LahPlahsian" sounds better than "laplacian" in speech engines tested + else: [T: "ラプラシアン"] + else: [T: "ラプラシアン"] - "∇": [t: "ナブラ"] # 0x2207 - "∉": # 0x2209 From 4d22a8715874bebd8e0232a0581262a1cec475d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasunori=20Morishima=EF=BC=88=E7=9B=9B=E5=B3=B6=E5=BA=B7?= =?UTF-8?q?=E5=BE=B3=EF=BC=89?= Date: Fri, 4 Sep 2026 08:32:23 +0900 Subject: [PATCH 4/5] ja: sweep the same multi-line labels in the SimpleSpeak path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #747 has landed, so SharedRules/general.yaml is free to touch. It carries the SimpleSpeak copy of the multi-line labels this branch already fixed in ClearSpeak_Rules.yaml, and leaving it would have made the two styles disagree: ClearSpeak saying ケース and SimpleSpeak ケースケース for the same piecewise. Both rules in general.yaml now read ケース, 式 and 行, and the test asserts the SimpleSpeak path as well as ClearSpeak. The rest of general.yaml (vector, end, sub, the chemistry terms) is a separate batch, not this one. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh --- Rules/Languages/ja/SharedRules/general.yaml | 12 ++++++------ tests/Languages/ja/ja.rs | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Rules/Languages/ja/SharedRules/general.yaml b/Rules/Languages/ja/SharedRules/general.yaml index 1642e6fa..5d6c3b28 100644 --- a/Rules/Languages/ja/SharedRules/general.yaml +++ b/Rules/Languages/ja/SharedRules/general.yaml @@ -499,10 +499,10 @@ - x: "$LineCount" - test: - if: "self::m:piecewise" - then: [t: "ケースケース"] # phrase(this is the first 'case' of three cases) + then: [T: "ケース"] # phrase(this is the first 'case' of three cases) - else_if: "self::m:system-of-equations" - then: [t: "設備"] # phrase(this is the first 'equation' of three equations) - else: [t: "ライン"] # phrase(this is the first 'line' of three lines) + then: [T: "式"] # phrase(this is the first 'equation' of three equations) + else: [T: "行"] # phrase(this is the first 'line' of three lines) - test: - if: "$LineCount != 1" then: [ct: ""] # plural @@ -522,10 +522,10 @@ - pause: medium - test: - if: "parent::m:piecewise" - then: [t: "ケースケース"] # phrase('case' 1 of 10 cases) + then: [T: "ケース"] # phrase('case' 1 of 10 cases) - else_if: "parent::m:system-of-equations" - then: [t: "設備"] # phrase('equation' 1 of 10 equations) - else: [t: "ライン"] # phrase('line 1 of 10 lines) + then: [T: "式"] # phrase('equation' 1 of 10 equations) + else: [T: "行"] # phrase('line 1 of 10 lines) - x: "count(preceding-sibling::*[not(contains(@data-intent-property, ':continued-row:'))]) + 1" - test: if: "self::m:mlabeledtr" diff --git a/tests/Languages/ja/ja.rs b/tests/Languages/ja/ja.rs index 5ac1003c..c2576c59 100644 --- a/tests/Languages/ja/ja.rs +++ b/tests/Languages/ja/ja.rs @@ -654,6 +654,8 @@ fn multiline_case_label() -> Result<()> { 2x+3y = 17 "; + // SimpleSpeak reaches the same labels through SharedRules/general.yaml. + test("ja", "SimpleSpeak", expr, "PLACEHOLDER")?; test_ClearSpeak("ja", "ClearSpeak_MultiLineLabel", "Case", expr, "2 ケース; ケース 1; x プラス y, イコール 7; ケース 2; 2 x プラス 3 y; イコール 17")?; return Ok(()); From 1813798351ae2abd45a6aba0883bd1425323f342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasunori=20Morishima=EF=BC=88=E7=9B=9B=E5=B3=B6=E5=BA=B7?= =?UTF-8?q?=E5=BE=B3=EF=BC=89?= Date: Fri, 4 Sep 2026 08:38:40 +0900 Subject: [PATCH 5/5] ja: assert the SimpleSpeak multi-line labels too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SimpleSpeak path classifies this table as a system of equations rather than cases, so it reads 2 式 / 式 1 / 式 2 through SharedRules/general.yaml while ClearSpeak with MultiLineLabel=Case reads ケース. Both are now asserted. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh --- tests/Languages/ja/ja.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Languages/ja/ja.rs b/tests/Languages/ja/ja.rs index c2576c59..6fa91ba6 100644 --- a/tests/Languages/ja/ja.rs +++ b/tests/Languages/ja/ja.rs @@ -654,8 +654,9 @@ fn multiline_case_label() -> Result<()> { 2x+3y = 17 "; - // SimpleSpeak reaches the same labels through SharedRules/general.yaml. - test("ja", "SimpleSpeak", expr, "PLACEHOLDER")?; + // SimpleSpeak reaches the same labels through SharedRules/general.yaml, and + // classifies this as a system of equations rather than cases: 2 式, 式 1, 式 2. + test("ja", "SimpleSpeak", expr, "2 式; 式 1; x プラス y, イコール 7; 式 2; 2 x プラス 3 y; イコール 17")?; test_ClearSpeak("ja", "ClearSpeak_MultiLineLabel", "Case", expr, "2 ケース; ケース 1; x プラス y, イコール 7; ケース 2; 2 x プラス 3 y; イコール 17")?; return Ok(());