Merge remote-tracking branch 'PatrikLundell/TranslateName' into develop

develop
lethosor 2020-04-15 01:07:34 -04:00
commit 57d565c735
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);
}
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,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]]);
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]]);
}
}
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)
{