1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +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
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 CArtifactInstance::getEffectiveDescription(const CGHeroInstance * hero) const
{ {
std::string text = artType->getDescription(); std::string text = artType->getDescriptionTranslated();
if (!vstd::contains(text, '{')) if (!vstd::contains(text, '{'))
text = '{' + artType->getNameTranslated() + "}\n\n" + text; //workaround for new artifacts with single name, turns it to H3-style 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->source = Bonus::SECONDARY_SKILL;
b->sid = id; b->sid = id;
b->duration = Bonus::PERMANENT; b->duration = Bonus::PERMANENT;
b->description = getNameTextID(); b->description = getNameTranslated();
levels[level-1].effects.push_back(b); levels[level-1].effects.push_back(b);
} }

View File

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