From d1b2826a91768b0651a9a3689c174f9c15abc66b Mon Sep 17 00:00:00 2001 From: 3djc <5167938+3djc@users.noreply.github.com> Date: Wed, 16 Sep 2026 04:47:00 +0200 Subject: [PATCH] fix(audio): long timer announced as "1 hour 60" before hour rollover (#7784) Co-authored-by: Claude Opus 5 --- radio/src/translations/tts/tts_cn.cpp | 8 ++++---- radio/src/translations/tts/tts_cz.cpp | 8 ++++---- radio/src/translations/tts/tts_da.cpp | 8 ++++---- radio/src/translations/tts/tts_de.cpp | 8 ++++---- radio/src/translations/tts/tts_en.cpp | 8 ++++---- radio/src/translations/tts/tts_es.cpp | 8 ++++---- radio/src/translations/tts/tts_fr.cpp | 8 ++++---- radio/src/translations/tts/tts_he.cpp | 8 ++++---- radio/src/translations/tts/tts_hu.cpp | 8 ++++---- radio/src/translations/tts/tts_it.cpp | 8 ++++---- radio/src/translations/tts/tts_nl.cpp | 8 ++++---- radio/src/translations/tts/tts_pl.cpp | 8 ++++---- radio/src/translations/tts/tts_pt.cpp | 8 ++++---- radio/src/translations/tts/tts_ru.cpp | 8 ++++---- radio/src/translations/tts/tts_se.cpp | 8 ++++---- radio/src/translations/tts/tts_sk.cpp | 8 ++++---- radio/src/translations/tts/tts_ua.cpp | 8 ++++---- 17 files changed, 68 insertions(+), 68 deletions(-) diff --git a/radio/src/translations/tts/tts_cn.cpp b/radio/src/translations/tts/tts_cn.cpp index 71a84dd80..bd699e298 100644 --- a/radio/src/translations/tts/tts_cn.cpp +++ b/radio/src/translations/tts/tts_cn.cpp @@ -108,16 +108,16 @@ I18N_PLAY_FUNCTION(cn, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_cz.cpp b/radio/src/translations/tts/tts_cz.cpp index faf870e79..629395c19 100644 --- a/radio/src/translations/tts/tts_cz.cpp +++ b/radio/src/translations/tts/tts_cz.cpp @@ -169,16 +169,16 @@ I18N_PLAY_FUNCTION(cz, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, FEMALE); } diff --git a/radio/src/translations/tts/tts_da.cpp b/radio/src/translations/tts/tts_da.cpp index 48764c985..727b350ce 100644 --- a/radio/src/translations/tts/tts_da.cpp +++ b/radio/src/translations/tts/tts_da.cpp @@ -104,16 +104,16 @@ I18N_PLAY_FUNCTION(da, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_de.cpp b/radio/src/translations/tts/tts_de.cpp index 092d41e3e..ec7d36a90 100644 --- a/radio/src/translations/tts/tts_de.cpp +++ b/radio/src/translations/tts/tts_de.cpp @@ -149,16 +149,16 @@ I18N_PLAY_FUNCTION(de, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_en.cpp b/radio/src/translations/tts/tts_en.cpp index 6dc643d77..ef5194aee 100644 --- a/radio/src/translations/tts/tts_en.cpp +++ b/radio/src/translations/tts/tts_en.cpp @@ -107,16 +107,16 @@ I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_es.cpp b/radio/src/translations/tts/tts_es.cpp index 0d285d3d0..15b93389f 100644 --- a/radio/src/translations/tts/tts_es.cpp +++ b/radio/src/translations/tts/tts_es.cpp @@ -155,16 +155,16 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { if (hours > 1) { PLAY_NUMBER(hours, 0, 0); diff --git a/radio/src/translations/tts/tts_fr.cpp b/radio/src/translations/tts/tts_fr.cpp index dc5505eea..a5b566beb 100644 --- a/radio/src/translations/tts/tts_fr.cpp +++ b/radio/src/translations/tts/tts_fr.cpp @@ -139,16 +139,16 @@ I18N_PLAY_FUNCTION(fr, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (IS_PLAY_TIME() && hours == 0) { PUSH_NUMBER_PROMPT(FR_PROMPT_MINUIT); } else if (IS_PLAY_TIME() && hours == 12) { diff --git a/radio/src/translations/tts/tts_he.cpp b/radio/src/translations/tts/tts_he.cpp index debb03120..1f2ff51d9 100644 --- a/radio/src/translations/tts/tts_he.cpp +++ b/radio/src/translations/tts/tts_he.cpp @@ -108,16 +108,16 @@ I18N_PLAY_FUNCTION(he, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_hu.cpp b/radio/src/translations/tts/tts_hu.cpp index 1092ad771..b2b4a1a76 100644 --- a/radio/src/translations/tts/tts_hu.cpp +++ b/radio/src/translations/tts/tts_hu.cpp @@ -108,16 +108,16 @@ I18N_PLAY_FUNCTION(hu, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_it.cpp b/radio/src/translations/tts/tts_it.cpp index 519308e54..aea03b6d5 100644 --- a/radio/src/translations/tts/tts_it.cpp +++ b/radio/src/translations/tts/tts_it.cpp @@ -158,16 +158,16 @@ I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_nl.cpp b/radio/src/translations/tts/tts_nl.cpp index 4009d9ff3..7e6ba2ebd 100644 --- a/radio/src/translations/tts/tts_nl.cpp +++ b/radio/src/translations/tts/tts_nl.cpp @@ -110,16 +110,16 @@ I18N_PLAY_FUNCTION(nl, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_pl.cpp b/radio/src/translations/tts/tts_pl.cpp index 32a27d64a..512880bf0 100644 --- a/radio/src/translations/tts/tts_pl.cpp +++ b/radio/src/translations/tts/tts_pl.cpp @@ -215,16 +215,16 @@ I18N_PLAY_FUNCTION(pl, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, ZENSKI); } diff --git a/radio/src/translations/tts/tts_pt.cpp b/radio/src/translations/tts/tts_pt.cpp index df0111bbe..f1cf1fdb3 100644 --- a/radio/src/translations/tts/tts_pt.cpp +++ b/radio/src/translations/tts/tts_pt.cpp @@ -143,16 +143,16 @@ I18N_PLAY_FUNCTION(pt, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { if (hours > 2) { PLAY_NUMBER(hours, 0, 0); diff --git a/radio/src/translations/tts/tts_ru.cpp b/radio/src/translations/tts/tts_ru.cpp index bedbb54dd..f1093b08d 100644 --- a/radio/src/translations/tts/tts_ru.cpp +++ b/radio/src/translations/tts/tts_ru.cpp @@ -170,16 +170,16 @@ I18N_PLAY_FUNCTION(ru, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_se.cpp b/radio/src/translations/tts/tts_se.cpp index 694092c59..58e5fe260 100644 --- a/radio/src/translations/tts/tts_se.cpp +++ b/radio/src/translations/tts/tts_se.cpp @@ -103,16 +103,16 @@ I18N_PLAY_FUNCTION(se, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); } diff --git a/radio/src/translations/tts/tts_sk.cpp b/radio/src/translations/tts/tts_sk.cpp index a3a4a1858..df0a7d8e9 100644 --- a/radio/src/translations/tts/tts_sk.cpp +++ b/radio/src/translations/tts/tts_sk.cpp @@ -165,16 +165,16 @@ I18N_PLAY_FUNCTION(sk, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, ZENSKY); } diff --git a/radio/src/translations/tts/tts_ua.cpp b/radio/src/translations/tts/tts_ua.cpp index bac69c5cf..eac048684 100644 --- a/radio/src/translations/tts/tts_ua.cpp +++ b/radio/src/translations/tts/tts_ua.cpp @@ -169,16 +169,16 @@ I18N_PLAY_FUNCTION(ua, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } + if (IS_PLAY_LONG_TIMER()) { + seconds += 30; + } + int hours, minutes; hours = seconds / 3600; seconds = seconds % 3600; minutes = seconds / 60; seconds = seconds % 60; - if (IS_PLAY_LONG_TIMER() && seconds >= 30) { - minutes += 1; - } - if (hours > 0 || IS_PLAY_TIME()) { PLAY_NUMBER(hours, UNIT_HOURS, 0); }