Lang/Items

* try to account for non-latin formating
 * use correct words provided by GlobalStrings.lua
This commit is contained in:
Sarjuuk
2017-04-13 17:55:27 +02:00
parent 5a45c6a5e6
commit 6fddbe40a4
8 changed files with 176 additions and 69 deletions

View File

@@ -556,12 +556,7 @@ class ItemList extends BaseType
if ($this->curTpl['slots'] > 0)
{
$fam = $this->curTpl['bagFamily'] ? log($this->curTpl['bagFamily'], 2) + 1 : 0;
// word order differs <_<
if (in_array(User::$localeId, [LOCALE_FR, LOCALE_ES, LOCALE_RU]))
$x .= '<br />'.sprintf(Lang::item('bagSlotString'), Lang::item('bagFamily', $fam), $this->curTpl['slots']);
else
$x .= '<br />'.sprintf(Lang::item('bagSlotString'), $this->curTpl['slots'], Lang::item('bagFamily', $fam));
$x .= '<br />'.Lang::item('bagSlotString', [$this->curTpl['slots'], Lang::item('bagFamily', $fam)]);
}
if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_CLASS_AMMUNITION]))
@@ -635,10 +630,10 @@ class ItemList extends BaseType
if ($interactive)
$spanI = 'class="q2 tip" onmouseover="$WH.Tooltip.showAtCursor(event, $WH.sprintf(LANG.tooltip_armorbonus, '.$this->curTpl['armorDamageModifier'].'), 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"';
$x .= '<span '.$spanI.'><!--addamr'.$this->curTpl['armorDamageModifier'].'--><span>'.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span></span><br />';
$x .= '<span '.$spanI.'><!--addamr'.$this->curTpl['armorDamageModifier'].'--><span>'.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'</span></span><br />';
}
else if (($this->curTpl['armor'] + $this->curTpl['armorDamageModifier']) > 0)
$x .= '<span><!--amr-->'.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span><br />';
$x .= '<span><!--amr-->'.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'</span><br />';
// Block (note: block value from field block and from field stats or parsed from itemSpells are displayed independently)
if ($this->curTpl['tplBlock'])
@@ -660,17 +655,21 @@ class ItemList extends BaseType
if (!$gemCnd['color'.$i])
continue;
$vspfArgs = [];
switch ($gemCnd['comparator'.$i])
{
case 2: // requires less <color> than (<value> || <comparecolor>) gems
case 5: // requires at least <color> than (<value> || <comparecolor>) gems
$sp = (int)$gemCnd['value'.$i] > 1;
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', $gemCnd['comparator'.$i], $sp), $gemCnd['value'.$i], Lang::item('gemColors', $gemCnd['color'.$i] - 1)).'</span><br />';
$vspfArgs = [$gemCnd['value'.$i], Lang::item('gemColors', $gemCnd['color'.$i] - 1)];
break;
case 3: // requires more <color> than (<value> || <comparecolor>) gems
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', 3), Lang::item('gemColors', $gemCnd['color'.$i] - 1), Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1)).'</span><br />';
$vspfArgs = [Lang::item('gemColors', $gemCnd['color'.$i] - 1), Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1)];
break;
default:
continue;
}
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.Lang::item('gemConditions', $gemCnd['comparator'.$i], $vspfArgs).'</span><br />';
}
}
}
@@ -948,7 +947,7 @@ class ItemList extends BaseType
foreach ($pieces as $k => &$p)
$p = '<span><!--si'.$p['equiv'].'--><a href="?item='.$k.'">'.Util::localizedString($p, 'name').'</a></span>';
$xSet = '<br /><span class="q"><a href="?itemset='.$itemset->id.'" class="q">'.$itemset->getField('name', true).'</a> (0/'.count($pieces).')</span>';
$xSet = '<br /><span class="q">'.Lang::item('setName', ['<a href="?itemset='.$itemset->id.'" class="q">'.$itemset->getField('name', true).'</a>', 0, count($pieces)]).'</span>';
if ($skId = $itemset->getField('skillId')) // bonus requires skill to activate
{
@@ -996,7 +995,7 @@ class ItemList extends BaseType
$setSpells[$i] = $setSpells[$j];
$setSpells[$j] = $tmp;
}
$xSet .= '<span>'.sprintf(Lang::item('set'), $setSpells[$i]['bonus'], '<a href="?spell='.$setSpells[$i]['entry'].'">'.$setSpells[$i]['tooltip'].'</a>').'</span>';
$xSet .= '<span>'.Lang::item('setBonus', [$setSpells[$i]['bonus'], '<a href="?spell='.$setSpells[$i]['entry'].'">'.$setSpells[$i]['tooltip'].'</a>']).'</span>';
if ($i < count($setSpells) - 1)
$xSet .= '<br />';
}
@@ -1058,9 +1057,9 @@ class ItemList extends BaseType
if ($this->curTpl['pageTextId'])
$xMisc[] = '<span class="q2">'.Lang::item('readClick').'</span>';
// charges (i guess checking first spell is enough (single charges not shown))
if ($this->curTpl['spellCharges1'] > 1 || $this->curTpl['spellCharges1'] < -1)
$xMisc[] = '<span class="q1">'.abs($this->curTpl['spellCharges1']).' '.Lang::item('charges').'</span>';
// charges (i guess checking first spell is enough)
if ($this->curTpl['spellCharges1'])
$xMisc[] = '<span class="q1">'.Lang::item('charges', [abs($this->curTpl['spellCharges1'])]).'</span>';
// list required reagents
if (isset($xCraft))

View File

@@ -59,19 +59,26 @@ class Lang
return null;
}
$vspfArgs = [];
$var = self::$$prop;
foreach ($args as $key)
foreach ($args as $arg)
{
if (!isset($var[$key]))
if (is_array($arg))
{
trigger_error('Lang - undefined key "'.$key.'" in property Lang::$'.$prop.'[\''.implode('\'][\'', $args).'\']', E_USER_WARNING);
$vspfArgs = $arg;
continue;
}
else if (!isset($var[$arg]))
{
trigger_error('Lang - undefined key "'.$arg.'" in property Lang::$'.$prop.'[\''.implode('\'][\'', $args).'\']', E_USER_WARNING);
return null;
}
$var = $var[$key];
$var = $var[$arg];
}
return $var;
return self::vspf($var, $vspfArgs);
}
public static function sort($prop, $group, $method = SORT_NATURAL)
@@ -342,6 +349,102 @@ class Lang
return number_format($number, $decimals, $seps[User::$localeId][1], $no1k ? '' : $seps[User::$localeId][0]);
}
private static function vspf($var, $args)
{
if (is_array($var))
{
foreach ($var as &$v)
$v == self::vspf($v, $args);
return $var;
}
if ($args)
$var = vsprintf($var, $args);
// line break
// |n
$var = str_replace('|n', '<br />', $var);
// color
// |c<aarrggbb><word>|r
$var = preg_replace('/\|cff([a-f0-9]{6})(.+?)\|r/i', '<span style="color: #$1;">$2</span>', $var);
// icon
// |T<imgPath>:0:0:0:-1|t - not used, skip if found
$var = preg_replace('/\|T[^\|]+\|t/', '', $var);
// hyperlink
// |H<hyperlinkStruct>|h<name>|h - not used, truncate structure if found
$var = preg_replace('/\|H[^\|]+\|h([^\|]+)\|h/', '$1', $var);
// french preposition : de
// |2 <word>
$var = preg_replace_callback('/\|2\s(\w)/i', function ($m) {
if (in_array(strtolower($m[1], ['a', 'e', 'h', 'i', 'o', 'u'])))
return "d'".$m[1];
else
return 'de '.$m[1];
}, $var);
// russian word cunjugation thingy
// |3-<number>(<word>)
$var = preg_replace_callback('/\|3-(\d)\(([^\)]+)\)/i', function ($m) {
switch ($m[0])
{
case 1: // seen cases
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
default: // passthrough .. unk case
return $m[1];
}
}, $var);
// numeric switch
// <number> |4<singular>:<plural>[:<plural2>];
$var = preg_replace_callback('/([\d\.\,]+)([^\d]*)\|4([^:]*):([^;]*);/i', function ($m) {
$plurals = explode(':', $m[4]);
$result = '';
if (count($plurals) == 2) // special case: ruRU
{
switch (substr($m[1], -1)) // check last digit of number
{
case 1:
// but not 11 (teen number)
if (!in_array($m[1], [11]))
{
$result = $m[3];
break;
}
case 2:
case 3:
case 4:
// but not 12, 13, 14 (teen number) [11 is passthrough]
if (!in_array($m[1], [11, 12, 13, 14]))
{
$result = $plurals[0];
break;
}
break;
default:
$result = $plurals[1];
}
}
else
$result = ($m[1] == 1 ? $m[3] : $plurals[0]);
return $m[1].$m[2].$result;
}, $var);
return $var;
}
}
?>

View File

@@ -605,7 +605,7 @@ $lang = array(
'receiveAlso' => "Ihr bekommt außerdem",
'spellCast' => "Der folgende Zauber wird auf Euch gewirkt",
'spellLearn' => "Ihr erlernt",
'bonusTalents' => "Talentpunkte",
'bonusTalents' => "%d |4Talentpunkt:Talentpunkte;",
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> wird angezeigt)',
'attachment' => "Anlage",
'questInfo' => array(
@@ -911,14 +911,14 @@ $lang = array(
'notFound' => "Dieser Gegenstand existiert nicht .",
'armor' => "%s Rüstung",
'block' => "%s Blocken",
'charges' => "Aufladungen",
'charges' => "%d |4Aufladung:Aufladungen;",
'locked' => "Verschlossen",
'ratingString' => "%s&nbsp;@&nbsp;L%s",
'heroic' => "Heroisch",
'startQuest' => "Dieser Gegenstand startet eine Quest",
'bagSlotString' => "%d Platz %s",
'bagSlotString' => '%1$d Platz %2$s',
'fap' => "Angriffskraft in Tiergestalt",
'durability' => "Haltbarkeit %1$d / %2$d",
'durability' => 'Haltbarkeit %1$d / %2$d',
'realTime' => "Realzeit",
'conjured' => "Herbeigezauberter Gegenstand",
'sellPrice' => "Verkaufspreis",
@@ -926,7 +926,8 @@ $lang = array(
'randEnchant' => "&lt;Zufällige Verzauberung&gt",
'readClick' => "&lt;Zum Lesen rechtsklicken&gt",
'openClick' => "&lt;Zum Öffnen rechtsklicken&gt",
'set' => "(%d) Set: %s",
'setBonus' => "(%d) Set: %s",
'setName' => '%1$s (%2$d/%3$d)',
'partyLoot' => "Gruppenloot",
'smartLoot' => "Intelligente Beuteverteilung",
'indestructible'=> "Kann nicht zerstört werden",
@@ -980,14 +981,14 @@ $lang = array(
"Meta", "Rot", "Gelb", "Blau"
),
'gemConditions' => array( // ENCHANT_CONDITION_* in GlobalStrings.lua; 2 not in use (use as PH)
2 => ["weniger als %d Edelstein der Kategorie %s", "weniger als %d Edelsteine der Kategorie %s"],
2 => "weniger als %d |4Edelstein:Edelsteine; der Kategorie %s",
3 => "mehr Edelsteine der Kategorie %s als Edelsteine der Kategorie %s",
5 => ["mindestens %d Edelstein der Kategorie %s", "mindestens %d Edelsteine der Kategorie %s"]
5 => "mindestens %d |4Edelstein:Edelsteine; der Kategorie %s"
),
'reqRating' => array( // ITEM_REQ_ARENA_RATING*
"Benötigt eine persönliche Arenawertung und Teamwertung von %d.",
"Benötigt eine persönliche und eine Teamwertung von %d<br>in 3v3- oder 5v5-Turnieren",
"Benötigt eine persönliche und eine Teamwertung von %d<br>in 5v5-Turnieren"
"Benötigt eine persönliche und eine Teamwertung von %d|nin 3v3- oder 5v5-Turnieren",
"Benötigt eine persönliche und eine Teamwertung von %d|nin 5v5-Turnieren"
),
'quality' => array(
"Schlecht", "Verbreitet", "Selten", "Rar",

View File

@@ -592,7 +592,7 @@ $lang = array(
'enabledByQ' => "Enabled by",
'enabledByQDesc'=> "This quest is available only, when one of these quests are active",
'gainsDesc' => "Upon completion of this quest you will gain",
'theTitle' => 'the title "%s"', // REWARD_TITLE
'theTitle' => 'the title "%s"', // partly REWARD_TITLE
'mailDelivery' => "You will receive this letter%s%s",
'mailBy' => ' by <a href="?npc=%d">%s</a>',
'mailIn' => " after %s",
@@ -605,7 +605,7 @@ $lang = array(
'receiveAlso' => "You will also receive", // REWARD_ITEMS
'spellCast' => "The following spell will be cast on you", // REWARD_AURA
'spellLearn' => "You will learn", // REWARD_SPELL
'bonusTalents' => "talent points",
'bonusTalents' => "%d talent |4point:points;", // partly LEVEL_UP_CHAR_POINTS
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> is displayed)',
'attachment' => "Attachment",
'questInfo' => array(
@@ -911,7 +911,7 @@ $lang = array(
'notFound' => "This item doesn't exist.",
'armor' => "%s Armor", // ARMOR_TEMPLATE
'block' => "%s Block", // SHIELD_BLOCK_TEMPLATE
'charges' => "Charges", // ITEM_SPELL_CHARGES
'charges' => "%d |4Charge:Charges;", // ITEM_SPELL_CHARGES
'locked' => "Locked", // LOCKED
'ratingString' => "%s&nbsp;@&nbsp;L%s",
'heroic' => "Heroic", // ITEM_HEROIC
@@ -926,7 +926,8 @@ $lang = array(
'randEnchant' => "&lt;Random enchantment&gt", // ITEM_RANDOM_ENCHANT
'readClick' => "&lt;Right Click To Read&gt", // ITEM_READABLE
'openClick' => "&lt;Right Click To Open&gt", // ITEM_OPENABLE
'set' => "(%d) Set: %s", // ITEM_SET_BONUS_GRAY
'setBonus' => "(%d) Set: %s", // ITEM_SET_BONUS_GRAY
'setName' => "%s (%d/%d)", // ITEM_SET_NAME
'partyLoot' => "Party loot",
'smartLoot' => "Smart loot",
'indestructible'=> "Cannot be destroyed",
@@ -980,14 +981,14 @@ $lang = array(
"meta", "red", "yellow", "blue"
),
'gemConditions' => array( // ENCHANT_CONDITION_* in GlobalStrings.lua
2 => ["less than %d %s gem", "less than %d %s gems"],
2 => "less than %d %s |4gem:gems;",
3 => "more %s gems than %s gems",
5 => ["at least %d %s gem", "at least %d %s gems"]
5 => "at least %d %s |4gem:gems;"
),
'reqRating' => array( // ITEM_REQ_ARENA_RATING*
"Requires personal and team arena rating of %d",
"Requires personal and team arena rating of %d<br>in 3v3 or 5v5 brackets",
"Requires personal and team arena rating of %d<br>in 5v5 brackets"
"Requires personal and team arena rating of %d|nin 3v3 or 5v5 brackets",
"Requires personal and team arena rating of %d|nin 5v5 brackets"
),
'quality' => array( // ITEM_QUALITY?_DESC
"Poor", "Common", "Uncommon", "Rare",

View File

@@ -605,7 +605,7 @@ $lang = array(
'receiveAlso' => "También recibirás",
'spellCast' => "Te van a lanzar el siguiente hechizo",
'spellLearn' => "Aprenderás",
'bonusTalents' => "puntos de talento",
'bonusTalents' => "%d |4punto:puntos; de talento",
'spellDisplayed'=> ' (mostrando <a href="?spell=%d">%s</a>)',
'attachment' => "Adjunto",
'questInfo' => array(
@@ -911,12 +911,12 @@ $lang = array(
'notFound' => "Este objeto no existe.",
'armor' => "%s armadura",
'block' => "%s bloqueo",
'charges' => "cargas",
'charges' => "%d |4carga:cargas;",
'locked' => "Cerrado",
'ratingString' => "%s&nbsp;@&nbsp;L%s",
'heroic' => "Heroico",
'startQuest' => "Este objeto inicia una misión",
'bagSlotString' => "%s de %d casillas",
'bagSlotString' => '%2$s de %1$d casillas',
'fap' => "poder de ataque feral",
'durability' => "Durabilidad %d / %d",
'realTime' => "tiempo real",
@@ -926,7 +926,8 @@ $lang = array(
'randEnchant' => "&lt;Encantamiento aleatorio&gt",
'readClick' => "&lt;Click derecho para leer&gt",
'openClick' => "&lt;Click derecho para abrir&gt",
'set' => "(%d) Bonif.: %s",
'setBonus' => "(%d) Bonif.: %s",
'setName' => "%s (%d/%d)",
'partyLoot' => "Despojo de grupo",
'smartLoot' => "Botín inteligente",
'indestructible'=> "No puede ser destruido",
@@ -980,14 +981,14 @@ $lang = array(
"meta", "roja(s)", "amarilla(s)", "azul(es)"
),
'gemConditions' => array( // ENCHANT_CONDITION_*
2 => ["menos de %d %s gema", "menos de %d %s gemas"],
2 => "menos de %d |4gema:gemas; %s",
3 => "más gemas %s que gemas %s",
5 => ["al menos %d %s gema", "al menos %d %s gemas"]
5 => "al menos %d |4gema:gemas; %s"
),
'reqRating' => array( // ITEM_REQ_ARENA_RATING*
"Requiere un índice de arena personal y de equipo de %d",
"Requiere un índice de arena personal y de equipo de %d<br>en la rama de 3c3 o de 5c5",
"Requiere un índice de arena personal y de equipo de %d<br>en la rama de 5c5"
"Requiere un índice de arena personal y de equipo de %d|nen la rama de 3c3 o de 5c5",
"Requiere un índice de arena personal y de equipo de %d|nen la rama de 5c5"
),
'quality' => array(
"Pobre", "Común", "Poco Común", "Raro",

View File

@@ -605,7 +605,7 @@ $lang = array(
'receiveAlso' => "Vous recevrez également",
'spellCast' => "Vous allez être la cible du sort suivant",
'spellLearn' => "Vous apprendrez",
'bonusTalents' => "points de talent",
'bonusTalents' => "%d |4point:points; de talent",
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> affichés)',
'attachment' => "[Attachment]",
'questInfo' => array(
@@ -911,12 +911,12 @@ $lang = array(
'notFound' => "Cet objet n'existe pas.",
'armor' => "Armure : %s",
'block' => "Bloquer : %s",
'charges' => "Charges",
'charges' => "%d |4charge:charges;",
'locked' => "Verrouillé",
'ratingString' => "%s&nbsp;@&nbsp;L%s",
'heroic' => "Héroïque",
'startQuest' => "Cet objet permet de lancer une quête",
'bagSlotString' => "%s %d emplacements",
'bagSlotString' => '%2$s %1$d |4emplacement:emplacements;',
'fap' => "puissance d'attaque en combat farouche",
'durability' => "Durabilité %d / %d",
'realTime' => "temps réel",
@@ -926,7 +926,8 @@ $lang = array(
'randEnchant' => "&lt;Enchantement aléatoire&gt",
'readClick' => "&lt;Clique Droit pour Lire&gt",
'openClick' => "&lt;Clic Droit pour Ouvrir&gt",
'set' => "(%d) Ensemble : %s",
'setBonus' => "(%d) Ensemble : %s",
'setName' => "%s (%d/%d)",
'partyLoot' => "Butin de groupe",
'smartLoot' => "Butin intelligent",
'indestructible'=> "Ne peut être détruit",
@@ -980,14 +981,14 @@ $lang = array(
"Méta", "rouge(s)", "jaune(s)", "bleue(s)"
),
'gemConditions' => array( // ENCHANT_CONDITION_*
2 => ["moins de %d gemme %s", "moins de %d gemmes %s"],
3 => "plus de gemmes %s que de %s", // plus de gemmes %s que |2 %s
5 => ["au moins %d gemme %s", "au moins %d gemmes %s"]
2 => "moins de %d |4gemme:gemmes; %s",
3 => "plus de gemmes %s que |2 %s",
5 => "au moins %d |4gemme:gemmes; %s"
),
'reqRating' => array( // ITEM_REQ_ARENA_RATING*
"Nécessite une cote d'arène personnelle et en équipe de %d",
"Nécessite une cote d'arène personnelle et en équipe de %d<br>en arène de 3c3 ou 5c5.",
"Nécessite une cote d'arène personnelle et en équipe de %d<br>en arène de 5c5."
"Nécessite une cote d'arène personnelle et en équipe de %d|nen arène de 3c3 ou 5c5.",
"Nécessite une cote d'arène personnelle et en équipe de %d|nen arène de 5c5."
),
'quality' => array(
"Médiocre", "Classique", "Bonne", "Rare",

View File

@@ -605,7 +605,7 @@ $lang = array(
'receiveAlso' => "Вы также получите",
'spellCast' => "Следующее заклинание будет наложено на вас",
'spellLearn' => "Вы изучите",
'bonusTalents' => "очков талантов",
'bonusTalents' => "%d |4очко талантов:очка талантов:очков талантов;",
'spellDisplayed'=> ' (показано: <a href="?spell=%d">%s</a>)',
'attachment' => "[Attachment]",
'questInfo' => array(
@@ -911,12 +911,12 @@ $lang = array(
'notFound' => "Такой предмет не существует.",
'armor' => "Броня: %s",
'block' => "Блок: %s",
'charges' => "зарядов",
'locked' => "Заперт",
'charges' => "%d |4заряд:заряда:зарядов;",
'locked' => "Заперто",
'ratingString' => "%s&nbsp;@&nbsp;L%s",
'heroic' => "Героический",
'startQuest' => "Этот предмет позволяет получить задание.",
'bagSlotString' => "%s (ячеек: %d)",
'bagSlotString' => '%2$s (%1$d |4ячейка:ячейки:ячеек;)',
'fap' => "Сила атаки зверя",
'durability' => "Прочность: %d / %d",
'realTime' => "реальное время",
@@ -926,7 +926,8 @@ $lang = array(
'randEnchant' => "&lt;Случайное зачарование&gt",
'readClick' => "&lt;Щелкните правой кнопкой мыши, чтобы прочитать.&gt",
'openClick' => "&lt;Щелкните правой кнопкой мыши, чтобы открыть.&gt",
'set' => "Комплект (%d предмет): %s", // todo(med): fix that shit! |4предмет:предмета:предметов;
'setBonus' => "Комплект (%d |4предмет:предмета:предметов;): %s",
'setName' => "%s (%d/%d)",
'partyLoot' => "Добыча группы",
'smartLoot' => "Умное распределение добычи",
'indestructible'=> "Невозможно выбросить",
@@ -967,8 +968,8 @@ $lang = array(
'dps' => "(%.1f ед. урона в секунду)",
'damage' => array( // *DAMAGE_TEMPLATE*
// basic, basic /w school, add basic, add basic /w school
'single' => ["Урон: %d", "%d ед. %s", "+ %d ед. урона", "+%d ед. урона (%s)" ],
'range' => ["Урон: %d - %d", "%d - %d ед. %s", "+ %d - %d ед. урона", "+%d - %d ед. урона (%s)" ],
'single' => ["Урон: %d", "%d ед. |3-6(%s)", "+ %d ед. урона", "+%d ед. урона (%s)" ],
'range' => ["Урон: %d - %d", "%d - %d ед. |3-6(%s)", "+ %d - %d ед. урона", "+%d - %d ед. урона (%s)" ],
'ammo' => ["Добавляет %g ед. урона в секунду", "Добавляет %g ед. урона (%s) в секунду", "+ ед. урона в секунду от боеприпасов (%g)", "+ %g %s ед. урона в секунду" ]
),
'gems' => "Самоцветы",
@@ -980,14 +981,14 @@ $lang = array(
"Особый", "Красный", "Желтый", "Синий"
),
'gemConditions' => array( // ENCHANT_CONDITION_* so whats that pipe-code..?
2 => ["меньше, чем %d камень %s цвета", "меньше, чем %d камня %s цвета"], // меньше, чем %d |4камень:камня:камней; |3-1(%s) цвета
3 => "больше %s, чем %s камней", // больше |3-7(%s), чем |3-7(%s) камней
5 => ["хотя бы %d камень %s цвета", "хотя бы %d камня %s цвета"] // хотя бы %d |4камень:камня:камней; |3-1(%s) цвета; same here
2 => "меньше, чем %d |4камень:камня:камней; |3-1(%s) цвета",
3 => "больше |3-7(%s), чем |3-7(%s) камней",
5 => "хотя бы %d |4камень:камня:камней; |3-1(%s) цвета"
),
'reqRating' => array( // ITEM_REQ_ARENA_RATING*
"Требуется личный и командный рейтинг на арене не ниже %d",
"Требуется личный рейтинг и рейтинг команды Арены %d<br>в команде 3 на 3 или 5 на 5",
"Требуется личный рейтинг и рейтинг команды Арены %d<br>в команде 5 на 5"
"Требуется личный рейтинг и рейтинг команды Арены %d|nв команде 3 на 3 или 5 на 5",
"Требуется личный рейтинг и рейтинг команды Арены %d|nв команде 5 на 5"
),
'quality' => array(
"Низкий", "Обычный", "Необычный", "Редкий",

View File

@@ -190,11 +190,11 @@ if ($g = $this->gains):
endif;
if (!empty($g['title'])):
echo ' <li><div>'.sprintf(Lang::quest('theTitle'), $g['title'])."</div></li>\n";
echo ' <li><div>'.Lang::quest('theTitle', [$g['title']])."</div></li>\n";
endif;
if (!empty($g['tp'])):
echo ' <li><div>'.$g['tp'].' '.Lang::quest('bonusTalents')."</div></li>\n";
echo ' <li><div>'.Lang::quest('bonusTalents', [$g['tp']])."</div></li>\n";
endif;
echo " </ul>\n";