]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Corrected cardinal and ordinal number reading in German (MODAPP-97)
authorMichael Jerris <mike@jerris.com>
Tue, 27 May 2008 00:36:09 +0000 (00:36 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 27 May 2008 00:36:09 +0000 (00:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8678 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/say/mod_say_de/mod_say_de.c

index 8358200bb910f9d283d9a07b94805811ef4ec6fa..b38d00ae418dfddb36d31a5ff0318d16ed6445d0 100644 (file)
@@ -39,6 +39,7 @@
  * 
  * Anthony Minessale II <anthmct@yahoo.com>
  * Michael B. Murdock <mike@mmurdock.org>
+ * Daniel Swarbrick <daniel.swarbrick@gmail.com>
  *
  * mod_say_de.c -- Say for German
  *
@@ -101,11 +102,21 @@ static switch_status_t play_group(switch_say_method_t method, int a, int b, int
 
        if (b) {
                if (b > 1) {
-                       say_file("digits/%d0.wav", b);
+                       say_file("digits/%d.wav", c);
+                       say_file("currency/and.wav");
+                       if (method == SSM_COUNTED) {
+                               say_file("digits/h-%d0.wav", b);
+                       } else {
+                               say_file("digits/%d0.wav", b);
+                       }
                } else {
-                       say_file("digits/%d%d.wav", b, c);
-                       c = 0;
+                       if (method == SSM_COUNTED) {
+                               say_file("digits/h-%d%d.wav", b, c);
+                       } else {
+                               say_file("digits/%d%d.wav", b, c);
+                       }
                }
+               c = 0;
        }
 
        if (c) {
@@ -395,14 +406,13 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
                }
 
                say_num(hour, SSM_PRONOUNCED);
+               say_file("time/oclock.wav");
 
                if (tm.tm_min > 9) {
                        say_num(tm.tm_min, SSM_PRONOUNCED);
                } else if (tm.tm_min) {
                        say_file("time/oh.wav");
                        say_num(tm.tm_min, SSM_PRONOUNCED);
-               } else {
-                       say_file("time/oclock.wav");
                }
 
                say_file("time/%s.wav", pm ? "p-m" : "a-m");