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
1 change: 1 addition & 0 deletions Rules/Languages/de/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"plus": "infix=plus || prefix=positiv",
"real-part": "function=der reale teil",
"transpose": "postfix=transponieren || function=transponieren",
"magnitude": "function=; Norm: Norm: Norm; Ende Norm",
"norm": "function=; norm: norm: norm; ende norm",
"trace": "function=; spur : spur: die spur; ende spur",
"dimension": "function=; dimension : dimension: die dimension; ende dimension",
Expand Down
9 changes: 9 additions & 0 deletions tests/Languages/de/intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
use crate::common::*;
use anyhow::Result;

#[test]
fn magnitude_is_localized_as_norm() -> Result<()> {
// Double bars infer the magnitude intent, which should use the German term "Norm".
let expr = "<math><mo>‖</mo><mi>x</mi><mo>‖</mo></math>";
test("de", "ClearSpeak", expr, "Norm von x")?;
test("de", "SimpleSpeak", expr, "Norm von x")?;
Ok(())
}

#[test]
fn clear_speak_short_pause_intent() -> Result<()> {
// A short pause intent should survive intent inference and render as a comma.
Expand Down
Loading