Browse Source

translate: return fix from 9f2ada457

this fix was lost in commit 84e967c0a, I can’t even imagine how it happened.
thank God it’s not me who was merging it.
master
Alexander Epaneshnikov 6 months ago
parent
commit
4cdce46531
No account linked to committer's email address
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/libespeak-ng/translate.c

+ 3
- 2
src/libespeak-ng/translate.c View File

@@ -1271,7 +1271,8 @@ void TranslateClauseWithTerminator(Translator *tr, int *tone_out, char **voice_c
} else {
if (iswlower(prev_in)) {
// lower case followed by upper case, possibly CamelCase
if (UpperCaseInWord(tr, &sbuf[ix], c) == 0) { // start a new word
if ((prev_out != ' ') && UpperCaseInWord(tr, &sbuf[ix], c) == 0)
{ // start a new word
c = ' ';
space_inserted = true;
prev_in_save = c;
@@ -1282,7 +1283,7 @@ void TranslateClauseWithTerminator(Translator *tr, int *tone_out, char **voice_c

if ((tr->translator_name == L('n', 'l')) && (letter_count == 2) && (c == 'j') && (prev_in == 'I')) {
// Dutch words may capitalise initial IJ, don't split
} else if (IsAlpha(next2_in)) {
} else if ((prev_out != ' ') && IsAlpha(next2_in)) {
// changing from upper to lower case, start new word at the last uppercase, if 3 or more letters
c = ' ';
space_inserted = true;

Loading…
Cancel
Save