mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Avoid clashes between gender selection code and thousand variant flags
Fixes #1420 also Set max_digits to 32 for russian since it's safe to do now.
This commit is contained in:
@@ -1316,7 +1316,7 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, bool suppress_nul
|
||||
|
||||
if (LookupThousands(tr, hundreds / 10, tplex, exact | ordinal, ph_10T) == 0) {
|
||||
x = 0;
|
||||
if (tr->langopts.numbers2 & (1 << tplex))
|
||||
if (tr->langopts.numbers2 & (1 << tplex) && tplex <= 3)
|
||||
x = 8; // use variant (feminine) for before thousands and millions
|
||||
if (tr->translator_name == L('m', 'l'))
|
||||
x = 0x208;
|
||||
@@ -1419,7 +1419,7 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, bool suppress_nul
|
||||
x |= 4; // tens and units only, no higher digits
|
||||
if (ordinal & 0x20)
|
||||
x |= 0x20; // variant form of ordinal number
|
||||
} else if (tr->langopts.numbers2 & (1 << thousandplex))
|
||||
} else if (tr->langopts.numbers2 & (1 << thousandplex) && thousandplex <= 3)
|
||||
x = 8; // use variant (feminine) for before thousands and millions
|
||||
|
||||
if ((tr->translator_name == L('m', 'l')) && (thousandplex == 1))
|
||||
|
||||
@@ -1656,5 +1656,5 @@ static void Translator_Russian(Translator *tr)
|
||||
|
||||
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_OMIT_1_HUNDRED;
|
||||
tr->langopts.numbers2 = NUM2_THOUSANDPLEX_VAR_THOUSANDS | NUM2_THOUSANDS_VAR1; // variant numbers before thousands
|
||||
tr->langopts.max_digits = 18;
|
||||
tr->langopts.max_digits = 32;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user