瀏覽代碼

Translate received string identifier before storing

Ivan Savenko 2 年之前
父節點
當前提交
84493e1bff
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/mapObjects/MiscObjects.cpp

+ 2 - 1
lib/mapObjects/MiscObjects.cpp

@@ -1687,7 +1687,8 @@ void CGSignBottle::initObj(CRandomGenerator & rand)
 	if(message.empty())
 	if(message.empty())
 	{
 	{
 		auto vector = VLC->generaltexth->findStringsWithPrefix("core.randsign");
 		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)
 	if(ID == Obj::OCEAN_BOTTLE)