mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-04 23:17:41 +02:00
Fixed incorrect error messages from translations
This commit is contained in:
parent
f42a894723
commit
06e5d37fbd
@ -311,10 +311,13 @@ bool CGeneralTextHandler::validateTranslation(const std::string & language, cons
|
|||||||
for (auto const & string : stringsLocalizations)
|
for (auto const & string : stringsLocalizations)
|
||||||
{
|
{
|
||||||
if (string.second.modContext != modContext)
|
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())
|
if (string.second.baseLanguage == language && !string.second.baseValue.empty())
|
||||||
continue;
|
continue; // Base string already uses our language
|
||||||
|
|
||||||
if (config.Struct().count(string.first) > 0)
|
if (config.Struct().count(string.first) > 0)
|
||||||
continue;
|
continue;
|
||||||
|
@ -970,7 +970,7 @@ void CGHeroInstance::initExp(CRandomGenerator & rand)
|
|||||||
|
|
||||||
std::string CGHeroInstance::nodeName() const
|
std::string CGHeroInstance::nodeName() const
|
||||||
{
|
{
|
||||||
return "Hero " + getNameTranslated();
|
return "Hero " + getNameTextID();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CGHeroInstance::getNameTranslated() const
|
std::string CGHeroInstance::getNameTranslated() const
|
||||||
|
@ -1449,11 +1449,11 @@ void CMapLoaderH3M::readObjects()
|
|||||||
if(htid == 0xff)
|
if(htid == 0xff)
|
||||||
{
|
{
|
||||||
hp->power = reader->readUInt8();
|
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
|
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;
|
hp->power = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1705,7 +1705,7 @@ CGObjectInstance * CMapLoaderH3M::readHero(const ObjectInstanceID & idToBeGiven,
|
|||||||
if(!nhi->spells.empty())
|
if(!nhi->spells.empty())
|
||||||
{
|
{
|
||||||
nhi->clear();
|
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)
|
if(hasCustomSpells)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user