From 071416d73d62a4f4be6274dd49f0df50f7ee7f53 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 27 Oct 2023 10:48:07 +0200 Subject: [PATCH] fix(tts): DE play value "TIME" wrong for 00:xx:xx hours (#4242) --- radio/src/translations/tts_de.cpp | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/radio/src/translations/tts_de.cpp b/radio/src/translations/tts_de.cpp index 85a33f0145e..9934b8a6660 100644 --- a/radio/src/translations/tts_de.cpp +++ b/radio/src/translations/tts_de.cpp @@ -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); } }