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]]);
addNameWord(out, word);
}
if (name->words[5] >= 0)
{
word.clear();
for (int i = 2; i <= 5; i++)
if (name->words[i] >= 0)
word.append(*world->raws.language.translations[name->language]->words[name->words[i]]);
addNameWord(out, word);
}
if (name->words[6] >= 0)
{
word.clear();
@ -206,19 +203,18 @@ 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]]);
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)
out.append(" the");
else
out.append("The");
}
for (int i = 2; i <= 5; i++)
{
if (name->words[i] >= 0)
addNameWord(out, world->raws.language.words[name->words[i]]->forms[name->parts_of_speech[i]]);
}
}
if (name->words[6] >= 0)
{
if (out.length() > 0)