[asterisk-dev] British English internationalisation

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon May 29 08:27:43 MST 2006


On Monday 29 May 2006 07:17, Tony Howat wrote:
> 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.

More likely the current default will stay the same, and the variant
you've proposed will become en_UK.

> --- 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, tony at i-r-genius.com
> -         */
> -
> -        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;

Please submit all patches as an attachment to http://bugs.digium.com.
Given that this is a new feature, the patch should be against trunk,
not against the 1.2 branch.

-- 
Tilghman



More information about the asterisk-dev mailing list