1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-10 09:50:17 +02:00

Merge pull request #1485 from IvanSavenko/translation_fix

Translation fix
This commit is contained in:
Ivan Savenko 2023-01-22 18:14:33 +02:00 committed by GitHub
commit 1236ed6d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -776,7 +776,7 @@ void CArtifactInstance::init()
std::string CArtifactInstance::getEffectiveDescription(const CGHeroInstance * hero) const
{
std::string text = artType->getDescription();
std::string text = artType->getDescriptionTranslated();
if (!vstd::contains(text, '{'))
text = '{' + artType->getNameTranslated() + "}\n\n" + text; //workaround for new artifacts with single name, turns it to H3-style

View File

@ -103,7 +103,7 @@ void CSkill::addNewBonus(const std::shared_ptr<Bonus> & b, int level)
b->source = Bonus::SECONDARY_SKILL;
b->sid = id;
b->duration = Bonus::PERMANENT;
b->description = getNameTextID();
b->description = getNameTranslated();
levels[level-1].effects.push_back(b);
}

View File

@ -1000,7 +1000,8 @@ std::string CGHeroInstance::getNameTextID() const
if (type)
return type->getNameTextID();
assert(0);
// FIXME: called by logging from some specialties (mods?) before type is set on deserialization
// assert(0);
return "";
}