develop
PatrikLundell 2020-04-01 11:16:24 +02:00
parent ffe73028f9
commit 63a26b987d
1 changed files with 11 additions and 15 deletions

@ -180,14 +180,11 @@ string Translation::TranslateName(const df::language_name * name, bool inEnglish
word.append(*world->raws.language.translations[name->language]->words[name->words[1]]); word.append(*world->raws.language.translations[name->language]->words[name->words[1]]);
addNameWord(out, word); addNameWord(out, word);
} }
if (name->words[5] >= 0) word.clear();
{ for (int i = 2; i <= 5; i++)
word.clear(); if (name->words[i] >= 0)
for (int i = 2; i <= 5; i++) word.append(*world->raws.language.translations[name->language]->words[name->words[i]]);
if (name->words[i] >= 0) addNameWord(out, word);
word.append(*world->raws.language.translations[name->language]->words[name->words[i]]);
addNameWord(out, word);
}
if (name->words[6] >= 0) if (name->words[6] >= 0)
{ {
word.clear(); word.clear();
@ -206,18 +203,17 @@ string Translation::TranslateName(const df::language_name * name, bool inEnglish
word.append(world->raws.language.words[name->words[1]]->forms[name->parts_of_speech[1]]); word.append(world->raws.language.words[name->words[1]]->forms[name->parts_of_speech[1]]);
addNameWord(out, word); addNameWord(out, word);
} }
if (name->words[5] >= 0) if (name->words[2] >= 0 || name->words[3] >= 0 || name->words[4] >= 0 || name->words[5] >= 0)
{ {
if (out.length() > 0) if (out.length() > 0)
out.append(" the"); out.append(" the");
else else
out.append("The"); out.append("The");
}
for (int i = 2; i <= 5; i++) for (int i = 2; i <= 5; i++)
{ {
if (name->words[i] >= 0) if (name->words[i] >= 0)
addNameWord(out, world->raws.language.words[name->words[i]]->forms[name->parts_of_speech[i]]); addNameWord(out, world->raws.language.words[name->words[i]]->forms[name->parts_of_speech[i]]);
}
} }
if (name->words[6] >= 0) if (name->words[6] >= 0)
{ {