diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 21:09:22 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 21:09:22 +0000 |
commit | 8894799c1339f0b1b15fe3825145d722ac062f29 (patch) | |
tree | b04d8ffb5d7fc15ec9afdd9d2d46d0d80e2e6bcc /main/say.c | |
parent | bd62b77d24a831775c450004078d3a443109cf68 (diff) |
Merged revisions 69358 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69358 | russell | 2007-06-14 16:08:23 -0500 (Thu, 14 Jun 2007) | 3 lines
Fix some problems with saying dates and times for the "tw" langauge
(issue #9964, ljmid)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69360 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/say.c')
-rw-r--r-- | main/say.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/main/say.c b/main/say.c index 340b5faa0..fcb066e5a 100644 --- a/main/say.c +++ b/main/say.c @@ -5336,7 +5336,7 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha char sndfile[256], nextmsg[256]; if (format == NULL) - format = "YBdA 'digits/at' HM"; + format = "YBdAkM"; ast_localtime(&time,&tm,timezone); @@ -5375,16 +5375,17 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha case 'e': /* First - Thirtyfirst */ if (!(tm.tm_mday % 10) || (tm.tm_mday < 10)) { - snprintf(nextmsg,sizeof(nextmsg), "digits/h-%d", tm.tm_mday); + snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday); res = wait_file(chan,ints,nextmsg,lang); } else { - snprintf(nextmsg,sizeof(nextmsg), "digits/h-%dh", tm.tm_mday - (tm.tm_mday % 10)); + snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday - (tm.tm_mday % 10)); res = wait_file(chan,ints,nextmsg,lang); if (!res) { - snprintf(nextmsg,sizeof(nextmsg), "digits/h-%d", tm.tm_mday % 10); + snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday % 10); res = wait_file(chan,ints,nextmsg,lang); } } + if(!res) res = wait_file(chan,ints,"ri",lang); break; case 'Y': /* Year */ @@ -5454,12 +5455,12 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha } break; case 'H': + if (tm.tm_hour < 10) { + res = wait_file(chan, ints, "digits/0", lang); + } case 'k': /* 24-Hour */ if (!(tm.tm_hour % 10) || tm.tm_hour < 10) { - if (tm.tm_hour < 10) { - res = wait_file(chan, ints, "digits/0", lang); - } snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour); res = wait_file(chan,ints,nextmsg,lang); } else { @@ -5560,7 +5561,7 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha } break; case 'R': - res = ast_say_date_with_format_tw(chan, time, ints, lang, "HM", timezone); + res = ast_say_date_with_format_tw(chan, time, ints, lang, "kM", timezone); break; case 'S': /* Seconds */ |