Don't speak leading zero in times (eg. 02:30)

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@2 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-05-05 20:50:26 +00:00
parent 8d59235f7a
commit bf23831778
+7
View File
@@ -524,9 +524,16 @@ int Translator::TranslateNumber_1(char *word, char *ph_out, unsigned int *flags,
} }
if((word[0] == '0') && (prev_thousands == 0) && (word[1] != langopts.decimal_sep)) if((word[0] == '0') && (prev_thousands == 0) && (word[1] != langopts.decimal_sep))
{
if((n_digits == 2) && (word[3] == ':') && isdigit(word[5]) && isspace(word[7]))
{
// looks like a time 02:30, omit the leading zero
}
else
{ {
return(0); // number string with leading zero, speak as individual digits return(0); // number string with leading zero, speak as individual digits
} }
}
if((langopts.numbers & 0x1000) && (word[n_digits] == ' ')) if((langopts.numbers & 0x1000) && (word[n_digits] == ' '))
thousands_inc = 1; thousands_inc = 1;