Skip to content

Commit

Permalink
fix(tts): DE play value "TIME" wrong for 00:xx:xx hours (#4242)
Browse files Browse the repository at this point in the history
  • Loading branch information
mha1 authored and pfeerick committed Oct 27, 2023
1 parent 5ba8fc4 commit 5c2acb1
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions radio/src/translations/tts_de.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,37 +196,18 @@ I18N_PLAY_FUNCTION(de, playDuration, int seconds PLAY_DURATION_ATT)
}

if (hours > 0 || IS_PLAY_TIME()) {
if (hours > 1) {
PLAY_NUMBER(hours, 0, 0);
PUSH_NUMBER_PROMPT(DE_PROMPT_STUNDEN);
} else {
PUSH_NUMBER_PROMPT(DE_PROMPT_EINE);
PUSH_NUMBER_PROMPT(DE_PROMPT_STUNDE);
}
PLAY_NUMBER(hours, UNIT_HOURS, 0);
}

if (minutes > 0) {
if (hours)
PUSH_NUMBER_PROMPT(DE_PROMPT_UND);
if (minutes > 1) {
PLAY_NUMBER(minutes, 0, 0);
PUSH_NUMBER_PROMPT(DE_PROMPT_MINUTEN);
} else {
PUSH_NUMBER_PROMPT(DE_PROMPT_EINE);
PUSH_NUMBER_PROMPT(DE_PROMPT_MINUTE);
}
PLAY_NUMBER(minutes, UNIT_MINUTES, 0);
}

if (!IS_PLAY_LONG_TIMER() && seconds > 0) {
if (minutes)
PUSH_NUMBER_PROMPT(DE_PROMPT_UND);
if (seconds > 1) {
PLAY_NUMBER(seconds, 0, 0);
PUSH_NUMBER_PROMPT(DE_PROMPT_SEKUNDEN);
} else {
PUSH_NUMBER_PROMPT(DE_PROMPT_EINE);
PUSH_NUMBER_PROMPT(DE_PROMPT_SEKUNDE);
}

PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
}
}

Expand Down

0 comments on commit 5c2acb1

Please sign in to comment.