From 518b8cc408c09b2bc1eda2b64fe3374f83a47ace Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 23 Aug 2007 09:13:15 +0000 Subject: Patch FS#7641 by Daniel Dalton, talking clock improvements git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14437 a1c6a512-1295-4272-9138-f99709370657 --- apps/lang/english.lang | 17 +++++++++++++++++ apps/menus/main_menu.c | 20 +++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 29e2d1df79..02296bd2ab 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -11105,3 +11105,20 @@ rtc: "A M" + + id: VOICE_OH + desc: spoken only, for wall clock announce + user: + + *: none + rtc: "" + + + *: none + rtc: "" + + + *: none + rtc: "oh" + + diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index b6fee4416d..822301fe52 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -227,30 +227,40 @@ static bool show_info(void) /* Voice the minutes */ if (tm->tm_min == 0) { - /*say o'clock if the minute is 0. */ + /* Say o'clock if the minute is 0. */ talk_id(VOICE_OCLOCK, true); } else { + /* Pronounce the leading 0 */ + if(tm->tm_min < 10) + { + talk_id(VOICE_OH, true); + } talk_number(tm->tm_min, true); } - talk_id(am_pm_id, true); } else { - /*voice the time in 24 hour format*/ + /* Voice the time in 24 hour format */ talk_number(tm->tm_hour, true); if (tm->tm_min == 0) { - /*say o'clock if the minute is 0. */ - talk_id(VOICE_OCLOCK, true); + talk_id(VOICE_HUNDRED, true); + talk_id(VOICE_HOUR, true); } else { + /* Pronounce the leading 0 */ + if(tm->tm_min < 10) + { + talk_id(VOICE_OH, true); + } talk_number(tm->tm_min, true); } } + talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true); talk_number(tm->tm_mday, true); talk_number(1900 + tm->tm_year, true); -- cgit v1.2.3