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
39 changes: 27 additions & 12 deletions Rules/Languages/de/ClearSpeak_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'"
Expand Down
10 changes: 5 additions & 5 deletions tests/Languages/de/ClearSpeak/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ fn normal_ln() -> Result<()> {
fn simple_natural_log() -> Result<()> {
let expr = "<math> <mrow> <mi>ln</mi><mi>x</mi></mrow> </math>";
test_ClearSpeak("de", "ClearSpeak_Log", "LnAsNaturalLog",expr,
"Natürliche Logarithmus x")?;
return Ok(());
"natürlicher Logarithmus x")?;
Ok(())

}

Expand All @@ -161,8 +161,8 @@ fn simple_natural_log() -> Result<()> {
fn natural_log() -> Result<()> {
let expr = "<math><mi>ln</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo></math>";
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(())

}

Expand Down Expand Up @@ -565,4 +565,4 @@ fn parens_interval_neg_infinity_to_pos_infinity() -> Result<()> {
return Ok(());

}
*/
*/
4 changes: 2 additions & 2 deletions tests/Languages/de/ClearSpeak/multiline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn equation_auto() -> Result<()> {
</math>
";
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(());
}

Expand Down Expand Up @@ -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")?;
}
*/
*/
17 changes: 16 additions & 1 deletion tests/Languages/de/mtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ fn determinant_1x1() -> Result<()> {

}

#[test]
fn single_line_with_label() -> Result<()> {
let expr = r#"<math>
<mtable class="gather" displaystyle="true" intent=":system-of-equations">
<mtr>
<mtd intent=":equation-label"><mtext>(2)</mtext></mtd>
<mtd><mi>𝑏</mi><mo>=</mo><mn>2</mn></mtd>
</mtr>
</mtable>
</math>"#;
test_prefs("de", "ClearSpeak", vec![("Verbosity", "Terse")],
expr, "1 zeile, mit Beschriftung 2; b ist gleich 2")?;
Ok(())
}


/*
#[test]
Expand Down Expand Up @@ -1128,4 +1143,4 @@ fn single_line_with_label() -> Result<()> {
}
return Ok(());

*/
*/
Loading