From 6fddbe40a4161792c6d7249b2512413259656a75 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 13 Apr 2017 17:55:27 +0200 Subject: [PATCH] Lang/Items * try to account for non-latin formating * use correct words provided by GlobalStrings.lua --- includes/types/item.class.php | 31 +++++----- localization/lang.class.php | 113 ++++++++++++++++++++++++++++++++-- localization/locale_dede.php | 19 +++--- localization/locale_enus.php | 17 ++--- localization/locale_eses.php | 17 ++--- localization/locale_frfr.php | 19 +++--- localization/locale_ruru.php | 25 ++++---- template/pages/quest.tpl.php | 4 +- 8 files changed, 176 insertions(+), 69 deletions(-) diff --git a/includes/types/item.class.php b/includes/types/item.class.php index aeea8af9..f94a9e0b 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -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 .= '
'.sprintf(Lang::item('bagSlotString'), Lang::item('bagFamily', $fam), $this->curTpl['slots']); - else - $x .= '
'.sprintf(Lang::item('bagSlotString'), $this->curTpl['slots'], Lang::item('bagFamily', $fam)); + $x .= '
'.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 .= ''.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'
'; + $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'
'; } else if (($this->curTpl['armor'] + $this->curTpl['armorDamageModifier']) > 0) - $x .= ''.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'
'; + $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'
'; // 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 than ( || ) gems case 5: // requires at least than ( || ) gems - $sp = (int)$gemCnd['value'.$i] > 1; - $x .= ''.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', $gemCnd['comparator'.$i], $sp), $gemCnd['value'.$i], Lang::item('gemColors', $gemCnd['color'.$i] - 1)).'
'; + $vspfArgs = [$gemCnd['value'.$i], Lang::item('gemColors', $gemCnd['color'.$i] - 1)]; break; case 3: // requires more than ( || ) gems - $x .= ''.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', 3), Lang::item('gemColors', $gemCnd['color'.$i] - 1), Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1)).'
'; + $vspfArgs = [Lang::item('gemColors', $gemCnd['color'.$i] - 1), Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1)]; break; + default: + continue; } + + $x .= ''.Lang::achievement('reqNumCrt').' '.Lang::item('gemConditions', $gemCnd['comparator'.$i], $vspfArgs).'
'; } } } @@ -948,7 +947,7 @@ class ItemList extends BaseType foreach ($pieces as $k => &$p) $p = ''.Util::localizedString($p, 'name').''; - $xSet = '
'.$itemset->getField('name', true).' (0/'.count($pieces).')'; + $xSet = '
'.Lang::item('setName', [''.$itemset->getField('name', true).'', 0, count($pieces)]).''; 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 .= ''.sprintf(Lang::item('set'), $setSpells[$i]['bonus'], ''.$setSpells[$i]['tooltip'].'').''; + $xSet .= ''.Lang::item('setBonus', [$setSpells[$i]['bonus'], ''.$setSpells[$i]['tooltip'].'']).''; if ($i < count($setSpells) - 1) $xSet .= '
'; } @@ -1058,9 +1057,9 @@ class ItemList extends BaseType if ($this->curTpl['pageTextId']) $xMisc[] = ''.Lang::item('readClick').''; - // charges (i guess checking first spell is enough (single charges not shown)) - if ($this->curTpl['spellCharges1'] > 1 || $this->curTpl['spellCharges1'] < -1) - $xMisc[] = ''.abs($this->curTpl['spellCharges1']).' '.Lang::item('charges').''; + // charges (i guess checking first spell is enough) + if ($this->curTpl['spellCharges1']) + $xMisc[] = ''.Lang::item('charges', [abs($this->curTpl['spellCharges1'])]).''; // list required reagents if (isset($xCraft)) diff --git a/localization/lang.class.php b/localization/lang.class.php index 2fceae55..ba8db6fc 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -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', '
', $var); + + // color + // |c|r + $var = preg_replace('/\|cff([a-f0-9]{6})(.+?)\|r/i', '$2', $var); + + // icon + // |T:0:0:0:-1|t - not used, skip if found + $var = preg_replace('/\|T[^\|]+\|t/', '', $var); + + // hyperlink + // |H|h|h - not used, truncate structure if found + $var = preg_replace('/\|H[^\|]+\|h([^\|]+)\|h/', '$1', $var); + + // french preposition : de + // |2 + $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-() + $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 + // |4:[:]; + $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; + } } ?> \ No newline at end of file diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 90883761..4b621528 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -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'=> ' (%s 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 @ 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' => "<Zufällige Verzauberung>", 'readClick' => "<Zum Lesen rechtsklicken>", 'openClick' => "<Zum Öffnen rechtsklicken>", - '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
in 3v3- oder 5v5-Turnieren", - "Benötigt eine persönliche und eine Teamwertung von %d
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", diff --git a/localization/locale_enus.php b/localization/locale_enus.php index fd14e717..75d46aeb 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -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 %s', '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'=> ' (%s 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 @ L%s", 'heroic' => "Heroic", // ITEM_HEROIC @@ -926,7 +926,8 @@ $lang = array( 'randEnchant' => "<Random enchantment>", // ITEM_RANDOM_ENCHANT 'readClick' => "<Right Click To Read>", // ITEM_READABLE 'openClick' => "<Right Click To Open>", // 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
in 3v3 or 5v5 brackets", - "Requires personal and team arena rating of %d
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", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 1027a089..14ab86e1 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -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 %s)', '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 @ 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' => "<Encantamiento aleatorio>", 'readClick' => "<Click derecho para leer>", 'openClick' => "<Click derecho para abrir>", - '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
en la rama de 3c3 o de 5c5", - "Requiere un índice de arena personal y de equipo de %d
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", diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 7bc873bf..e1728463 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -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'=> ' (%s 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 @ 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' => "<Enchantement aléatoire>", 'readClick' => "<Clique Droit pour Lire>", 'openClick' => "<Clic Droit pour Ouvrir>", - '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
en arène de 3c3 ou 5c5.", - "Nécessite une cote d'arène personnelle et en équipe de %d
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", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index 8e5c528f..54c6da33 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -605,7 +605,7 @@ $lang = array( 'receiveAlso' => "Вы также получите", 'spellCast' => "Следующее заклинание будет наложено на вас", 'spellLearn' => "Вы изучите", - 'bonusTalents' => "очков талантов", + 'bonusTalents' => "%d |4очко талантов:очка талантов:очков талантов;", 'spellDisplayed'=> ' (показано: %s)', 'attachment' => "[Attachment]", 'questInfo' => array( @@ -911,12 +911,12 @@ $lang = array( 'notFound' => "Такой предмет не существует.", 'armor' => "Броня: %s", 'block' => "Блок: %s", - 'charges' => "зарядов", - 'locked' => "Заперт", + 'charges' => "%d |4заряд:заряда:зарядов;", + 'locked' => "Заперто", 'ratingString' => "%s @ 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' => "<Случайное зачарование>", 'readClick' => "<Щелкните правой кнопкой мыши, чтобы прочитать.>", 'openClick' => "<Щелкните правой кнопкой мыши, чтобы открыть.>", - '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
в команде 3 на 3 или 5 на 5", - "Требуется личный рейтинг и рейтинг команды Арены %d
в команде 5 на 5" + "Требуется личный рейтинг и рейтинг команды Арены %d|nв команде 3 на 3 или 5 на 5", + "Требуется личный рейтинг и рейтинг команды Арены %d|nв команде 5 на 5" ), 'quality' => array( "Низкий", "Обычный", "Необычный", "Редкий", diff --git a/template/pages/quest.tpl.php b/template/pages/quest.tpl.php index 60f09105..75de1a98 100644 --- a/template/pages/quest.tpl.php +++ b/template/pages/quest.tpl.php @@ -190,11 +190,11 @@ if ($g = $this->gains): endif; if (!empty($g['title'])): - echo '
  • '.sprintf(Lang::quest('theTitle'), $g['title'])."
  • \n"; + echo '
  • '.Lang::quest('theTitle', [$g['title']])."
  • \n"; endif; if (!empty($g['tp'])): - echo '
  • '.$g['tp'].' '.Lang::quest('bonusTalents')."
  • \n"; + echo '
  • '.Lang::quest('bonusTalents', [$g['tp']])."
  • \n"; endif; echo " \n";