mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Translations bugfixes
This commit is contained in:
parent
2e3e116bc4
commit
189f790b44
@ -117,7 +117,7 @@ void LoseConditions::initialize(MapController & c)
|
|||||||
void LoseConditions::update()
|
void LoseConditions::update()
|
||||||
{
|
{
|
||||||
//loss messages
|
//loss messages
|
||||||
controller->map()->defeatMessage = MetaString::createFromRawString(ui->defeatMessageEdit->text().toStdString());
|
controller->map()->defeatMessage = MetaString::createFromTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "defeatMessage"), ui->defeatMessageEdit->text().toStdString()));
|
||||||
|
|
||||||
//loss conditions
|
//loss conditions
|
||||||
EventCondition defeatCondition(EventCondition::DAYS_WITHOUT_TOWN);
|
EventCondition defeatCondition(EventCondition::DAYS_WITHOUT_TOWN);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
void Translations::cleanupRemovedItems(CMap & map)
|
void Translations::cleanupRemovedItems(CMap & map)
|
||||||
{
|
{
|
||||||
std::set<std::string> existingObjects;
|
std::set<std::string> existingObjects{"core", "map", "header"};
|
||||||
for(auto object : map.objects)
|
for(auto object : map.objects)
|
||||||
existingObjects.insert(object->instanceName);
|
existingObjects.insert(object->instanceName);
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ void Translations::cleanupRemovedItems(CMap & map)
|
|||||||
{
|
{
|
||||||
for(auto part : QString::fromStdString(s.first).split('.'))
|
for(auto part : QString::fromStdString(s.first).split('.'))
|
||||||
{
|
{
|
||||||
if(part == "map" || existingObjects.count(part.toStdString()))
|
if(existingObjects.count(part.toStdString()))
|
||||||
{
|
{
|
||||||
updateTranslations.Struct()[s.first] = s.second;
|
updateTranslations.Struct()[s.first] = s.second;
|
||||||
break;
|
break;
|
||||||
|
@ -179,7 +179,7 @@ void VictoryConditions::initialize(MapController & c)
|
|||||||
void VictoryConditions::update()
|
void VictoryConditions::update()
|
||||||
{
|
{
|
||||||
//victory messages
|
//victory messages
|
||||||
controller->map()->victoryMessage = MetaString::createFromRawString(ui->victoryMessageEdit->text().toStdString());
|
controller->map()->victoryMessage = MetaString::createFromTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "victoryMessage"), ui->victoryMessageEdit->text().toStdString()));
|
||||||
|
|
||||||
//victory conditions
|
//victory conditions
|
||||||
EventCondition victoryCondition(EventCondition::STANDARD_WIN);
|
EventCondition victoryCondition(EventCondition::STANDARD_WIN);
|
||||||
|
Loading…
Reference in New Issue
Block a user