1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Refactoring of GeneralTextHandler to reduce boilerplate code in callers

This commit is contained in:
Ivan Savenko
2022-12-30 19:09:19 +02:00
parent 01d0cd4f7a
commit 9a620a9091
5 changed files with 73 additions and 59 deletions

View File

@@ -180,8 +180,8 @@ std::pair<std::string, std::string> InterfaceObjectConfigurable::readHintText(co
if(config.getType() == JsonNode::JsonType::DATA_STRING)
{
logGlobal->debug("Reading hint text (help) from generaltext handler:%sd", config.String());
result.first = CGI->generaltexth->translate( config.String() + ".hover");
result.second = CGI->generaltexth->translate( config.String() + ".help");
result.first = CGI->generaltexth->translate( config.String(), "hover");
result.second = CGI->generaltexth->translate( config.String(), "help");
}
}
return result;