Fix special string used in singular for english
Some languages use singular form for another counts than 1, what makes singular strings in english with hardcoded number causing incorrect string to be displayed. Adding special branch for english singular string since it looks nicer. Differential revision: D4377 Patch by: @nwtour This was SVN commit r26096.
This commit is contained in:
parent
c9bea80e0d
commit
2922b693ab
@ -274,11 +274,13 @@ function getGameDescription(initAttributes, mapCache)
|
||||
"value":
|
||||
!ceasefire ?
|
||||
translate("disabled") :
|
||||
sprintf(translatePlural(
|
||||
"For the first minute, other players will stay neutral.",
|
||||
"For the first %(min)s minutes, other players will stay neutral.",
|
||||
ceasefire),
|
||||
{ "min": ceasefire })
|
||||
ceasefire == 1 ?
|
||||
translate("For the first minute, other players will stay neutral.") :
|
||||
sprintf(translatePlural(
|
||||
"For the first %(min)s minute, other players will stay neutral.",
|
||||
"For the first %(min)s minutes, other players will stay neutral.",
|
||||
ceasefire),
|
||||
{ "min": ceasefire })
|
||||
});
|
||||
|
||||
if (initAttributes.map == "random")
|
||||
|
@ -136,12 +136,14 @@ function formatMatchLimitString(matchEntLimit, matchEntCount, type)
|
||||
let text;
|
||||
if (type == "build")
|
||||
{
|
||||
if (passedLimit)
|
||||
text = sprintf(translatePlural("Could only be constructed once.", "Could only be constructed %(limit)s times.", matchEntLimit), {
|
||||
"limit": matchEntLimit
|
||||
});
|
||||
else if (matchEntLimit == 1)
|
||||
if (matchEntLimit == 1)
|
||||
text = translate("Can be constructed only once.");
|
||||
else if (passedLimit)
|
||||
text = sprintf(translatePlural(
|
||||
"Could only be constructed %(limit)s time.",
|
||||
"Could only be constructed %(limit)s times.",
|
||||
matchEntLimit),
|
||||
{ "limit": matchEntLimit });
|
||||
else
|
||||
text = sprintf(translatePlural("Can be constructed %(count)s more time.", "Can be constructed %(count)s more times.", count), {
|
||||
"count": count
|
||||
|
Loading…
Reference in New Issue
Block a user