--- apps/app_voicemail.c.vanilla 2004-12-22 17:24:57.000000000 +0200 +++ apps/app_voicemail.c 2004-12-22 17:32:22.000000000 +0200 @@ -3191,6 +3191,8 @@ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/nl-om' HM", NULL); else if (!strcasecmp(chan->language,"it")) /* ITALIAN syntax */ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' 'digits/hours' k 'digits/e' M 'digits/minutes'", NULL); + else if (!strcasecmp(chan->language,"gr")) + res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q H 'digits/kai' M ", NULL); else res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' IMp", NULL); #if 0 @@ -3410,6 +3412,34 @@ memset(vms->heard, 0, sizeof(vms->heard)); } +/* In Greek even though we CAN use a syntax like "friends messages" + * ("filika mynhmata") it is not elegant. This also goes for "work/family messages" + * ("ergasiaka/oikogeniaka mynhmata"). Therefore it is better to use a reversed + * syntax for the above three categories which is more elegant. +*/ + +static int vm_play_folder_name_gr(struct ast_channel *chan, char *mbox) +{ + int cmd; + char buf[sizeof(mbox)+1]; + + memset(buf, '\0', sizeof(char)*(sizeof(buf))); + strcpy(buf, mbox); + strcat(buf,"s"); + + if (!strcasecmp(mbox, "vm-INBOX") || !strcasecmp(mbox, "vm-Old")){ + cmd = ast_play_and_wait(chan, buf); /* "NEA / PALIA" */ + if (cmd) + return cmd; + return ast_play_and_wait(chan, "vm-messages"); /* "messages" -> "MYNHMATA" */ + } else { + cmd = ast_play_and_wait(chan, "vm-messages"); /* "messages" -> "MYNHMATA" */ + if (cmd) + return cmd; + return ast_play_and_wait(chan, mbox); /* friends/family/work... -> "FILWN"/"OIKOGENIAS"/"DOULEIAS"*/ + } +} + static int vm_play_folder_name(struct ast_channel *chan, char *mbox) { int cmd; @@ -3419,6 +3449,8 @@ if (cmd) return cmd; return ast_play_and_wait(chan, mbox); + } else if (!strcasecmp(chan->language, "gr")){ + return vm_play_folder_name_gr(chan, mbox); } else { /* Default English */ cmd = ast_play_and_wait(chan, mbox); if (cmd) @@ -3457,8 +3490,7 @@ res = ast_play_and_wait(chan, "vm-messages"); } } - } - else if (vms->oldmessages){ + } else if (vms->oldmessages){ res = ast_play_and_wait(chan, "vm-youhave"); if (!res) res = ast_say_number(chan, vms->oldmessages, AST_DIGIT_ANY, chan->language, NULL);