[asterisk-commits] jrose: branch 10 r339353 - in /branches/10: ./ main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 4 14:47:11 CDT 2011


Author: jrose
Date: Tue Oct  4 14:44:02 2011
New Revision: 339353

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339353
Log:
Merged revisions 339352 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339352 | jrose | 2011-10-04 14:33:12 -0500 (Tue, 04 Oct 2011) | 12 lines
  
  Removes improper use of sound 'and' in German language mode from application saynumber
  
  Asterisk would say 'Five hundert und sechs und zwanzig' instead of 'Five hundert sechs
  und zwanzig'... which is both weird sounding and wrong.  This patch makes sure Asterisk
  will only say the 'and' word between the single digit and double digit places.
  
  (closes issue ASTERISK-18212)
  Reported By: Lionel Elie Mamane
  Patches:
  	upstream_germand_no_and.diff (License #5402) uploaded by Lionel Elie Mamane
........

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

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/say.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/say.c?view=diff&rev=339353&r1=339352&r2=339353
==============================================================================
--- branches/10/main/say.c (original)
+++ branches/10/main/say.c Tue Oct  4 14:44:02 2011
@@ -837,6 +837,9 @@
 		* - 1000 is 'tausend', however all other instances are 'ein tausend'
 		* - 1000000 is always 'eine million'
 		* - "million" is different in singular and plural form
+		* - 'and' should not go between a hundreds place value and any
+		*   tens/ones place values that follows it. i.e 136 is ein hundert
+		*   sechs und dreizig, not ein hundert und sechs und dreizig.
 		*/
 		if (num < 0) {
 			ast_copy_string(fn, "digits/minus", sizeof(fn));
@@ -844,10 +847,7 @@
 				num = -num;
 			} else {
 				num = 0;
-			}	
-		} else if (num < 100 && t) {
-			ast_copy_string(fn, "digits/and", sizeof(fn));
-			t = 0;
+			}
 		} else if (num == 1 && mf == -1) {
 			snprintf(fn, sizeof(fn), "digits/%dF", num);
 			num = 0;
@@ -875,7 +875,6 @@
 				snprintf(fn, sizeof(fn), "digits/%d", hundreds);
 			}
 			ast_copy_string(fna, "digits/hundred", sizeof(fna));
-			t = 1;
 		} else if (num == 1000 && t == 0) {
 			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = 0;




More information about the asterisk-commits mailing list