1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00

improve translation for patrol radius

This commit is contained in:
godric3 2024-10-29 21:22:10 +01:00
parent ed087b7a5b
commit 37f7ce0ad6

View File

@ -340,8 +340,8 @@ void Inspector::updateProperties(CGHeroInstance * o)
auto * patrolDelegate = new InspectorDelegate;
patrolDelegate->options = { {QObject::tr("No patrol"), QVariant::fromValue(std::numeric_limits<ui32>::max())} };
for(int i = 0; i <= maxRadius; ++i)
patrolDelegate->options.push_back({ QObject::tr("%1 tile(s)").arg(i), QVariant::fromValue(i) });
auto patrolRadiusText = o->patrol.patrolling ? QObject::tr("%1 tile(s)").arg(o->patrol.patrolRadius) : QObject::tr("No patrol");
patrolDelegate->options.push_back({ QObject::tr("%n tile(s)", "", i), QVariant::fromValue(i)});
auto patrolRadiusText = o->patrol.patrolling ? QObject::tr("%n tile(s)", "", o->patrol.patrolRadius) : QObject::tr("No patrol");
addProperty("Patrol radius", patrolRadiusText, patrolDelegate, false);
}
}