diff --git a/Rules/Languages/de/ClearSpeak_Rules.yaml b/Rules/Languages/de/ClearSpeak_Rules.yaml index 32b761dd..ce0f1c3c 100644 --- a/Rules/Languages/de/ClearSpeak_Rules.yaml +++ b/Rules/Languages/de/ClearSpeak_Rules.yaml @@ -630,7 +630,7 @@ - if: "*[1][.='log']" then: [T: "log"] - else_if: $ClearSpeak_Log = 'LnAsNaturalLog' - then: [T: "Natürliche Logarithmus"] + then: [T: "natürlicher Logarithmus"] else: [spell: "'ln'"] else: - test: @@ -640,7 +640,7 @@ - if: "*[1][.='log']" then: [T: "log"] - else_if: $ClearSpeak_Log = 'LnAsNaturalLog' - then: [T: "Natürliche Logarithmus"] + then: [T: "natürliche Logarithmus"] else: [spell: "'ln'"] - T: "von" - pause: short @@ -661,21 +661,36 @@ - x: "$LineCount" - test: - if: "($ClearSpeak_MultiLineLabel = 'Auto' and self::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case'" - then: [t: "fall"] # phrase(this is the first 'case' of three cases) + then_test: + if: "$LineCount = 1" + then: [T: "fall"] + else: [T: "fälle"] - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line' or $ClearSpeak_MultiLineLabel = 'None'" # already dealt with Auto/Case - then: [t: "zeile"] # phrase(this is the first 'line' of three lines) + then_test: + if: "$LineCount = 1" + then: [T: "zeile"] + else: [T: "zeilen"] - else_if: "$ClearSpeak_MultiLineLabel = 'Constraint'" - then: [t: "bedingung"] # phrase(this is the first 'constraint' of three constraints) + then_test: + if: "$LineCount = 1" + then: [T: "bedingung"] + else: [T: "bedingungen"] - else_if: "$ClearSpeak_MultiLineLabel = 'Equation'" - then: [t: "gleichung"] # phrase(this is the first 'equation' of three equations) + then_test: + if: "$LineCount = 1" + then: [T: "gleichung"] + else: [T: "gleichungen"] - else_if: "$ClearSpeak_MultiLineLabel = 'Row'" - then: [t: "reihe"] # phrase(this is the first 'row' of three rows) + then_test: + if: "$LineCount = 1" + then: [T: "reihe"] + else: [T: "reihen"] - else_if: "$ClearSpeak_MultiLineLabel = 'Step'" - then: [t: "stufe"] # phrase(this is the first 'step' of three steps) + then_test: + if: "$LineCount = 1" + then: [T: "stufe"] + else: [T: "stufen"] # else 'None -- don't say anything' - - test: - - if: "$LineCount != 1" - then: [ct: "s"] # plural # phrase(shown by the letter 's') - pause: short - x: "*" - pause: long @@ -707,7 +722,7 @@ - test: if: "self::m:mlabeledtr" then: - - t: "with label" # phrase(the diagram is complete 'with label') + - t: "mit Beschriftung" # phrase(the diagram is complete 'with label') - x: "*[1]/*" - test: - if: "$ClearSpeak_MultiLineLabel='None'" diff --git a/tests/Languages/de/ClearSpeak/functions.rs b/tests/Languages/de/ClearSpeak/functions.rs index 97f642f1..aa856036 100644 --- a/tests/Languages/de/ClearSpeak/functions.rs +++ b/tests/Languages/de/ClearSpeak/functions.rs @@ -151,8 +151,8 @@ fn normal_ln() -> Result<()> { fn simple_natural_log() -> Result<()> { let expr = " lnx "; test_ClearSpeak("de", "ClearSpeak_Log", "LnAsNaturalLog",expr, - "Natürliche Logarithmus x")?; - return Ok(()); + "natürlicher Logarithmus x")?; + Ok(()) } @@ -161,8 +161,8 @@ fn simple_natural_log() -> Result<()> { fn natural_log() -> Result<()> { let expr = "ln(x+y)"; test_ClearSpeak("de", "ClearSpeak_Log", "LnAsNaturalLog",expr, - "der Natürliche Logarithmus von, klammer auf x plus y, klammer zu")?; - return Ok(()); + "der natürliche Logarithmus von, klammer auf x plus y, klammer zu")?; + Ok(()) } @@ -565,4 +565,4 @@ fn parens_interval_neg_infinity_to_pos_infinity() -> Result<()> { return Ok(()); } -*/ \ No newline at end of file +*/ diff --git a/tests/Languages/de/ClearSpeak/multiline.rs b/tests/Languages/de/ClearSpeak/multiline.rs index 6354081c..9003b868 100644 --- a/tests/Languages/de/ClearSpeak/multiline.rs +++ b/tests/Languages/de/ClearSpeak/multiline.rs @@ -43,7 +43,7 @@ fn equation_auto() -> Result<()> { "; test_ClearSpeak("de", "ClearSpeak_MultiLineLabel", "Auto", expr, - "2 zeiles; zeile 1; x plus y, ist gleich 7; zeile 2; 2 x plus 3 y; ist gleich 17")?; + "2 zeilen; zeile 1; x plus y, ist gleich 7; zeile 2; 2 x plus 3 y; ist gleich 17")?; return Ok(()); } @@ -195,4 +195,4 @@ fn continued_row() -> Result<()> { test("de", "SimpleSpeak", expr, "2 equations; equation 1; x is equal to y plus 1; equation 2; y is equal to 1")?; } -*/ \ No newline at end of file +*/ diff --git a/tests/Languages/de/mtable.rs b/tests/Languages/de/mtable.rs index 07ed85c2..472e5868 100644 --- a/tests/Languages/de/mtable.rs +++ b/tests/Languages/de/mtable.rs @@ -37,6 +37,21 @@ fn determinant_1x1() -> Result<()> { } +#[test] +fn single_line_with_label() -> Result<()> { + let expr = r#" + + + (2) + 𝑏=2 + + + "#; + test_prefs("de", "ClearSpeak", vec![("Verbosity", "Terse")], + expr, "1 zeile, mit Beschriftung 2; b ist gleich 2")?; + Ok(()) +} + /* #[test] @@ -1128,4 +1143,4 @@ fn single_line_with_label() -> Result<()> { } return Ok(()); -*/ \ No newline at end of file +*/