-- AdeGear: language support (English / Russian). -- English text is the key. AG.T("text") returns the Russian text on a Russian client and the same -- text otherwise. A key can hold placeholders {1} {2} ..., so texts that are glued together from -- pieces ("Set bonus (2 pieces) counted: ...") are translated without rewriting every place that makes -- them: the pieces between the placeholders are matched, each captured piece is translated again -- (an unknown piece, like an item name, stays as it is) and goes into the Russian text at {1} {2} ... -- Target: Lua 5.0. local AG = AdeGear local RU = { ---------------------------------------------------------------------- -- Options window ---------------------------------------------------------------------- ["AdeGear options"] = "Настройки AdeGear", ["General"] = "Общие", ["Leveling"] = "Прокачка", ["Weights"] = "Веса", ["Talents"] = "Таланты", ["Show the comparison when hovering items"] = "Показывать сравнение при наведении на предмет", ["Show the tooltip of the equipped item next to it"] = "Показывать подсказку надетого предмета рядом", ["Only compare while Shift is held"] = "Сравнивать только при зажатом Shift", ["Upgrade arrows on item icons (bags, vendors)"] = "Стрелки улучшений на значках предметов (сумки, торговцы)", ["GearScore on item and player tooltips and the character window"] = "GearScore в подсказках предметов и игроков и в окне персонажа", ["Minimap button"] = "Кнопка у миникарты", ["Window look (/reload applies)"] = "Вид окон (применяется после /reload)", ["Auto"] = "Авто", ["Vanilla"] = "Обычный", ["pfUI"] = "pfUI", ["Detail level"] = "Уровень подробности", ["Compact"] = "Кратко", ["Normal"] = "Обычно", ["Detailed"] = "Подробно", ["Role"] = "Роль", ["Tank"] = "Танк", ["Healer"] = "Целитель", ["Damage"] = "Урон", ["Heal"] = "Лечение", ["Auto (from talents)"] = "Авто (по талантам)", ["How do you play?"] = "Как вы играете?", ["Solo"] = "Один", ["Party"] = "Группа", ["Raids"] = "Рейды", ["Damage share while soloing"] = "Доля урона при игре в одиночку", ["Language"] = "Язык (Language)", ["English"] = "English", ["Russian"] = "Русский", ["Solo: tanks and healers also count damage, so they can kill things while leveling. Party and Raids: the addon works out your role from your talents and values it fully, with no damage share. Raids also count level 63 bosses: hit and defense caps, more value for weapon skill, and for healers more value for mana regen."] = "Один: танки и целители тоже считают урон, чтобы убивать мобов при прокачке. Группа и рейды: аддон определяет вашу роль по талантам и оценивает её полностью, без доли урона. Рейды также считают боссов 63 уровня: пороги меткости и защиты, больше ценности у навыка оружия, а у целителей у восстановления маны.", ["Tanks and healers also count damage while soloing"] = "Танки и целители тоже считают урон при игре в одиночку", ["Damage share is gone at level"] = "Доля урона исчезает на уровне", ["Casters count wand dps while soloing"] = "Заклинатели считают урон жезла при игре в одиночку", ["The damage share is set on the General tab. It fades out linearly until the level chosen here, so at level 60 a healer is judged as a healer only."] = "Доля урона задаётся на вкладке «Общие». Она плавно убывает до выбранного здесь уровня, поэтому на 60 уровне целитель оценивается только как целитель.", ["No stat values for this character yet"] = "Для этого персонажа ещё нет значений характеристик", ["set by you"] = "задано вами", [" set by you)"] = " задано вами)", ["AUTO is calculated from your class, talents and role. Type a number to use your own value; empty = auto. Mouse wheel scrolls ({1}-{2} of {3})."] = "АВТО считается по вашему классу, талантам и роли. Введите число, чтобы задать своё значение; пусто = авто. Колесо мыши прокручивает ({1}-{2} из {3}).", ["AUTO is calculated from your class, talents and role. Type a number to use your own value; empty = auto."] = "АВТО считается по вашему классу, талантам и роли. Введите число, чтобы задать своё значение; пусто = авто.", ["Reset"] = "Сброс", ["STAT"] = "ХАРАКТЕРИСТИКА", ["AUTO"] = "АВТО", ["TALENT EFFECT"] = "ЭФФЕКТ ТАЛАНТА", ["YOUR VALUE"] = "ВАШЕ ЗНАЧЕНИЕ", ["not read yet"] = "ещё не прочитано", ["talents read"] = "таланты прочитаны", ["AdeTalents v{1} ({2})"] = "AdeTalents v{1} ({2})", ["AdeTalents not found: talents are NOT counted"] = "AdeTalents не найден: таланты НЕ учитываются", ["No talent changes any value yet. Spend points in talents that affect your gear (armor, Intellect, block ...) and open this tab again."] = "Пока ни один талант не меняет значения. Вложите очки в таланты, влияющие на экипировку (броня, интеллект, блок ...), и снова откройте эту вкладку.", ["Mouse wheel scrolls ({1}-{2} of {3}). Updates when you open this tab."] = "Колесо мыши прокручивает ({1}-{2} из {3}). Обновляется при открытии вкладки.", ["Updates when you open this tab, so a respec shows here."] = "Обновляется при открытии вкладки, поэтому смена талантов видна здесь.", ["Talents that change the value of gear"] = "Таланты, меняющие ценность экипировки", ---------------------------------------------------------------------- -- Panel ---------------------------------------------------------------------- ["THIS ITEM"] = "ЭТОТ ПРЕДМЕТ", ["EQUIPPED"] = "НАДЕТО", ["BIG UPGRADE"] = "БОЛЬШОЕ УЛУЧШЕНИЕ", ["UPGRADE"] = "УЛУЧШЕНИЕ", ["SMALL UPGRADE"] = "НЕБОЛЬШОЕ УЛУЧШЕНИЕ", ["ABOUT EQUAL"] = "ПРИМЕРНО РАВНО", ["SMALL DOWNGRADE"] = "НЕБОЛЬШОЕ УХУДШЕНИЕ", ["DOWNGRADE"] = "УХУДШЕНИЕ", ["BIG DOWNGRADE"] = "БОЛЬШОЕ УХУДШЕНИЕ", ["FILLS AN EMPTY SLOT"] = "ЗАПОЛНЯЕТ ПУСТОЙ СЛОТ", ["NOTHING FOR YOU"] = "НЕ ДЛЯ ВАС", ["Empty slot"] = "Пустой слот", ["empty"] = "пусто", ["{1} + off hand"] = "{1} + левая рука", ["compared with: {1}"] = "сравнение с: {1}", ["GearScore {1} to {2} ({3})"] = "GearScore {1} → {2} ({3})", ["GearScore: {1}"] = "GearScore: {1}", ["IN EACH SLOT"] = "В КАЖДОМ СЛОТЕ", ["EFFECTS"] = "ЭФФЕКТЫ", ["STAT BY STAT"] = "ПО ХАРАКТЕРИСТИКАМ", ["BY ROLE"] = "ПО РОЛЯМ", ["TALENTS COUNTED"] = "УЧТЁННЫЕ ТАЛАНТЫ", ["{1} (replaces {2})"] = "{1} (вместо: {2})", ["{1} (replaces {2}) <"] = "{1} (вместо: {2}) <", ["+ {1} more, hold Alt"] = "+ ещё {1}, зажмите Alt", ["- lost: {1}"] = "- потеряно: {1}", ["Made for"] = "Предназначено для", ["Fit for your spec"] = "Подходит вашей специализации", ["DEMO DATA, not real item values"] = "ДЕМО-ДАННЫЕ, не настоящие значения предметов", ["You can't use this item"] = "Вы не можете использовать этот предмет", ["Not gear"] = "Это не экипировка", ["No stat values for {1} yet"] = "Для класса {1} ещё нет значений характеристик", ["No stat values for this role yet"] = "Для этой роли ещё нет значений характеристик", ["Type unknown (Russian client): can't check if you can use it"] = "Тип неизвестен (русский клиент): не удаётся проверить, можно ли это надеть", ["USABLE LATER"] = "МОЖНО БУДЕТ ПОЗЖЕ", ["NEEDS TRAINING"] = "НУЖНО ОБУЧЕНИЕ", ["LOCKED BY LEVEL"] = "ЗАКРЫТО УРОВНЕМ", ["NEEDS A PROFESSION"] = "НУЖНА ПРОФЕССИЯ", ["NEEDS A MATCHING WEAPON"] = "НУЖНО ПОДХОДЯЩЕЕ ОРУЖИЕ", ["CAN'T USE"] = "НЕЛЬЗЯ ИСПОЛЬЗОВАТЬ", ["NOT GEAR"] = "НЕ ЭКИПИРОВКА", ["! {1}"] = "! {1}", ["Main hand + off hand"] = "Правая рука + левая рука", ["Off hand (replaces the two-hander)"] = "Левая рука (вместо двуручного)", ["Set bonus ({1} pieces) counted: {2}"] = "Бонус комплекта ({1} предм.) учтён: {2}", ["Set bonus ({1} pieces), not counted: {2}"] = "Бонус комплекта ({1} предм.) не учтён: {2}", ["Loses set bonus of {1} ({2} pieces): {3}"] = "Теряется бонус комплекта {1} ({2} предм.): {3}", ["Loses set bonus of {1} ({2} pieces), not counted: {3}"] = "Теряется бонус комплекта {1} ({2} предм.), не учтён: {3}", ["Takes a piece out of {1} ({2}): a bonus may stop, its piece count is not known yet (hover the set's pieces you do not wear and it learns it)"] = "Убирает предмет из комплекта {1} ({2}): бонус может пропасть, число предметов для него пока неизвестно (наведите на предметы комплекта, которые вы не носите, и аддон это узнает)", ["Set bonuses are not counted yet"] = "Бонусы комплектов пока не учитываются", ["Not counted: {1}"] = "Не учтено: {1}", ["Not understood: {1}"] = "Не понято: {1}", ["{1}: {2} of about {3}, the cap is reached"] = "{1}: {2} из примерно {3}, предел достигнут", ["{1}: {2} of about {3}, the cap is reached (more has little value)"] = "{1}: {2} из примерно {3}, предел достигнут (больше почти не нужно)", ["{1}: {2} of about {3} (cap)"] = "{1}: {2} из примерно {3} (предел)", ["Defense {1}: crit immune ({2}), more is only avoidance"] = "Защита {1}: иммунитет к критам ({2}), дальше это только уклонение", ["Armor {1} to {2}: {3}% to {4}% damage reduction (cap 75%)"] = "Броня {1} → {2}: снижение урона {3}% → {4}% (предел 75%)", ["Armor {1}: {2}% damage reduction (cap 75%)"] = "Броня {1}: снижение урона {2}% (предел 75%)", ["{1} (empty)"] = "{1} (пусто)", ["{1}: replaces {2}"] = "{1}: вместо {2}", ["{1} pts"] = "{1} оч.", -- slots ["Ammo"] = "Боеприпасы", ["Head"] = "Голова", ["Neck"] = "Шея", ["Shoulder"] = "Плечи", ["Shirt"] = "Рубашка", ["Chest"] = "Грудь", ["Waist"] = "Пояс", ["Legs"] = "Ноги", ["Feet"] = "Ступни", ["Wrist"] = "Запястья", ["Hands"] = "Кисти рук", ["Finger 1"] = "Палец 1", ["Finger 2"] = "Палец 2", ["Trinket 1"] = "Аксессуар 1", ["Trinket 2"] = "Аксессуар 2", ["Back"] = "Спина", ["Main hand"] = "Правая рука", ["Off hand"] = "Левая рука", ["Ranged"] = "Дальний бой", ["Tabard"] = "Гербовая накидка", ["Wand"] = "Жезл", ["Finger"] = "Палец", ["Trinket"] = "Аксессуар", -- classes ["Warrior"] = "Воин", ["Paladin"] = "Паладин", ["Hunter"] = "Охотник", ["Rogue"] = "Разбойник", ["Priest"] = "Жрец", ["Shaman"] = "Шаман", ["Mage"] = "Маг", ["Warlock"] = "Чернокнижник", ["Druid"] = "Друид", ["Warriors"] = "Воины", ["Paladins"] = "Паладины", ["Hunters"] = "Охотники", ["Rogues"] = "Разбойники", ["Priests"] = "Жрецы", ["Shamans"] = "Шаманы", ["Mages"] = "Маги", ["Warlocks"] = "Чернокнижники", ["Druids"] = "Друиды", ["ranged"] = "дальний бой", ["melee"] = "ближний бой", ["Damage ({1})"] = "Урон ({1})", -- skills and kinds (the names the game uses in the skill list) ["Axes"] = "Топоры", ["Two-Handed Axes"] = "Двуручные топоры", ["Maces"] = "Дробящее оружие", ["Two-Handed Maces"] = "Двуручное дробящее оружие", ["Swords"] = "Мечи", ["Two-Handed Swords"] = "Двуручные мечи", ["Daggers"] = "Кинжалы", ["Fist Weapons"] = "Кистевое оружие", ["Fist Weapon"] = "Кистевое оружие", ["Polearms"] = "Древковое оружие", ["Staves"] = "Посохи", ["Bows"] = "Луки", ["Crossbows"] = "Арбалеты", ["Guns"] = "Огнестрельное оружие", ["Wands"] = "Жезлы", ["Thrown"] = "Метательное оружие", ["Cloth"] = "Ткань", ["Leather"] = "Кожа", ["Mail"] = "Кольчуга", ["Plate"] = "Латы", ["Plate Mail"] = "Латы", ["Shield"] = "Щит", ["Dual Wield"] = "Бой с двух рук", ["shields"] = "щиты", ["librams"] = "манускрипты", ["idols"] = "идолы", ["totems"] = "тотемы", ["Libram"] = "Манускрипт", ["Idol"] = "Идол", ["Totem"] = "Тотем", ["arrows"] = "стрелы", ["bullets"] = "пули", ["bow"] = "лук", ["crossbow"] = "арбалет", ["gun"] = "огнестрельное оружие", -- usability messages ["You haven't learned {1} yet, train it at a weapon master."] = "Вы ещё не выучили навык «{1}», обучитесь у мастера оружия.", ["{1} can't use {2}."] = "{1} не могут использовать: {2}.", ["This is not something you wear."] = "Это нельзя надеть.", ["This item is only for other classes."] = "Этот предмет только для других классов.", ["You need {1} ({2}) to wear this, you don't have that profession."] = "Чтобы это надеть, нужна профессия {1} ({2}), у вас её нет.", ["You need {1} {2} to wear this, you have {3}."] = "Чтобы это надеть, нужен навык {1} {2}, у вас {3}.", ["Equip a bow, crossbow or gun first, then you can use ammunition."] = "Сначала наденьте лук, арбалет или огнестрельное оружие, тогда можно использовать боеприпасы.", ["Your {1} fires {2}, this is {3}."] = "Ваше оружие ({1}) стреляет: {2}, а это: {3}.", ["{1} can't wear {2}."] = "{1} не могут носить: {2}.", ["{1} learn {2} at level {3}, you are level {4}."] = "{1} изучают навык «{2}» на уровне {3}, у вас уровень {4}.", ["{1} can't use shields."] = "{1} не могут использовать щиты.", ["{1} can't dual wield."] = "{1} не могут сражаться с двух рук.", ["{1} learn Dual Wield at level {2}, you are level {3}."] = "{1} изучают бой с двух рук на уровне {2}, у вас уровень {3}.", ["You haven't learned Dual Wield yet."] = "Вы ещё не выучили бой с двух рук.", ["You need level {1} to wear it, you are level {2}."] = "Нужен уровень {1}, чтобы это надеть, у вас уровень {2}.", ["You can use this item."] = "Вы можете использовать этот предмет.", ["replaces your two-hander"] = "заменяет ваше двуручное оружие", ["you need a one-hander in the main hand first"] = "сначала нужно одноручное оружие в правой руке", ["also takes off your off hand: {1}"] = "также снимает предмет из левой руки: {1}", ["can't be used with a two-hander in the main hand"] = "нельзя использовать с двуручным оружием в правой руке", -- Weights: notes under the stats ["Hit %: {1} of about {2}% cap"] = "Меткость %: {1} из примерно {2}% (предел)", ["Hit % counts only a little: your gear gives {1}%, the cap is about {2}%"] = "Меткость % почти не важна: ваша экипировка даёт {1}%, предел около {2}%", ["Spell hit %: {1} of about {2}% cap"] = "Меткость заклинаний %: {1} из примерно {2}% (предел)", ["Spell hit % counts only a little: your gear gives {1}%, the cap is about {2}%"] = "Меткость заклинаний % почти не важна: ваша экипировка даёт {1}%, предел около {2}%", ["Weapon skill {1} is already at the cap of {2}: more skill counts only a little"] = "Навык оружия «{1}» уже на пределе ({2}): больше почти не нужно", ["Defense {1} is past {2} (crit immune), more counts only as avoidance"] = "Защита {1} выше {2} (иммунитет к критам), дальше это только уклонение", ["Defense {1} (crit immune), nearly there"] = "Защита {1} (иммунитет к критам), почти достигнуто", ["Defense {1} (crit immune)"] = "Защита {1} (иммунитет к критам)", ["Raids: long fights, mana regen counts more"] = "Рейды: долгие бои, восстановление маны ценнее", ["Raids: level 63 bosses, skill counts more"] = "Рейды: боссы 63 уровня, навык ценнее", ["Agility: 1 crit% per {1} at your level"] = "Ловкость: 1% крита на каждые {1} на вашем уровне", ["1 crit% per {1} at your level"] = "1% крита на каждые {1} на вашем уровне", ["1 spell crit% per {1} at your level"] = "1% крита заклинаний на каждые {1} на вашем уровне", ["Intellect: 1 spell crit% per {1} at your level"] = "Интеллект: 1% крита заклинаний на каждые {1} на вашем уровне", -- class texts (what a talent does to a stat) ["1 point = 1 spell power, healing power or attack power"] = "1 очко = 1 сила заклинаний, лечение или сила атаки", ["1 point = 1 attack power"] = "1 очко = 1 сила атаки", ["1 point = 1 spell power"] = "1 очко = 1 сила заклинаний", ["1 point = 1 spell power or 1 attack power"] = "1 очко = 1 сила заклинаний или 1 сила атаки", ["total Intellect"] = "всего интеллекта", ["total Agility"] = "всего ловкости", ["total Strength"] = "всего силы", ["total Spirit"] = "всего духа", ["total Stamina"] = "всего выносливости", ["total health"] = "всего здоровья", ["Stamina in bear form"] = "выносливость в облике медведя", ["Strength in cat form"] = "сила в облике кошки", ["armor from items"] = "брони от предметов", ["attack power in forms"] = "силы атаки в облике", ["healing"] = "лечения", ["less mana for healing"] = "меньше маны на лечение", ["less mana for spells"] = "меньше маны на заклинания", ["regen while casting counts more"] = "восстановление при сотворении ценнее", ["regen while casting counts much more"] = "восстановление при сотворении намного ценнее", ["Spirit regen continues while casting"] = "восстановление от духа не прерывается при сотворении", ["crit damage of Starfire, Moonfire, Wrath"] = "урон крита Звёздного огня, Лунного огня, Гнева", ["ranged crit damage"] = "урон крита в дальнем бою", ["melee crit damage"] = "урон крита в ближнем бою", ["of Agility as melee attack power"] = "ловкости как сила атаки в ближнем бою", ["less mana for shots"] = "меньше маны на выстрелы", ["arcane crit damage"] = "урон крита тайной магии", ["frost crit damage"] = "урон крита магии льда", ["healing of Holy Light, Flash of Light, Holy Shock"] = "лечение Свето-вспышки, Вспышки Света, Шока небес", ["each block hits back with holy damage and threat"] = "каждый блок возвращает урон светом и угрозу", ["a block can give an extra attack"] = "блок может дать дополнительную атаку", ["blocks stop more damage"] = "блоки поглощают больше урона", ["damage absorbed by shield"] = "урона поглощается щитом", ["holy damage from your seals counts: spell power matters"] = "урон светом от ваших печатей учитывается: сила заклинаний важна", ["holy damage from your seals counts"] = "урон светом от ваших печатей учитывается", ["of Armor from items as healing"] = "брони от предметов как лечение", ["of total Spirit as spell power"] = "всего духа как сила заклинаний", ["crit damage of combo point abilities"] = "урон крита приёмов с приёмами серии", ["all stats"] = "всех характеристик", ["less mana for offensive spells"] = "меньше маны на атакующие заклинания", ["amount blocked"] = "блокируется больше урона", ["less mana for Destruction spells"] = "меньше маны на заклинания разрушения", ["Destruction crit damage"] = "урон крита разрушения", ["each block gives rage"] = "каждый блок даёт ярость", ["Shield Slam gives extra block chance"] = "Мощный удар щитом даёт шанс блока", ["Shield Slam damage uses block value"] = "урон Мощного удара щитом зависит от значения блока", ["crit damage"] = "урон крита", -- stat labels ["Ranged weapon dps"] = "УВС дальнего оружия", ["Weapon dps"] = "УВС оружия", ["Ammo dps"] = "УВС боеприпасов", ["Strength"] = "Сила", ["Agility"] = "Ловкость", ["Stamina"] = "Выносливость", ["Intellect"] = "Интеллект", ["Spirit"] = "Дух", ["Armor"] = "Броня", ["Attack power"] = "Сила атаки", ["Ranged attack power"] = "Сила атаки дальнего боя", ["Spell power (all)"] = "Сила заклинаний (все)", ["Healing power"] = "Сила лечения", ["Attack power (druid forms)"] = "Сила атаки (облики друида)", ["Mana regen while casting %"] = "Восстановление маны при сотворении %", ["Attack speed %"] = "Скорость атаки %", ["Casting speed %"] = "Скорость сотворения %", ["Armor penetration"] = "Пробивание брони", ["Damage returned as healing %"] = "Урон, возвращаемый как лечение %", ["Wand dps"] = "УВС жезла", ["Average hit"] = "Средний удар", ["Spell crit %"] = "Крит заклинаний %", ["Spell hit %"] = "Меткость заклинаний %", ["Crit %"] = "Крит %", ["Hit %"] = "Меткость %", ["Mana per 5 sec"] = "Мана за 5 сек", ["Health per 5 sec"] = "Здоровье за 5 сек", ["Dodge %"] = "Уклонение %", ["Parry %"] = "Парирование %", ["Block chance %"] = "Шанс блока %", ["Block value"] = "Значение блока", ["Damage to attackers"] = "Урон атакующим", ["Chance on hit damage"] = "Урон при ударе (шанс)", ["Defense"] = "Защита", ["Mana"] = "Мана", ["Health"] = "Здоровье", ["Fire resistance"] = "Сопротивление огню", ["Frost resistance"] = "Сопротивление магии льда", ["Nature resistance"] = "Сопротивление силам природы", ["Shadow resistance"] = "Сопротивление тёмной магии", ["Arcane resistance"] = "Сопротивление тайной магии", ["Fire spell power"] = "Сила заклинаний огня", ["Frost spell power"] = "Сила заклинаний льда", ["Nature spell power"] = "Сила заклинаний природы", ["Shadow spell power"] = "Сила заклинаний тьмы", ["Arcane spell power"] = "Сила заклинаний тайной магии", ["Holy spell power"] = "Сила заклинаний светлой магии", ["Axes skill"] = "Навык: топоры", ["Bows skill"] = "Навык: луки", ["Crossbows skill"] = "Навык: арбалеты", ["Daggers skill"] = "Навык: кинжалы", ["Fist weapons skill"] = "Навык: кистевое оружие", ["Guns skill"] = "Навык: огнестрельное оружие", ["Maces skill"] = "Навык: дробящее оружие", ["Polearms skill"] = "Навык: древковое оружие", ["Staves skill"] = "Навык: посохи", ["Swords skill"] = "Навык: мечи", -- Arrows window ["Upgrades in your bags"] = "Улучшения в ваших сумках", ["No upgrades in your bags (the bank is not checked)"] = "В ваших сумках нет улучшений (банк не проверяется)", ["You can wear now ({1}), best first"] = "Можно надеть сейчас ({1}), лучшие сверху", ["Better, but not usable yet ({1}): level, training or profession"] = "Лучше, но пока нельзя использовать ({1}): уровень, обучение или профессия", ["Mouse wheel scrolls: {1}-{2} of {3}"] = "Колесо мыши прокручивает: {1}-{2} из {3}", -- GearScore ["Same for every class. Other players: hover them close by. /adeg gs reset forgets scores."] = "Одинаково для всех классов. Другие игроки: наведите на них вблизи. /adeg gs reset забывает оценки.", ["Same scale for every class. Click: your items. Drag: move."] = "Одна шкала для всех классов. Клик: ваши предметы. Перетаскивание: сдвинуть.", ["GearScore: {1} ({2} items read)"] = "GearScore: {1} (прочитано предметов: {2})", ["{1} items read"] = "прочитано предметов: {1}", -- Minimap ["Left click: options"] = "Левый клик: настройки", ["Right click: switch role (now: {1})"] = "Правый клик: сменить роль (сейчас: {1})", ["Drag: move the button"] = "Перетаскивание: сдвинуть кнопку", ["role: {1}"] = "роль: {1}", -- chat messages ["v{1} loaded. /adeg shows the commands, the minimap button opens the options."] = "v{1} загружен. /adeg покажет команды, кнопка у миникарты открывает настройки.", ["language: {1}"] = "язык: {1}", ["usage: /adeg lang auto | en | ru"] = "использование: /adeg lang auto | en | ru", ["window positions reset, type /reload"] = "положения окон сброшены, введите /reload", ["window look: {1} (setting {2}, pfUI found: {3}). /adeg skin auto|pfui|vanilla, then /reload"] = "вид окон: {1} (настройка {2}, pfUI найден: {3}). /adeg skin auto|pfui|vanilla, затем /reload", ["look changed: /reload applies it everywhere"] = "вид изменён: /reload применит его везде", ["usage: /adeg role auto | heal | dmg | tank (now: {1})"] = "использование: /adeg role auto | heal | dmg | tank (сейчас: {1})", ["weapon values now count x{1}"] = "значения оружия теперь считаются с множителем x{1}", ["upgrade arrows: on"] = "стрелки улучшений: вкл", ["upgrade arrows: off"] = "стрелки улучшений: выкл", ["GearScore memory cleared ({1} players); hover them again to read their gear"] = "Память GearScore очищена (игроков: {1}); наведите на них снова, чтобы прочитать экипировку", ["GearScore on the character window: {1}"] = "GearScore в окне персонажа: {1}", ["GearScore on the player tooltip: {1}"] = "GearScore в подсказке игрока: {1}", ["minimap button: on"] = "кнопка у миникарты: вкл", ["minimap button: off (/adeg minimap brings it back)"] = "кнопка у миникарты: выкл (/adeg minimap вернёт её)", ["minimap button follows a {1} minimap"] = "кнопка следует за миникартой формы: {1}", ["no item yet: hover an item first"] = "предмета ещё нет: сначала наведите курсор на предмет", ["{1} commands (everything is also in the options window, minimap button)"] = "{1} команды (всё есть и в окне настроек, кнопка у миникарты)", ["auto"] = "авто", ["tank"] = "танк", ["heal"] = "целитель", ["dmg"] = "урон", ["on"] = "вкл", ["off"] = "выкл", ["top"] = "сверху", ["bottom"] = "снизу", ["round"] = "круглой", ["square"] = "квадратной", ["/adeg options - options window"] = "/adeg options - окно настроек", ["/adeg role auto|heal|dmg|tank - force the role; /adeg role why - which talents decide it"] = "/adeg role auto|heal|dmg|tank - задать роль; /adeg role why - какие таланты её определяют", ["/adeg weights - what one point of each stat is worth to you, and why"] = "/adeg weights - сколько стоит одно очко каждой характеристики для вас и почему", ["/adeg best - upgrades waiting in your bags"] = "/adeg best - улучшения, ждущие в ваших сумках", ["/adeg gs - your GearScore per item; /adeg gs reset - forget other players; /adeg gs on|off; /adeg gs top|bottom"] = "/adeg gs - ваш GearScore по предметам; /adeg gs reset - забыть других игроков; /adeg gs on|off; /adeg gs top|bottom", ["/adeg arrows - upgrade arrows on bag icons on/off"] = "/adeg arrows - стрелки улучшений на значках сумок вкл/выкл", ["/adeg minimap - minimap button on/off; /adeg minimap round|square - its shape"] = "/adeg minimap - кнопка у миникарты вкл/выкл; /adeg minimap round|square - её форма", ["/adeg weapon <0-2> - how much weapon dps counts compared to the calculation"] = "/adeg weapon <0-2> - насколько учитывается УВС оружия относительно расчёта", ["/adeg skin auto|pfui|vanilla - window look (auto: pfUI when it is loaded, else vanilla windows); then /reload"] = "/adeg skin auto|pfui|vanilla - вид окон (auto: pfUI, если загружен, иначе обычные окна); затем /reload", ["/adeg lang auto|en|ru - language of the addon (auto follows the game client)"] = "/adeg lang auto|en|ru - язык аддона (auto: как в клиенте игры)", ["/adeg reset - forget saved window positions"] = "/adeg reset - забыть сохранённые положения окон", ["Testing and bug reports:"] = "Проверка и отчёты об ошибках:", } ---------------------------------------------------------------------- -- Language ---------------------------------------------------------------------- local lang = nil function AG.Lang() if lang then return lang end local want = AdeGearDB and AdeGearDB.lang if want == "ru" or want == "en" then lang = want elseif type(GetLocale) == "function" and GetLocale() == "ruRU" then lang = "ru" else lang = "en" end return lang end local cache = {} local cacheSize = 0 -- exact texts and compiled templates local exact = {} local templates = {} local compiled = false local function Compile() compiled = true for key, ru in pairs(RU) do if string.find(key, "{%d}", 1) then -- English part to a Lua pattern: escape the magic characters, then {n} becomes a capture local pat = string.gsub(key, "[%^%$%(%)%%%.%[%]%*%+%-%?]", function(c) return "%" .. c end) local count = 0 pat = string.gsub(pat, "{%d}", function() count = count + 1; return "(.-)" end) -- the plain letters of the key decide the order: longer keys first, so "Defense {1} (crit immune)" -- is tried before shorter ones table.insert(templates, { pat = "^" .. pat .. "$", ru = ru, n = count, len = string.len(key) }) else exact[key] = ru end end table.sort(templates, function(a, b) return a.len > b.len end) end local function Translate(s, depth) local hit = exact[s] if hit then return hit end if depth > 3 then return s end for i = 1, table.getn(templates) do local t = templates[i] local from, _, c1, c2, c3, c4, c5 = string.find(s, t.pat) if from then local caps = { c1, c2, c3, c4, c5 } for j = 1, t.n do if caps[j] and not string.find(caps[j], "^[%d%.,%-%+%%]*$") then caps[j] = Translate(caps[j], depth + 1) end end return (string.gsub(t.ru, "{(%d)}", function(n) return caps[tonumber(n)] or "" end)) end end return s end -- the translation, or the text itself function AG.T(s) if type(s) ~= "string" or s == "" then return s end if AG.Lang() ~= "ru" then return s end local c = cache[s] if c then return c end if not compiled then Compile() end local r = Translate(s, 0) if cacheSize > 3000 then cache = {}; cacheSize = 0 end cache[s] = r cacheSize = cacheSize + 1 return r end function AG.ClearLangCache() cache = {} cacheSize = 0 end -- Talent names: AdeTalents knows the English names. The Russian client names its talents itself, and -- AdeTalents gives the tab, row and column of each talent, so the game's own name is found by position. function AG.TalentName(en) if AG.Lang() ~= "ru" or type(en) ~= "string" then return en end -- AdeTalents 1.2.3 and newer give the local name themselves if AdeTalents and type(AdeTalents.GetLocalName) == "function" then local ok, n = pcall(AdeTalents.GetLocalName, en) if ok and type(n) == "string" and n ~= "" then return n end return en end if not AG.talentNames then local names = {} local ok = pcall(function() local _, class = UnitClass("player") local data = AdeTalents and AdeTalents.Data and AdeTalents.Data[class] if not data or not data.talents then return end local pos = {} for name, t in pairs(data.talents) do pos[t.tab .. ":" .. t.tier .. ":" .. t.col] = name end for tab = 1, GetNumTalentTabs() do for i = 1, GetNumTalents(tab) do local ruName, _, tier, col = GetTalentInfo(tab, i) local enName = pos[tab .. ":" .. tier .. ":" .. col] if enName and ruName and ruName ~= "" then names[enName] = ruName end end end end) if ok and next(names) then AG.talentNames = names else return en end end return AG.talentNames[en] or en end -- the language setting changed (Options, /adeg lang): forget the cache, set every label again, refresh windows function AG.LangChanged() lang = nil AG.talentNames = nil AG.ClearLangCache() if AG.Relabel then AG.Relabel() end end ---------------------------------------------------------------------- -- Cut a text to n characters (not bytes), so Cyrillic letters are not torn in half. -- A UTF-8 letter starts with a byte that is not 128-191. ---------------------------------------------------------------------- function AG.Cut(s, n, tail) if type(s) ~= "string" then return s end local chars, i, len = 0, 1, string.len(s) local cutAt = nil while i <= len do chars = chars + 1 if chars == n + 1 then cutAt = i - 1 end local b = string.byte(s, i) if b >= 240 then i = i + 4 elseif b >= 224 then i = i + 3 elseif b >= 192 then i = i + 2 else i = i + 1 end end if chars <= n then return s end return string.sub(s, 1, cutAt) .. (tail or "") end