mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
Use the NUM2_SWAP_THOUSANDS constant instead of 0x200.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005 to 2015 by Jonathan Duddington
|
||||
* email: jonsd@users.sourceforge.net
|
||||
* Copyright (C) 2015-2016 Reece H. Dunn
|
||||
* Copyright (C) 2015-2016, 2020 Reece H. Dunn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1590,8 +1590,8 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, bool suppress_nul
|
||||
LookupNum2(tr, hundreds/10, thousandplex, x, ph_digits);
|
||||
}
|
||||
|
||||
if (tr->langopts.numbers2 & 0x200)
|
||||
sprintf(ph_thousands, "%s%c%s%c", ph_10T, phonEND_WORD, ph_digits, phonEND_WORD); // say "thousands" before its number, not after
|
||||
if (tr->langopts.numbers2 & NUM2_SWAP_THOUSANDS)
|
||||
sprintf(ph_thousands, "%s%c%s%c", ph_10T, phonEND_WORD, ph_digits, phonEND_WORD);
|
||||
else
|
||||
sprintf(ph_thousands, "%s%c%s%c", ph_digits, phonEND_WORD, ph_10T, phonEND_WORD);
|
||||
|
||||
@@ -1963,8 +1963,8 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
|
||||
}
|
||||
|
||||
LookupNum3(tr, value, ph_buf, suppress_null, thousandplex, prev_thousands | ordinal | decimal_point);
|
||||
if ((thousandplex > 0) && (tr->langopts.numbers2 & 0x200))
|
||||
sprintf(ph_out, "%s%s%c%s%s", ph_zeros, ph_append, phonEND_WORD, ph_buf2, ph_buf); // say "thousands" before its number
|
||||
if ((thousandplex > 0) && (tr->langopts.numbers2 & NUM2_SWAP_THOUSANDS))
|
||||
sprintf(ph_out, "%s%s%c%s%s", ph_zeros, ph_append, phonEND_WORD, ph_buf2, ph_buf);
|
||||
else
|
||||
sprintf(ph_out, "%s%s%s%c%s", ph_zeros, ph_buf2, ph_buf, phonEND_WORD, ph_append);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005 to 2015 by Jonathan Duddington
|
||||
* email: jonsd@users.sourceforge.net
|
||||
* Copyright (C) 2015-2016 Reece H. Dunn
|
||||
* Copyright (C) 2015-2016, 2020 Reece H. Dunn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1238,7 +1238,7 @@ Translator *SelectTranslator(const char *name)
|
||||
tr->langopts.stress_rule = STRESSPOSN_2R;
|
||||
tr->langopts.stress_flags = S_FINAL_DIM_ONLY | S_FINAL_NO_2 | 0x80000;
|
||||
tr->langopts.numbers = NUM_OMIT_1_HUNDRED | NUM_HUNDRED_AND;
|
||||
tr->langopts.numbers2 = 0x200; // say "thousands" before its number
|
||||
tr->langopts.numbers2 = NUM2_SWAP_THOUSANDS;
|
||||
}
|
||||
break;
|
||||
case L('p', 'l'): // Polish
|
||||
@@ -1304,7 +1304,7 @@ Translator *SelectTranslator(const char *name)
|
||||
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable
|
||||
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words. Need to allow "bw'" prefix
|
||||
tr->langopts.numbers = NUM_HUNDRED_AND | NUM_AND_UNITS | NUM_DFRACTION_2 | NUM_AND_HUNDRED;
|
||||
tr->langopts.numbers2 = 0x200; // say "thousands" before its number
|
||||
tr->langopts.numbers2 = NUM2_SWAP_THOUSANDS;
|
||||
}
|
||||
break;
|
||||
case L('s', 'k'): // Slovak
|
||||
|
||||
Reference in New Issue
Block a user