Summary: | ASTERISK-05134: [patch] Danish time is said wrong | ||
Reporter: | Leif Neland (lenne_dk) | Labels: | |
Date Opened: | 2005-09-23 04:53:51 | Date Closed: | 2008-01-15 15:49:26.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) say.patch | |
Description: | In danish, the "ones" come before the "tens", i.e. 21 is "en og tyve", "one and twenty". The say_number_da has it right, but say_time_da doesn't. Instead of duplicating the logic, just call say_number from say_time to say minutes and seconds. ****** ADDITIONAL INFORMATION ****** # diff work/asterisk-1.0.9/say.c ~/say.c 2097,2099d2096 < } else if ((tm.tm_min < 21) || (tm.tm_min % 10 == 0)) { < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_min); < res = wait_file(chan,ints,nextmsg,lang); 2101,2112c2098 < int ten, one; < ten = (tm.tm_min / 10) * 10; < one = (tm.tm_min % 10); < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", ten); < res = wait_file(chan,ints,nextmsg,lang); < if (!res) { < /* Fifty, not fifty-zero */ < if (one != 0) { < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", one); < res = wait_file(chan,ints,nextmsg,lang); < } < } --- > res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL); 2186,2188d2171 < } else if ((tm.tm_sec < 21) || (tm.tm_sec % 10 == 0)) { < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec); < res = wait_file(chan,ints,nextmsg,lang); 2190,2201c2173 < int ten, one; < ten = (tm.tm_sec / 10) * 10; < one = (tm.tm_sec % 10); < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", ten); < res = wait_file(chan,ints,nextmsg,lang); < if (!res) { < /* Fifty, not fifty-zero */ < if (one != 0) { < snprintf(nextmsg,sizeof(nextmsg), "digits/%d", one); < res = wait_file(chan,ints,nextmsg,lang); < } < } --- > res = ast_say_number(chan, tm.tm_sec, ints, lang, (char *) NULL); | ||
Comments: | By: Clod Patry (junky) 2005-09-23 06:51:53 Please ATTACH a patch UNIFIED (diff -u), like said un the bug guidelines. Thanks. By: Leif Neland (lenne_dk) 2005-09-23 07:45:53 No disclaimer, use as you like... By: Clod Patry (junky) 2005-09-23 08:46:02 Delete attchment, cause it the patch from ASTERISK-5133 . By: Kevin P. Fleming (kpfleming) 2005-09-26 22:29:47 Committed to CVS HEAD, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:49:26.000-0600 Repository: asterisk Revision: 6673 U trunk/say.c ------------------------------------------------------------------------ r6673 | kpfleming | 2008-01-15 15:49:25 -0600 (Tue, 15 Jan 2008) | 2 lines say minutes/seconds using existing 'say number' code for Danish (issue ASTERISK-5134) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=6673 |