]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[FS-10155] French digits are not spelled right
authorMerwan Ouddane <merwan.ouddane@corp.ovh.com>
Thu, 13 Apr 2017 14:53:42 +0000 (16:53 +0200)
committerMerwan Ouddane <merwan.ouddane@corp.ovh.com>
Thu, 13 Apr 2017 14:53:42 +0000 (16:53 +0200)
src/mod/say/mod_say_fr/mod_say_fr.c

index f4bbbd5680015f62c44a43e98e669b664a4bff8d..ba34647c857d52dcff7f222219221770e1388405 100644 (file)
@@ -111,16 +111,24 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
                                say_file("digits/%d%d.wav", b, c);
                        }
                } else {
-                       say_file("digits/%d0.wav", b);
+            if (b == 7 || b == 9) {
+                say_file("digits/%d0.wav", b-1);
+            } else {
+                               say_file("digits/%d0.wav", b);
+            }
                }
        }
 
-       if (c || (ftdNumber == 1 && (a || b || c))) {
+       if (c || ((ftdNumber == 1 && (a || b || c)) && (a && (b || c)))) {
                /*switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "a=%d  b=[%d]  c=%d\n",a, b,c);*/
                int fVal = c;
                if (ftdNumber == 1)
                        fVal = itd;
 
+               if (b == 7 || b == 9) {
+            fVal += 10;
+        }
+
                if (method == SSM_COUNTED) {
                        say_file("digits/h-%d.wav", fVal);
                } else {