1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Translate received string identifier before storing

This commit is contained in:
Ivan Savenko
2022-12-28 01:14:41 +02:00
parent 10541855d9
commit 84493e1bff

View File

@@ -1687,7 +1687,8 @@ void CGSignBottle::initObj(CRandomGenerator & rand)
if(message.empty())
{
auto vector = VLC->generaltexth->findStringsWithPrefix("core.randsign");
message = *RandomGeneratorUtil::nextItem(vector, rand);
std::string messageIdentifier = *RandomGeneratorUtil::nextItem(vector, rand);
message = VLC->generaltexth->translate(messageIdentifier);
}
if(ID == Obj::OCEAN_BOTTLE)