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..22eb9ee4 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:
@@ -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
@@ -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: "*"
@@ -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: "*"
@@ -524,19 +524,20 @@
- 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: "左に"] # 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)
+ 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/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/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/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
diff --git a/tests/Languages/ja/ja.rs b/tests/Languages/ja/ja.rs
index 41d1f0f0..6fa91ba6 100644
--- a/tests/Languages/ja/ja.rs
+++ b/tests/Languages/ja/ja.rs
@@ -641,3 +641,34 @@ 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 = "";
+ // 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(());
+}
+
+/// 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 = "";
+ test("ja", "ClearSpeak", expr, "左に 線, 囲み 2 分の 3 囲み終了")?;
+ return Ok(());
+}