1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Minor refactoring of translations:

- removed unsuccessful and broken validation of translations
- pass JsonNode when registering strings to provide information on mod
source
This commit is contained in:
Ivan Savenko
2024-09-30 10:21:10 +00:00
parent c77da2e476
commit b85ccccb37
19 changed files with 48 additions and 141 deletions

View File

@@ -212,7 +212,7 @@ std::shared_ptr<CSkill> CSkillHandler::loadFromJson(const std::string & scope, c
skill->onlyOnWaterMap = json["onlyOnWaterMap"].Bool();
VLC->generaltexth->registerString(scope, skill->getNameTextID(), json["name"].String());
VLC->generaltexth->registerString(scope, skill->getNameTextID(), json["name"]);
switch(json["gainChance"].getType())
{
case JsonNode::JsonType::DATA_INTEGER:
@@ -237,7 +237,7 @@ std::shared_ptr<CSkill> CSkillHandler::loadFromJson(const std::string & scope, c
skill->addNewBonus(bonus, level);
}
CSkill::LevelInfo & skillAtLevel = skill->at(level);
VLC->generaltexth->registerString(scope, skill->getDescriptionTextID(level), levelNode["description"].String());
VLC->generaltexth->registerString(scope, skill->getDescriptionTextID(level), levelNode["description"]);
skillAtLevel.iconSmall = levelNode["images"]["small"].String();
skillAtLevel.iconMedium = levelNode["images"]["medium"].String();
skillAtLevel.iconLarge = levelNode["images"]["large"].String();