mod_say_es: fix grammar when saying dates and time (MODAPP-429)
This commit is contained in:
parent
65400642f7
commit
6bed19b2d6
|
@ -111,16 +111,23 @@ static switch_status_t play_group(switch_say_method_t method, int a, int b, int
|
||||||
if (b > 1) {
|
if (b > 1) {
|
||||||
switch (b) {
|
switch (b) {
|
||||||
case 2:
|
case 2:
|
||||||
if (c) {
|
if (method != SSM_COUNTED) {
|
||||||
say_file("digits/veinti.wav");
|
if (c) {
|
||||||
} else {
|
say_file("digits/veinti.wav");
|
||||||
say_file("digits/20.wav");
|
} else {
|
||||||
|
say_file("digits/20.wav");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
say_file("digits/%d0.wav", b);
|
if ((b < 4) && (method == SSM_COUNTED)) {
|
||||||
if (c) {
|
say_file("digits/h-%d0.wav", b);
|
||||||
say_file("currency/and.wav");
|
} else {
|
||||||
|
say_file("digits/%d0.wav", b);
|
||||||
|
if (c) {
|
||||||
|
say_file("currency/and.wav");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +314,7 @@ static switch_status_t es_say_time(switch_core_session_t *session, char *tosay,
|
||||||
if (say_date) {
|
if (say_date) {
|
||||||
say_file("time/day-%d.wav", tm.tm_wday);
|
say_file("time/day-%d.wav", tm.tm_wday);
|
||||||
say_file("time/mon-%d.wav", tm.tm_mon);
|
say_file("time/mon-%d.wav", tm.tm_mon);
|
||||||
say_num(tm.tm_mday, SSM_COUNTED);
|
say_num(tm.tm_mday, SSM_PRONOUNCED);
|
||||||
say_num(tm.tm_year + 1900, SSM_PRONOUNCED);
|
say_num(tm.tm_year + 1900, SSM_PRONOUNCED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,9 +334,10 @@ static switch_status_t es_say_time(switch_core_session_t *session, char *tosay,
|
||||||
say_num(hour, SSM_PRONOUNCED);
|
say_num(hour, SSM_PRONOUNCED);
|
||||||
|
|
||||||
if (tm.tm_min > 9) {
|
if (tm.tm_min > 9) {
|
||||||
|
say_file("currency/and.wav");
|
||||||
say_num(tm.tm_min, SSM_PRONOUNCED);
|
say_num(tm.tm_min, SSM_PRONOUNCED);
|
||||||
} else if (tm.tm_min) {
|
} else if (tm.tm_min) {
|
||||||
say_file("time/oh.wav");
|
say_file("currency/and.wav");
|
||||||
say_num(tm.tm_min, SSM_PRONOUNCED);
|
say_num(tm.tm_min, SSM_PRONOUNCED);
|
||||||
} else {
|
} else {
|
||||||
say_file("time/oclock.wav");
|
say_file("time/oclock.wav");
|
||||||
|
|
Loading…
Reference in New Issue