Merged revisions 204556 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r204556 | tilghman | 2009-06-30 15:23:51 -0500 (Tue, 30 Jun 2009) | 6 lines
  
  More incorrect language codes, plus ensuring that regionalizations use the specified language, and not English for grammar.
  (closes issue #15022)
   Reported by: greenfieldtech
   Patches: 
         20090519__issue15022.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Tilghman Lesher 17 years ago
parent fa1f156dba
commit ff4bfb966a

@ -50,7 +50,9 @@ From 1.6.1 to 1.6.2:
In reality, the "tw" language code is reserved for the Twi language, native In reality, the "tw" language code is reserved for the Twi language, native
to Ghana. If you were previously using the "tw" language code, you should to Ghana. If you were previously using the "tw" language code, you should
switch to using either "zh" (for Mandarin Chinese) or "zh_TW" for Taiwan switch to using either "zh" (for Mandarin Chinese) or "zh_TW" for Taiwan
specific localizations. specific localizations. Additionally, "mx" should be changed to "es_MX",
Georgian was incorrectly specified as "ge" but should be "ka", and Czech is
"cs", not "cz".
From 1.6.0.1 to 1.6.1: From 1.6.0.1 to 1.6.1:

@ -288,9 +288,9 @@ static int say_digit_str_full(struct ast_channel *chan, const char *str, const c
\arg \b pt - Portuguese \arg \b pt - Portuguese
\arg \b pt_BR - Portuguese (Brazil) \arg \b pt_BR - Portuguese (Brazil)
\arg \b se - Swedish \arg \b se - Swedish
\arg \b tw - Taiwanese / Chinese \arg \b zh - Taiwanese / Chinese
\arg \b ru - Russian \arg \b ru - Russian
\arg \b ge - Georgian \arg \b ka - Georgian
\arg \b hu - Hungarian \arg \b hu - Hungarian
\par Gender: \par Gender:
@ -330,7 +330,7 @@ static int say_digit_str_full(struct ast_channel *chan, const char *str, const c
/* Forward declarations of language specific variants of ast_say_number_full */ /* Forward declarations of language specific variants of ast_say_number_full */
static int ast_say_number_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
static int ast_say_number_full_cz(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_cs(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
static int ast_say_number_full_da(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_da(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
static int ast_say_number_full_de(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_de(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
static int ast_say_number_full_en_GB(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_en_GB(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
@ -346,7 +346,7 @@ static int ast_say_number_full_se(struct ast_channel *chan, int num, const char
static int ast_say_number_full_zh(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_zh(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
static int ast_say_number_full_ru(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_ru(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
static int ast_say_number_full_ge(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_ka(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
static int ast_say_number_full_hu(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_hu(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
static int ast_say_number_full_th(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd); static int ast_say_number_full_th(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd);
static int ast_say_number_full_ur(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd); static int ast_say_number_full_ur(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd);
@ -365,7 +365,7 @@ static int ast_say_date_fr(struct ast_channel *chan, time_t t, const char *ints,
static int ast_say_date_nl(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_nl(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_pt(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_pt(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_date_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_date_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
@ -392,7 +392,7 @@ static int ast_say_time_pt(struct ast_channel *chan, time_t t, const char *ints,
static int ast_say_time_pt_BR(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_pt_BR(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_zh(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_zh(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_time_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_time_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
@ -405,7 +405,7 @@ static int ast_say_datetime_pt(struct ast_channel *chan, time_t t, const char *i
static int ast_say_datetime_pt_BR(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_pt_BR(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_zh(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_zh(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_gr(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_hu(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_th(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
@ -413,7 +413,7 @@ static int ast_say_datetime_he(struct ast_channel *chan, time_t t, const char *i
static int ast_say_datetime_from_now_en(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_from_now_en(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_from_now_fr(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_from_now_fr(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_from_now_pt(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_from_now_pt(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_from_now_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_from_now_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int ast_say_datetime_from_now_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang); static int ast_say_datetime_from_now_he(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
static int wait_file(struct ast_channel *chan, const char *ints, const char *file, const char *lang) static int wait_file(struct ast_channel *chan, const char *ints, const char *file, const char *lang)
@ -430,52 +430,52 @@ static int wait_file(struct ast_channel *chan, const char *ints, const char *fil
/* Called from AGI */ /* Called from AGI */
static int say_number_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int say_number_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
if (!strcasecmp(language, "en") ) { /* English syntax */ if (!strncasecmp(language, "en_GB", 5)) { /* British syntax */
return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_en_GB(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "cz") ) { /* Czech syntax */ } else if (!strncasecmp(language, "en", 2)) { /* English syntax */
return(ast_say_number_full_cz(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "da") ) { /* Danish syntax */ } else if (!strncasecmp(language, "cs", 2)) { /* Czech syntax */
return(ast_say_number_full_da(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_cs(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "de") ) { /* German syntax */ } else if (!strncasecmp(language, "da", 2)) { /* Danish syntax */
return(ast_say_number_full_de(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_da(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "en_GB") ) { /* British syntax */ } else if (!strncasecmp(language, "de", 2)) { /* German syntax */
return(ast_say_number_full_en_GB(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_de(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "no") ) { /* Norwegian syntax */ } else if (!strncasecmp(language, "es", 2)) { /* Spanish syntax */
return(ast_say_number_full_no(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_es(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "es") || !strcasecmp(language, "mx")) { /* Spanish syntax */ } else if (!strncasecmp(language, "fr", 2)) { /* French syntax */
return(ast_say_number_full_es(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_fr(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "fr") ) { /* French syntax */ } else if (!strncasecmp(language, "gr", 2)) { /* Greek syntax */
return(ast_say_number_full_fr(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_gr(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "he") ) { /* Hebrew syntax */ } else if (!strncasecmp(language, "he", 2)) { /* Hebrew syntax */
return(ast_say_number_full_he(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_he(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "hu") ) { /* Hungarian syntax */ } else if (!strncasecmp(language, "hu", 2)) { /* Hungarian syntax */
return(ast_say_number_full_hu(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_hu(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "it") ) { /* Italian syntax */ } else if (!strncasecmp(language, "it", 2)) { /* Italian syntax */
return(ast_say_number_full_it(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_it(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "nl") ) { /* Dutch syntax */ } else if (!strncasecmp(language, "ka", 2)) { /* Georgian syntax */
return(ast_say_number_full_nl(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_ka(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "pl") ) { /* Polish syntax */ } else if (!strncasecmp(language, "nl", 2)) { /* Dutch syntax */
return(ast_say_number_full_pl(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_nl(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "pt") || !strcasecmp(language, "pt_BR")) { /* Portuguese syntax */ } else if (!strncasecmp(language, "no", 2)) { /* Norwegian syntax */
return(ast_say_number_full_pt(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_no(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "se") ) { /* Swedish syntax */ } else if (!strncasecmp(language, "pl", 2)) { /* Polish syntax */
return(ast_say_number_full_se(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_pl(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strncasecmp(language, "zh", 2) ) { /* Taiwanese / Chinese syntax */ } else if (!strncasecmp(language, "pt", 2)) { /* Portuguese syntax */
return(ast_say_number_full_zh(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_pt(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "gr") ) { /* Greek syntax */ } else if (!strncasecmp(language, "ru", 2)) { /* Russian syntax */
return(ast_say_number_full_gr(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_ru(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "ru") ) { /* Russian syntax */ } else if (!strncasecmp(language, "se", 2)) { /* Swedish syntax */
return(ast_say_number_full_ru(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_se(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "th") ) { /* Thai syntax */ } else if (!strncasecmp(language, "th", 2)) { /* Thai syntax */
return(ast_say_number_full_th(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_th(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "ur") ) { /* Urdu syntax */ } else if (!strncasecmp(language, "zh", 2)) { /* Taiwanese / Chinese syntax */
return(ast_say_number_full_ur(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_zh(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "ge") ) { /* Georgian syntax */ } else if (!strncasecmp(language, "ur", 2)) { /* Urdu syntax */
return(ast_say_number_full_ge(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_number_full_ur(chan, num, ints, language, options, audiofd, ctrlfd);
} }
/* Default to english */ /* Default to english */
return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd);
} }
/*! \brief ast_say_number_full_en: English syntax */ /*! \brief ast_say_number_full_en: English syntax */
@ -552,7 +552,7 @@ static int exp10_int(int power)
return res; return res;
} }
/*! \brief ast_say_number_full_cz: Czech syntax */ /*! \brief ast_say_number_full_cs: Czech syntax */
/* files needed: /* files needed:
* 1m,2m - gender male * 1m,2m - gender male
* 1w,2w - gender female * 1w,2w - gender female
@ -573,7 +573,7 @@ static int exp10_int(int power)
* tousand, milion are gender male, so 1 and 2 is 1m 2m * tousand, milion are gender male, so 1 and 2 is 1m 2m
* miliard is gender female, so 1 and 2 is 1w 2w * miliard is gender female, so 1 and 2 is 1w 2w
*/ */
static int ast_say_number_full_cz(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int ast_say_number_full_cs(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
int res = 0; int res = 0;
int playh = 0; int playh = 0;
@ -616,7 +616,7 @@ static int ast_say_number_full_cz(struct ast_channel *chan, int num, const char
} else if ( hundered == 2 ) { } else if ( hundered == 2 ) {
ast_copy_string(fn, "digits/2ste", sizeof(fn)); ast_copy_string(fn, "digits/2ste", sizeof(fn));
} else { } else {
res = ast_say_number_full_cz(chan, hundered, ints, language, options, audiofd, ctrlfd); res = ast_say_number_full_cs(chan, hundered, ints, language, options, audiofd, ctrlfd);
if (res) if (res)
return res; return res;
if (hundered == 3 || hundered == 4) { if (hundered == 3 || hundered == 4) {
@ -640,7 +640,7 @@ static int ast_say_number_full_cz(struct ast_channel *chan, int num, const char
} }
} }
if ( left > 1 ) { /* we dont say "one thousand" but only thousand */ if ( left > 1 ) { /* we dont say "one thousand" but only thousand */
res = ast_say_number_full_cz(chan, left, ints, language, options, audiofd, ctrlfd); res = ast_say_number_full_cs(chan, left, ints, language, options, audiofd, ctrlfd);
if (res) if (res)
return res; return res;
} }
@ -2280,9 +2280,6 @@ static int ast_say_number_full_zh(struct ast_channel *chan, int num, const char
playz++; playz++;
continue; continue;
} }
if (strcasecmp(language,"twz") == 0)
snprintf(fn, sizeof(fn), "digits/%d", num);
else
snprintf(fn, sizeof(fn), "digits/%d", num); snprintf(fn, sizeof(fn), "digits/%d", num);
num = 0; num = 0;
} else if (num < 100) { } else if (num < 100) {
@ -2595,18 +2592,18 @@ static int ast_say_number_full_th(struct ast_channel *chan, int num, const char
/* Called from AGI */ /* Called from AGI */
static int say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
if (!strcasecmp(language, "en") ) { /* English syntax */ if (!strncasecmp(language, "en", 2)) { /* English syntax */
return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd);
} else if (!strcasecmp(language, "da") ) { /* Danish syntax */ } else if (!strncasecmp(language, "da", 2)) { /* Danish syntax */
return(ast_say_enumeration_full_da(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_enumeration_full_da(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "de") ) { /* German syntax */ } else if (!strncasecmp(language, "de", 2)) { /* German syntax */
return(ast_say_enumeration_full_de(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_enumeration_full_de(chan, num, ints, language, options, audiofd, ctrlfd);
} else if (!strcasecmp(language, "he")) { /* Hebrew syntax */ } else if (!strncasecmp(language, "he", 2)) { /* Hebrew syntax */
return (ast_say_enumeration_full_he(chan, num, ints, language, options, audiofd, ctrlfd)); return ast_say_enumeration_full_he(chan, num, ints, language, options, audiofd, ctrlfd);
} }
/* Default to english */ /* Default to english */
return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd)); return ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd);
} }
/*! \brief ast_say_enumeration_full_en: English syntax */ /*! \brief ast_say_enumeration_full_en: English syntax */
@ -3124,32 +3121,32 @@ static int ast_say_enumeration_full_he(struct ast_channel *chan, int num, const
static int say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
if (!strcasecmp(lang, "en") ) { /* English syntax */ if (!strncasecmp(lang, "en", 2)) { /* English syntax */
return(ast_say_date_en(chan, t, ints, lang)); return ast_say_date_en(chan, t, ints, lang);
} else if (!strcasecmp(lang, "da") ) { /* Danish syntax */ } else if (!strncasecmp(lang, "da", 2)) { /* Danish syntax */
return(ast_say_date_da(chan, t, ints, lang)); return ast_say_date_da(chan, t, ints, lang);
} else if (!strcasecmp(lang, "de") ) { /* German syntax */ } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */
return(ast_say_date_de(chan, t, ints, lang)); return ast_say_date_de(chan, t, ints, lang);
} else if (!strcasecmp(lang, "fr") ) { /* French syntax */ } else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
return(ast_say_date_fr(chan, t, ints, lang)); return ast_say_date_fr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "hu") ) { /* Hungarian syntax */ } else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
return(ast_say_date_hu(chan, t, ints, lang)); return ast_say_date_gr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ } else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
return(ast_say_date_nl(chan, t, ints, lang)); return ast_say_date_he(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt") || !strcasecmp(lang, "pt_BR")) { /* Portuguese syntax */ } else if (!strncasecmp(lang, "hu", 2)) { /* Hungarian syntax */
return(ast_say_date_pt(chan, t, ints, lang)); return ast_say_date_hu(chan, t, ints, lang);
} else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ } else if (!strncasecmp(lang, "ka", 2)) { /* Georgian syntax */
return(ast_say_date_gr(chan, t, ints, lang)); return ast_say_date_ka(chan, t, ints, lang);
} else if (!strcasecmp(lang, "th") ) { /* Thai syntax */ } else if (!strncasecmp(lang, "nl", 2)) { /* Dutch syntax */
return(ast_say_date_th(chan, t, ints, lang)); return ast_say_date_nl(chan, t, ints, lang);
} else if (!strcasecmp(lang, "ge") ) { /* Georgian syntax */ } else if (!strncasecmp(lang, "pt", 2)) { /* Portuguese syntax */
return(ast_say_date_ge(chan, t, ints, lang)); return ast_say_date_pt(chan, t, ints, lang);
} else if (!strcasecmp(lang, "he")) { /* Hebrew syntax */ } else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
return (ast_say_date_he(chan, t, ints, lang)); return ast_say_date_th(chan, t, ints, lang);
} }
/* Default to English */ /* Default to English */
return(ast_say_date_en(chan, t, ints, lang)); return ast_say_date_en(chan, t, ints, lang);
} }
/* English syntax */ /* English syntax */
@ -3469,36 +3466,36 @@ int ast_say_date_he(struct ast_channel *chan, time_t t, const char *ints, const
static int say_date_with_format(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *tzone) static int say_date_with_format(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *tzone)
{ {
if (!strcasecmp(lang, "en") ) { /* English syntax */ if (!strncasecmp(lang, "en", 2)) { /* English syntax */
return (ast_say_date_with_format_en(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_en(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "da") ) { /* Danish syntax */ } else if (!strncasecmp(lang, "da", 2)) { /* Danish syntax */
return(ast_say_date_with_format_da(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_da(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "de") ) { /* German syntax */ } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */
return(ast_say_date_with_format_de(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_de(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "es") || !strcasecmp(lang, "mx")) { /* Spanish syntax */ } else if (!strncasecmp(lang, "es", 2)) { /* Spanish syntax */
return (ast_say_date_with_format_es(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_es(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "he")) { /* Hebrew syntax */ } else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
return (ast_say_date_with_format_he(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_he(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "fr")) { /* French syntax */ } else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
return (ast_say_date_with_format_fr(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_fr(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "it")) { /* Italian syntax */ } else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
return (ast_say_date_with_format_it(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_gr(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "nl")) { /* Dutch syntax */ } else if (!strncasecmp(lang, "it", 2)) { /* Italian syntax */
return (ast_say_date_with_format_nl(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_it(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "pl")) { /* Polish syntax */ } else if (!strncasecmp(lang, "nl", 2)) { /* Dutch syntax */
return (ast_say_date_with_format_pl(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_nl(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "pt") || !strcasecmp(lang, "pt_BR")) { /* Portuguese syntax */ } else if (!strncasecmp(lang, "pl", 2)) { /* Polish syntax */
return (ast_say_date_with_format_pt(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_pl(chan, t, ints, lang, format, tzone);
} else if (!strncasecmp(lang, "zh", 2) ) { /* Taiwanese / Chinese syntax */ } else if (!strncasecmp(lang, "pt", 2)) { /* Portuguese syntax */
return (ast_say_date_with_format_zh(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_pt(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "th") ) { /* Thai syntax */ } else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
return (ast_say_date_with_format_th(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_th(chan, t, ints, lang, format, tzone);
} else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ } else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
return (ast_say_date_with_format_gr(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_zh(chan, t, ints, lang, format, tzone);
} }
/* Default to English */ /* Default to English */
return(ast_say_date_with_format_en(chan, t, ints, lang, format, tzone)); return ast_say_date_with_format_en(chan, t, ints, lang, format, tzone);
} }
/* English syntax */ /* English syntax */
@ -6074,34 +6071,34 @@ int ast_say_date_with_format_zh(struct ast_channel *chan, time_t t, const char *
static int say_time(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int say_time(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
if (!strcasecmp(lang, "en") ) { /* English syntax */ if (!strncasecmp(lang, "en", 2)) { /* English syntax */
return(ast_say_time_en(chan, t, ints, lang)); return ast_say_time_en(chan, t, ints, lang);
} else if (!strcasecmp(lang, "de") ) { /* German syntax */ } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */
return(ast_say_time_de(chan, t, ints, lang)); return ast_say_time_de(chan, t, ints, lang);
} else if (!strcasecmp(lang, "fr") ) { /* French syntax */ } else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
return(ast_say_time_fr(chan, t, ints, lang)); return ast_say_time_fr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "hu") ) { /* Hungarian syntax */ } else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
return ast_say_time_gr(chan, t, ints, lang);
} else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
return ast_say_time_he(chan, t, ints, lang);
} else if (!strncasecmp(lang, "hu", 2)) { /* Hungarian syntax */
return(ast_say_time_hu(chan, t, ints, lang)); return(ast_say_time_hu(chan, t, ints, lang));
} else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ } else if (!strncasecmp(lang, "ka", 2)) { /* Georgian syntax */
return(ast_say_time_nl(chan, t, ints, lang)); return ast_say_time_ka(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ } else if (!strncasecmp(lang, "nl", 2)) { /* Dutch syntax */
return(ast_say_time_pt(chan, t, ints, lang)); return ast_say_time_nl(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt_BR") ) { /* Brazilian Portuguese syntax */ } else if (!strncasecmp(lang, "pt_BR", 5)) { /* Brazilian Portuguese syntax */
return(ast_say_time_pt_BR(chan, t, ints, lang)); return ast_say_time_pt_BR(chan, t, ints, lang);
} else if (!strncasecmp(lang, "zh", 2) ) { /* Taiwanese / Chinese syntax */ } else if (!strncasecmp(lang, "pt", 2)) { /* Portuguese syntax */
return(ast_say_time_zh(chan, t, ints, lang)); return ast_say_time_pt(chan, t, ints, lang);
} else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ } else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
return(ast_say_time_gr(chan, t, ints, lang));
} else if (!strcasecmp(lang, "th") ) {
return(ast_say_time_th(chan, t, ints, lang)); return(ast_say_time_th(chan, t, ints, lang));
} else if (!strcasecmp(lang, "ge") ) { /* Georgian syntax */ } else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
return(ast_say_time_ge(chan, t, ints, lang)); return ast_say_time_zh(chan, t, ints, lang);
} else if (!strcasecmp(lang, "he")) { /* Hebrew syntax */
return (ast_say_time_he(chan, t, ints, lang));
} }
/* Default to English */ /* Default to English */
return(ast_say_time_en(chan, t, ints, lang)); return ast_say_time_en(chan, t, ints, lang);
} }
/* English syntax */ /* English syntax */
@ -6391,34 +6388,34 @@ int ast_say_time_he(struct ast_channel *chan, time_t t, const char *ints, const
} }
static int say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
if (!strcasecmp(lang, "en") ) { /* English syntax */ if (!strncasecmp(lang, "en", 2)) { /* English syntax */
return(ast_say_datetime_en(chan, t, ints, lang)); return ast_say_datetime_en(chan, t, ints, lang);
} else if (!strcasecmp(lang, "de") ) { /* German syntax */ } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */
return(ast_say_datetime_de(chan, t, ints, lang)); return ast_say_datetime_de(chan, t, ints, lang);
} else if (!strcasecmp(lang, "fr") ) { /* French syntax */ } else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
return(ast_say_datetime_fr(chan, t, ints, lang)); return ast_say_datetime_fr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ } else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
return(ast_say_datetime_nl(chan, t, ints, lang)); return ast_say_datetime_gr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "hu") ) { /* Hungarian syntax */ } else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
return(ast_say_datetime_hu(chan, t, ints, lang)); return ast_say_datetime_he(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ } else if (!strncasecmp(lang, "hu", 2)) { /* Hungarian syntax */
return(ast_say_datetime_pt(chan, t, ints, lang)); return ast_say_datetime_hu(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt_BR") ) { /* Brazilian Portuguese syntax */ } else if (!strncasecmp(lang, "ka", 2)) { /* Georgian syntax */
return(ast_say_datetime_pt_BR(chan, t, ints, lang)); return ast_say_datetime_ka(chan, t, ints, lang);
} else if (!strncasecmp(lang, "zh", 2) ) { /* Taiwanese / Chinese syntax */ } else if (!strncasecmp(lang, "nl", 2)) { /* Dutch syntax */
return(ast_say_datetime_zh(chan, t, ints, lang)); return ast_say_datetime_nl(chan, t, ints, lang);
} else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ } else if (!strncasecmp(lang, "pt_BR", 5)) { /* Brazilian Portuguese syntax */
return(ast_say_datetime_gr(chan, t, ints, lang)); return ast_say_datetime_pt_BR(chan, t, ints, lang);
} else if (!strcasecmp(lang, "th") ) { /* Thai syntax */ } else if (!strncasecmp(lang, "pt", 2)) { /* Portuguese syntax */
return(ast_say_datetime_th(chan, t, ints, lang)); return ast_say_datetime_pt(chan, t, ints, lang);
} else if (!strcasecmp(lang, "ge") ) { /* Georgian syntax */ } else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
return(ast_say_datetime_ge(chan, t, ints, lang)); return ast_say_datetime_th(chan, t, ints, lang);
} else if (!strcasecmp(lang, "he")) { /* Hebrew syntax */ } else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
return (ast_say_datetime_he(chan, t, ints, lang)); return ast_say_datetime_zh(chan, t, ints, lang);
} }
/* Default to English */ /* Default to English */
return(ast_say_datetime_en(chan, t, ints, lang)); return ast_say_datetime_en(chan, t, ints, lang);
} }
/* English syntax */ /* English syntax */
@ -6828,20 +6825,20 @@ int ast_say_datetime_he(struct ast_channel *chan, time_t t, const char *ints, co
} }
static int say_datetime_from_now(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int say_datetime_from_now(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
if (!strcasecmp(lang, "en") ) { /* English syntax */ if (!strncasecmp(lang, "en", 2)) { /* English syntax */
return(ast_say_datetime_from_now_en(chan, t, ints, lang)); return ast_say_datetime_from_now_en(chan, t, ints, lang);
} else if (!strcasecmp(lang, "fr") ) { /* French syntax */ } else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
return(ast_say_datetime_from_now_fr(chan, t, ints, lang)); return ast_say_datetime_from_now_fr(chan, t, ints, lang);
} else if (!strcasecmp(lang, "pt") || !strcasecmp(lang, "pt_BR")) { /* Portuguese syntax */ } else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
return(ast_say_datetime_from_now_pt(chan, t, ints, lang)); return ast_say_datetime_from_now_he(chan, t, ints, lang);
} else if (!strcasecmp(lang, "ge") ) { /* Georgian syntax */ } else if (!strncasecmp(lang, "ka", 2)) { /* Georgian syntax */
return(ast_say_datetime_from_now_ge(chan, t, ints, lang)); return ast_say_datetime_from_now_ka(chan, t, ints, lang);
} else if (!strcasecmp(lang, "he")) { /* Georgian syntax */ } else if (!strncasecmp(lang, "pt", 2)) { /* Portuguese syntax */
return (ast_say_datetime_from_now_he(chan, t, ints, lang)); return ast_say_datetime_from_now_pt(chan, t, ints, lang);
} }
/* Default to English */ /* Default to English */
return(ast_say_datetime_from_now_en(chan, t, ints, lang)); return ast_say_datetime_from_now_en(chan, t, ints, lang);
} }
/* English syntax */ /* English syntax */
@ -7463,7 +7460,7 @@ static int ast_say_date_with_format_gr(struct ast_channel *chan, time_t t, const
To be able to play the sounds, each of the above tokens needs To be able to play the sounds, each of the above tokens needs
a corresponding sound file. (e.g. 200_.gsm). a corresponding sound file. (e.g. 200_.gsm).
*/ */
static char* ast_translate_number_ge(int num, char* res, int res_len) static char* ast_translate_number_ka(int num, char* res, int res_len)
{ {
char buf[256]; char buf[256];
int digit = 0; int digit = 0;
@ -7490,22 +7487,22 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
if (num < 40) { /* ocda... */ if (num < 40) { /* ocda... */
strncat(res, "20_ ", res_len - strlen(res) - 1); strncat(res, "20_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(num - 20, res, res_len); return ast_translate_number_ka(num - 20, res, res_len);
} }
if (num < 60) { /* ormocda... */ if (num < 60) { /* ormocda... */
strncat(res, "40_ ", res_len - strlen(res) - 1); strncat(res, "40_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(num - 40, res, res_len); return ast_translate_number_ka(num - 40, res, res_len);
} }
if (num < 80) { /* samocda... */ if (num < 80) { /* samocda... */
strncat(res, "60_ ", res_len - strlen(res) - 1); strncat(res, "60_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(num - 60, res, res_len); return ast_translate_number_ka(num - 60, res, res_len);
} }
if (num < 100) { /* otxmocda... */ if (num < 100) { /* otxmocda... */
strncat(res, "80_ ", res_len - strlen(res) - 1); strncat(res, "80_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(num - 80, res, res_len); return ast_translate_number_ka(num - 80, res, res_len);
} }
@ -7520,7 +7517,7 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
} else { } else {
snprintf(buf, sizeof(buf), "%d_ ", digit*100); snprintf(buf, sizeof(buf), "%d_ ", digit*100);
strncat(res, buf, res_len - strlen(res) - 1); strncat(res, buf, res_len - strlen(res) - 1);
return ast_translate_number_ge(remaining, res, res_len); return ast_translate_number_ka(remaining, res, res_len);
} }
} }
@ -7536,20 +7533,19 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
digit = (num - remaining) / 1000; digit = (num - remaining) / 1000;
if (remaining == 0) { if (remaining == 0) {
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000", res_len - strlen(res) - 1); strncat(res, " 1000", res_len - strlen(res) - 1);
return res; return res;
} }
if (digit == 1) { if (digit == 1) {
strncat(res, "1000_ ", res_len - strlen(res) - 1); strncat(res, "1000_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(remaining, res, res_len); return ast_translate_number_ka(remaining, res, res_len);
} }
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000_ ", res_len - strlen(res) - 1); strncat(res, " 1000_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(remaining, res, res_len); return ast_translate_number_ka(remaining, res, res_len);
} }
@ -7564,15 +7560,14 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
digit = (num - remaining) / 1000000; digit = (num - remaining) / 1000000;
if (remaining == 0) { if (remaining == 0) {
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000000", res_len - strlen(res) - 1); strncat(res, " 1000000", res_len - strlen(res) - 1);
return res; return res;
} }
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000000_ ", res_len - strlen(res) - 1); strncat(res, " 1000000_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(remaining, res, res_len); return ast_translate_number_ka(remaining, res, res_len);
} }
@ -7587,15 +7582,14 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
digit = (num - remaining) / 1000000000; digit = (num - remaining) / 1000000000;
if (remaining == 0) { if (remaining == 0) {
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000000000", res_len - strlen(res) - 1); strncat(res, " 1000000000", res_len - strlen(res) - 1);
return res; return res;
} }
ast_translate_number_ge(digit, res, res_len); ast_translate_number_ka(digit, res, res_len);
strncat(res, " 1000000000_ ", res_len - strlen(res) - 1); strncat(res, " 1000000000_ ", res_len - strlen(res) - 1);
return ast_translate_number_ge(remaining, res, res_len); return ast_translate_number_ka(remaining, res, res_len);
} }
return res; return res;
@ -7604,8 +7598,8 @@ static char* ast_translate_number_ge(int num, char* res, int res_len)
/*! \brief ast_say_number_full_ge: Georgian syntax */ /*! \brief ast_say_number_full_ka: Georgian syntax */
static int ast_say_number_full_ge(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int ast_say_number_full_ka(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
int res = 0; int res = 0;
char fn[512] = ""; char fn[512] = "";
@ -7616,7 +7610,7 @@ static int ast_say_number_full_ge(struct ast_channel *chan, int num, const char
return ast_say_digits_full(chan, 0, ints, language, audiofd, ctrlfd); return ast_say_digits_full(chan, 0, ints, language, audiofd, ctrlfd);
ast_translate_number_ge(num, fn, 512); ast_translate_number_ka(num, fn, 512);
@ -7682,7 +7676,7 @@ tslis
/* Georgian syntax. e.g. "oriatas xuti tslis 5 noemberi". */ /* Georgian syntax. e.g. "oriatas xuti tslis 5 noemberi". */
static int ast_say_date_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int ast_say_date_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
struct timeval when = { t, 0 }; struct timeval when = { t, 0 };
struct ast_tm tm; struct ast_tm tm;
@ -7722,7 +7716,7 @@ static int ast_say_date_ge(struct ast_channel *chan, time_t t, const char *ints,
/* Georgian syntax. e.g. "otxi saati da eqvsi tsuti" */ /* Georgian syntax. e.g. "otxi saati da eqvsi tsuti" */
static int ast_say_time_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int ast_say_time_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
struct timeval when = { t, 0 }; struct timeval when = { t, 0 };
struct ast_tm tm; struct ast_tm tm;
@ -7754,7 +7748,7 @@ static int ast_say_time_ge(struct ast_channel *chan, time_t t, const char *ints,
/* Georgian syntax. Say date, then say time. */ /* Georgian syntax. Say date, then say time. */
static int ast_say_datetime_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int ast_say_datetime_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
struct timeval when = { t, 0 }; struct timeval when = { t, 0 };
struct ast_tm tm; struct ast_tm tm;
@ -7772,7 +7766,7 @@ static int ast_say_datetime_ge(struct ast_channel *chan, time_t t, const char *i
/* Georgian syntax */ /* Georgian syntax */
static int ast_say_datetime_from_now_ge(struct ast_channel *chan, time_t t, const char *ints, const char *lang) static int ast_say_datetime_from_now_ka(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{ {
int res=0; int res=0;
int daydiff; int daydiff;
@ -7862,11 +7856,11 @@ int ast_say_counted_noun(struct ast_channel *chan, int num, const char noun[])
char *temp; char *temp;
int temp_len; int temp_len;
const char *ending; const char *ending;
if (!strcasecmp(chan->language, "ru")) { /* Russian */ if (!strncasecmp(chan->language, "ru", 2)) { /* Russian */
ending = counted_noun_ending_slavic(num); ending = counted_noun_ending_slavic(num);
} else if(!strcasecmp(chan->language, "ua")) { /* Ukrainian */ } else if (!strncasecmp(chan->language, "ua", 2)) { /* Ukrainian */
ending = counted_noun_ending_slavic(num); ending = counted_noun_ending_slavic(num);
} else if(!strcasecmp(chan->language, "pl")) { /* Polish */ } else if (!strncasecmp(chan->language, "pl", 2)) { /* Polish */
ending = counted_noun_ending_slavic(num); ending = counted_noun_ending_slavic(num);
} else { /* English and default */ } else { /* English and default */
ending = counted_noun_ending_en(num); ending = counted_noun_ending_en(num);
@ -7904,11 +7898,11 @@ int ast_say_counted_adjective(struct ast_channel *chan, int num, const char adje
char *temp; char *temp;
int temp_len; int temp_len;
const char *ending; const char *ending;
if (!strcasecmp(chan->language, "ru")) { /* Russian */ if (!strncasecmp(chan->language, "ru", 2)) { /* Russian */
ending = counted_adjective_ending_ru(num, gender); ending = counted_adjective_ending_ru(num, gender);
} else if (!strcasecmp(chan->language, "ua")) { /* Ukrainian */ } else if (!strncasecmp(chan->language, "ua", 2)) { /* Ukrainian */
ending = counted_adjective_ending_ru(num, gender); ending = counted_adjective_ending_ru(num, gender);
} else if (!strcasecmp(chan->language, "pl")) { /* Polish */ } else if (!strncasecmp(chan->language, "pl", 2)) { /* Polish */
ending = counted_adjective_ending_ru(num, gender); ending = counted_adjective_ending_ru(num, gender);
} else { /* English and default */ } else { /* English and default */
ending = ""; ending = "";

Loading…
Cancel
Save