mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Merge pull request #1863 from IvanSavenko/fix_mod_identifiers
Fix mod identifiers
This commit is contained in:
commit
6b2b8bb5c0
@ -432,8 +432,11 @@ const CCreature * CCreatureHandler::getCreature(const std::string & scope, const
|
|||||||
|
|
||||||
void CCreatureHandler::loadCommanders()
|
void CCreatureHandler::loadCommanders()
|
||||||
{
|
{
|
||||||
JsonNode data(ResourceID("config/commanders.json"));
|
ResourceID configResource("config/commanders.json");
|
||||||
data.setMeta(CModHandler::scopeBuiltin()); // assume that commanders are in core mod (for proper bonuses resolution)
|
|
||||||
|
std::string modSource = VLC->modh->findResourceOrigin(configResource);
|
||||||
|
JsonNode data(configResource);
|
||||||
|
data.setMeta(modSource);
|
||||||
|
|
||||||
const JsonNode & config = data; // switch to const data accessors
|
const JsonNode & config = data; // switch to const data accessors
|
||||||
|
|
||||||
|
@ -355,17 +355,17 @@ bool CGeneralTextHandler::validateTranslation(const std::string & language, cons
|
|||||||
|
|
||||||
bool allFound = true;
|
bool allFound = true;
|
||||||
|
|
||||||
for(const auto & string : config.Struct())
|
// for(const auto & string : config.Struct())
|
||||||
{
|
// {
|
||||||
if (stringsLocalizations.count(string.first) > 0)
|
// if (stringsLocalizations.count(string.first) > 0)
|
||||||
continue;
|
// continue;
|
||||||
|
//
|
||||||
if (allFound)
|
// if (allFound)
|
||||||
logMod->warn("Translation into language '%s' in mod '%s' has unused lines:", language, modContext);
|
// logMod->warn("Translation into language '%s' in mod '%s' has unused lines:", language, modContext);
|
||||||
|
//
|
||||||
logMod->warn(R"( "%s" : "%s",)", string.first, TextOperations::escapeString(string.second.String()));
|
// logMod->warn(R"( "%s" : "%s",)", string.first, TextOperations::escapeString(string.second.String()));
|
||||||
allFound = false;
|
// allFound = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return allPresent && allFound;
|
return allPresent && allFound;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user