[asterisk-commits] tilghman: branch 1.6.1 r205203 - in /branches/1.6.1: ./ main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 8 11:29:25 CDT 2009


Author: tilghman
Date: Wed Jul  8 11:29:21 2009
New Revision: 205203

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205203
Log:
Merged revisions 205196 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r205196 | tilghman | 2009-07-08 11:27:50 -0500 (Wed, 08 Jul 2009) | 9 lines
  
  Merged revisions 205188 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r205188 | tilghman | 2009-07-08 11:26:15 -0500 (Wed, 08 Jul 2009) | 2 lines
    
    Add redirection warnings for the invalid language codes previously removed.
  ........
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/say.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/say.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/main/say.c?view=diff&rev=205203&r1=205202&r2=205203
==============================================================================
--- branches/1.6.1/main/say.c (original)
+++ branches/1.6.1/main/say.c Wed Jul  8 11:29:21 2009
@@ -435,6 +435,12 @@
 	   return ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "cs", 2)) { /* Czech syntax */
 	   return ast_say_number_full_cs(chan, num, ints, language, options, audiofd, ctrlfd);
+	} else if (!strncasecmp(language, "cz", 2)) { /* deprecated Czech syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "cz is not a standard language code.  Please switch to using cs instead.\n");
+		}
+		return ast_say_number_full_cs(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "da", 2)) { /* Danish syntax */
 	   return ast_say_number_full_da(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "de", 2)) { /* German syntax */
@@ -443,6 +449,12 @@
 	   return ast_say_number_full_es(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "fr", 2)) { /* French syntax */
 	   return ast_say_number_full_fr(chan, num, ints, language, options, audiofd, ctrlfd);
+	} else if (!strncasecmp(language, "ge", 2)) { /* deprecated Georgian syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "ge is not a standard language code.  Please switch to using ka instead.\n");
+		}
+		return ast_say_number_full_ka(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "gr", 2)) { /* Greek syntax */
 	   return ast_say_number_full_gr(chan, num, ints, language, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "he", 2)) { /* Hebrew syntax */
@@ -453,6 +465,12 @@
 	   return ast_say_number_full_it(chan, num, ints, language, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "ka", 2)) { /* Georgian syntax */
 	   return ast_say_number_full_ka(chan, num, ints, language, options, audiofd, ctrlfd);
+	} else if (!strncasecmp(language, "mx", 2)) { /* deprecated Mexican syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "mx is not a standard language code.  Please switch to using es_MX instead.\n");
+		}
+		return ast_say_number_full_es(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "nl", 2)) { /* Dutch syntax */
 	   return ast_say_number_full_nl(chan, num, ints, language, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "no", 2)) { /* Norwegian syntax */
@@ -467,6 +485,12 @@
 	   return ast_say_number_full_se(chan, num, ints, language, options, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "th", 2)) { /* Thai syntax */
 		return ast_say_number_full_th(chan, num, ints, language, audiofd, ctrlfd);
+	} else if (!strncasecmp(language, "tw", 2)) { /* deprecated Taiwanese syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "tw is a standard language code for Twi, not Taiwanese.  Please switch to using zh_TW instead.\n");
+		}
+		return ast_say_number_full_zh(chan, num, ints, language, audiofd, ctrlfd);
 	} else if (!strncasecmp(language, "zh", 2)) { /* Taiwanese / Chinese syntax */
 	   return ast_say_number_full_zh(chan, num, ints, language, audiofd, ctrlfd);
 	}
@@ -3065,6 +3089,12 @@
 		return ast_say_date_de(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
 		return ast_say_date_fr(chan, t, ints, lang);
+	} else if (!strncasecmp(lang, "ge", 2)) { /* deprecated Georgian syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "ge is not a standard language code.  Please switch to using ka instead.\n");
+		}
+		return ast_say_date_ka(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
 		return ast_say_date_gr(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
@@ -3418,6 +3448,12 @@
 		return ast_say_date_with_format_gr(chan, t, ints, lang, format, tzone);
 	} else if (!strncasecmp(lang, "it", 2)) { /* Italian syntax */
 		return ast_say_date_with_format_it(chan, t, ints, lang, format, tzone);
+	} else if (!strncasecmp(lang, "mx", 2)) { /* deprecated Mexican syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "mx is not a standard language code.  Please switch to using es_MX instead.\n");
+		}
+		return ast_say_date_with_format_es(chan, time, ints, lang, format, timezone);
 	} else if (!strncasecmp(lang, "nl", 2)) { /* Dutch syntax */
 		return ast_say_date_with_format_nl(chan, t, ints, lang, format, tzone);
 	} else if (!strncasecmp(lang, "pl", 2)) { /* Polish syntax */
@@ -3426,6 +3462,12 @@
 		return ast_say_date_with_format_pt(chan, t, ints, lang, format, tzone);
 	} else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
 		return ast_say_date_with_format_th(chan, t, ints, lang, format, tzone);
+	} else if (!strncasecmp(lang, "tw", 2)) { /* deprecated Taiwanese syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "tw is a standard language code for Twi, not Taiwanese.  Please switch to using zh_TW instead.\n");
+		}
+		return ast_say_date_with_format_zh(chan, time, ints, lang, format, timezone);
 	} else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
 		return ast_say_date_with_format_zh(chan, t, ints, lang, format, tzone);
 	}
@@ -6013,6 +6055,12 @@
 		return ast_say_time_de(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
 		return ast_say_time_fr(chan, t, ints, lang);
+	} else if (!strncasecmp(lang, "ge", 2)) { /* deprecated Georgian syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "ge is not a standard language code.  Please switch to using ka instead.\n");
+		}
+		return ast_say_time_ka(chan, t, ints, lang);
 	} 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 */
@@ -6029,6 +6077,12 @@
 		return ast_say_time_pt(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
 		return(ast_say_time_th(chan, t, ints, lang));
+	} else if (!strncasecmp(lang, "tw", 2)) { /* deprecated Taiwanese syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "tw is a standard language code for Twi, not Taiwanese.  Please switch to using zh_TW instead.\n");
+		}
+		return ast_say_time_zh(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
 		return ast_say_time_zh(chan, t, ints, lang);
 	}
@@ -6330,6 +6384,12 @@
 		return ast_say_datetime_de(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
 		return ast_say_datetime_fr(chan, t, ints, lang);
+	} else if (!strncasecmp(lang, "ge", 2)) { /* deprecated Georgian syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "ge is not a standard language code.  Please switch to using ka instead.\n");
+		}
+		return ast_say_datetime_ka(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "gr", 2)) { /* Greek syntax */
 		return ast_say_datetime_gr(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
@@ -6346,6 +6406,12 @@
 		return ast_say_datetime_pt(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "th", 2)) { /* Thai syntax */
 		return ast_say_datetime_th(chan, t, ints, lang);
+	} else if (!strncasecmp(lang, "tw", 2)) { /* deprecated Taiwanese syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "tw is a standard language code for Twi, not Taiwanese.  Please switch to using zh_TW instead.\n");
+		}
+		return ast_say_datetime_zh(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "zh", 2)) { /* Taiwanese / Chinese syntax */
 		return ast_say_datetime_zh(chan, t, ints, lang);
 	}
@@ -6765,6 +6831,12 @@
 		return ast_say_datetime_from_now_en(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "fr", 2)) { /* French syntax */
 		return ast_say_datetime_from_now_fr(chan, t, ints, lang);
+	} else if (!strncasecmp(lang, "ge", 2)) { /* deprecated Georgian syntax */
+		static int deprecation_warning = 0;
+		if (deprecation_warning++ % 10 == 0) {
+			ast_log(LOG_WARNING, "ge is not a standard language code.  Please switch to using ka instead.\n");
+		}
+		return ast_say_datetime_from_now_ka(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "he", 2)) { /* Hebrew syntax */
 		return ast_say_datetime_from_now_he(chan, t, ints, lang);
 	} else if (!strncasecmp(lang, "ka", 2)) { /* Georgian syntax */




More information about the asterisk-commits mailing list