1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Fixed incorrect error messages from translations

This commit is contained in:
Ivan Savenko 2023-03-14 19:55:08 +02:00
parent f42a894723
commit 06e5d37fbd
3 changed files with 9 additions and 6 deletions

View File

@ -311,10 +311,13 @@ bool CGeneralTextHandler::validateTranslation(const std::string & language, cons
for (auto const & string : stringsLocalizations)
{
if (string.second.modContext != modContext)
continue;
continue; // Not our mod
if (string.second.baseLanguage.empty())
continue; // No base string
if (string.second.baseLanguage == language && !string.second.baseValue.empty())
continue;
continue; // Base string already uses our language
if (config.Struct().count(string.first) > 0)
continue;

View File

@ -970,7 +970,7 @@ void CGHeroInstance::initExp(CRandomGenerator & rand)
std::string CGHeroInstance::nodeName() const
{
return "Hero " + getNameTranslated();
return "Hero " + getNameTextID();
}
std::string CGHeroInstance::getNameTranslated() const

View File

@ -1449,11 +1449,11 @@ void CMapLoaderH3M::readObjects()
if(htid == 0xff)
{
hp->power = reader->readUInt8();
logGlobal->info("Hero placeholder: by power at %s", objPos.toString());
logGlobal->debug("Hero placeholder: by power at %s", objPos.toString());
}
else
{
logGlobal->info("Hero placeholder: %s at %s", VLC->heroh->objects[htid]->getNameTranslated(), objPos.toString());
logGlobal->debug("Hero placeholder: %s at %s", VLC->heroh->objects[htid]->getNameTranslated(), objPos.toString());
hp->power = 0;
}
@ -1705,7 +1705,7 @@ CGObjectInstance * CMapLoaderH3M::readHero(const ObjectInstanceID & idToBeGiven,
if(!nhi->spells.empty())
{
nhi->clear();
logGlobal->warn("Hero %s subID=%d has spells set twice (in map properties and on adventure map instance). Using the latter set...", nhi->getNameTranslated(), nhi->subID);
logGlobal->warn("Hero %s subID=%d has spells set twice (in map properties and on adventure map instance). Using the latter set...", nhi->getNameTextID(), nhi->subID);
}
if(hasCustomSpells)