Here's a quick patch for 1.2.7.1's say.c (original file being say_us.c) which corrects the spoken grammar of the "say number" application for British english to include "and" before the tens and units of numbers greater than 100. It's minor but I've done this in response to complaints from UK customers.

I couldn't submit this to the tree without potentially causing issues as "US English" is currently the default with the identifier "en", whereas I believe US English should be "en-us" and British English should be "en" (en is defined as no specified variant, so it would seem sensible to have it as the root language). Not keen on starting another round of the civil war I'll leave you guys to decide what to do.


--- say.c       2006-05-29 13:09:01.000000000 +0100
+++ say_us.c    2006-05-29 12:25:02.000000000 +0100
@@ -465,16 +465,7 @@
{
       int res = 0;
       int playh = 0;
-        int and = 0;
       char fn[256] = "";
-
- /* British English grammar includes "and" before the tens/units portion in
-         * any number greater than 100, [EMAIL PROTECTED]
-         */
-
-        if (num > 100)
-           and=1;
-
       if (!num)
return ast_say_digits_full(chan, 0,ints, language, audiofd, ctrlfd);

@@ -489,9 +480,6 @@
               } else if (playh) {
                       snprintf(fn, sizeof(fn), "digits/hundred");
                       playh = 0;
-               } else if (and && (num < 100)) {
-                        snprintf(fn, sizeof(fn), "and");
-                        and = 0;
                } else if (num < 20) {
                       snprintf(fn, sizeof(fn), "digits/%d", num);
                       num = 0;

--
Tony


_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to