Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Rules/Languages/ja/unicode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@
- "^": # 0x5e
- test:
if: "parent::m:modified-variable or parent::m:mover"
then: [t: "帽子帽子"]
else: [t: "ケアト"]
then: [t: "ハット"]
else: [t: "キャレット"]
- "_": [t: "アンダーバー"] # 0x5f
- "`": [t: "墓地"] # 0x60
- "`": [t: "グレイヴアクセント"] # 0x60
- "{": # 0x7b
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
Expand Down Expand Up @@ -205,18 +205,18 @@
then: [t: "中括弧閉じ"]
else: [t: "右中括弧"]

- "~": [t: "チルド"] # 0x7e
- "~": [t: "チルダ"] # 0x7e
- " ": # 0xa0
- test:
# could be mtext in mtd or mtext in an mrow that is a concatenation of mtd's. Is there a better solution?
if: "@data-empty-in-2D and not(ancestor::*[self::m:piecewise or self::m:system-of-equations or self::m:lines])"
then: [t: "空"] # want to say something for fraction (etc) with empty child
else: [t: ""]

- "¬": [t: "コメントはありません"] # 0xac
- "°": [t: "キーワード"] # 0xb0
- "¬": [t: "ノット"] # 0xac
- "°": [t: ""] # 0xb0
- "±": [t: "プラスまたはマイナス"] # 0xb1
- "´": [t: "アキュート"] # 0xb4
- "´": [t: "アキュートアクセント"] # 0xb4
- "·": # 0xB7
- test:
if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')] or not($SpeechStyle = 'ClearSpeak' and $ClearSpeak_MultSymbolDot = 'Auto')"
Expand All @@ -237,14 +237,14 @@
else: [t: "掛ける"]

- "÷": [t: "割る"] # 0xf7
- "̀": [t: "砂利アクセント装飾"] # 0x300
- "́": [t: "アキュート アクセントの装飾"] # 0x301
- "̂": [t: "円滑なアクセントの装飾"] # 0x302
- "̃": [t: "チルド装飾"] # 0x303
- "̀": [t: "グレイヴアクセント装飾"] # 0x300
- "́": [t: "アキュートアクセント装飾"] # 0x301
- "̂": [t: "サーカムフレックス装飾"] # 0x302
- "̃": [t: "チルダ装飾"] # 0x303
- "̄": [t: "マクロン装飾"] # 0x304
- "̅": [t: "オーバーバー装飾"] # 0x305
- "̆": [t: "ブリーブ"] # 0x306
- "̇": [t: "装飾上の点"] # 0x307
- "̆": [t: "ブレーヴェ"] # 0x306
- "̇": [t: "上付きドット装飾"] # 0x307

# Note: ClearSpeak has pref TriangleSymbol for "Δ", but that is wrong
- "Α-Ω":
Expand Down
34 changes: 34 additions & 0 deletions tests/Languages/ja/ja.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,40 @@ fn less_than() -> Result<()> {
return Ok(());
}

/// A hat over a variable is ハット. 帽子 is the thing you wear, and it was said
/// twice.
#[test]
fn accent_hat() -> Result<()> {
let expr = "<math><mover><mi>x</mi><mo>^</mo></mover></math>";
test("ja", "ClearSpeak", expr, "x ハット")?;
return Ok(());
}

/// A tilde is チルダ. チルド is the loanword for "chilled" (as in chilled food).
#[test]
fn accent_tilde() -> Result<()> {
let expr = "<math><mover><mi>x</mi><mo>~</mo></mover></math>";
test("ja", "ClearSpeak", expr, "x チルダ")?;
return Ok(());
}

/// The degree sign is 度. キーワード ("keyword") is not a unit of angle.
#[test]
fn degree_sign() -> Result<()> {
let expr = "<math><mn>90</mn><mo>&#xb0;</mo></math>";
test("ja", "ClearSpeak", expr, "90 度")?;
return Ok(());
}

/// The negation sign is ノット. The seed said コメントはありません -- "there are no
/// comments" -- because the English source word is "not".
#[test]
fn logical_not() -> Result<()> {
let expr = "<math><mo>&#xac;</mo><mi>p</mi></math>";
test("ja", "ClearSpeak", expr, "ノット p")?;
return Ok(());
}

/// Geometry has settled Japanese terms: 線分, 半直線, 弧, 点. The katakana
/// transliterations of the English words are not used for these.
#[test]
Expand Down