diff --git a/torn-trans-zhcn.user.js b/torn-trans-zhcn.user.js index 4cb8c3b..2885af1 100644 --- a/torn-trans-zhcn.user.js +++ b/torn-trans-zhcn.user.js @@ -1,7 +1,8 @@ // ==UserScript== +// @lastmodified 202112022039 // @name Torn翻译 // @namespace WOOH -// @version 0.1.1201a +// @version 0.1.1202a // @description Torn UI翻译 // @author Woohoo-[2687093] sabrina_devil[2696209] // @match https://www.torn.com/* @@ -405,7 +406,7 @@ "Sweet Shop": "糖果店", "Msg Inc": "广告公司", "Donator House": "捐赠者中心", - "Big Al's Gun Shop": "Big Al的枪店", + "Big Al's Gun Shop": "大艾尔枪械", "Cyber Force": "赛博军团", "Church": "教堂", "Education": "教育", @@ -419,7 +420,7 @@ "Pawn Shop": "PT 当铺", "Post Office": "邮局", "Super Store": "电器商店", - "TC Clothing": "TC服装店", + "TC Clothing": "TC 服装店", "Token Shop": "Token 商店", "Casino": "赌场", "Dump": "垃圾场", @@ -445,7 +446,8 @@ 'REAL ESTATE': '房地产', 'Real Estate': '房地产', 'SHOPPING': '购物', - 'Nikeh Sports': '', + 'Shopping': '购物', + 'Nikeh Sports': '耐克哈运动专卖', "Bits 'n' Bobs": '胖鲍勃的杂货店', // '':'', }; @@ -928,7 +930,7 @@ 'Education Length': '教育时长', 'Awareness': '感知能力', 'Bank Interest': '银行利润', - 'Masterful Looting': '大师掠夺', + 'Masterful Looting': '掠夺大师', 'Stealth': '隐身', 'Hospitalizing': '送医时长', 'Addiction Mitigation': '毒瘾缓解', @@ -937,17 +939,17 @@ 'Protection': '保护', 'Sharpness': '敏锐', 'Evasion': '回避', - 'Heavy Artillery Mastery': '重炮精通 (Heavy Artillery)', - 'Machine Gun Mastery': '机枪精通 (Machine Gun)', + 'Heavy Artillery Mastery': '重炮精通', + 'Machine Gun Mastery': '机枪精通', 'Rifle Mastery': '步枪精通', 'SMG Mastery': '冲锋枪精通', 'Shotgun Mastery': '霰弹枪精通', 'Pistol Mastery': '手枪精通', - 'Club Mastery': '冲击武器精通 (Clubbing)', - 'Piercing Mastery': '穿刺武器精通', - 'Slashing Mastery': '切割武器精通', + 'Club Mastery': '冲击武器精通(Clubbing)', + 'Piercing Mastery': '穿刺武器精通(Piercing)', + 'Slashing Mastery': '切割武器精通(Slashing)', 'Mechanical Mastery': '机械武器精通', - 'Temporary Mastery': '临时武器精通', + 'Temporary Mastery': '投掷物精通', 'Increases maximum nerve bar by 1 point': '增加 1 点犯罪N上限', 'Increases critical hit rate by 0.5%': '提高 0.5% 暴击率', 'Increases maximum life by 5%': '提高 5% 血量上限', @@ -974,7 +976,7 @@ 'Increases proficiency with piercing weapons': '提高穿刺武器精通', 'Increases proficiency with slashing weapons': '提高切割武器精通', 'Increases proficiency with mechanical devices': '提高切割武器精通', - 'Increases proficiency with temporary weapons': '提高临时武器精通', + 'Increases proficiency with temporary weapons': '提高投掷物精通', 'Increases damage and accuracy of heavy artillery weapons': '提高重炮伤害与命中', 'Increases damage and accuracy of machine gun weapons': '提高机枪伤害与命中', 'Increases damage and accuracy of rifle weapons': '提高步枪伤害与命中', @@ -1322,33 +1324,65 @@ 'low:': '最低:', }; const itemPageDict = { - 'Primary': '', - 'Secondary': '', - 'Melee': '', - 'Temporary': '', - 'Defensive': '', - 'Clothing': '', - 'Jewelry': '', - 'Your items -': '', - 'All': '', - 'Medical': '', - 'Drugs': '', - 'Energy Drink': '', - 'Alcohol': '', - 'Candy': '', - 'Boosters': '', + 'Primary': '主手', + 'Secondary': '副手', + 'Melee': '近战', + 'Temporary': '投掷', + 'Defensive': '防御', + 'Armor': '防御', + 'Clothing': '衣物', + 'Jewelry': '珠宝', + 'Your items -': '你的物品 - ', + 'All': '全部', + 'Medical': '医疗', + 'Drugs': '药物', + 'Energy Drink': '能量饮料', + 'Alcohol': '酒类', + 'Candy': '糖果', + 'Boosters': '增益道具', 'Enhancer': '增幅器', - 'Supply Packs': '', - 'Electronics': '', - 'Flowers': '', - 'Plushies': '', - 'Cars': '', - 'Viruses': '', - 'Miscellaneous': '', - 'Artifacts': '', - 'Books': '', - 'Special': '', - 'Collectibles': '', + 'Supply Packs': '补给包', + 'Electronics': '电器', + 'Flowers': '花', + 'Plushies': '玩偶', + 'Cars': '车辆', + 'Viruses': '病毒', + 'Miscellaneous': '杂项', + 'Artifacts': '文物', + 'Books': '书', + 'Special': '特殊', + 'Collectibles': '可收集物', + 'Donate': '捐献', + 'Drink': '喝下', + 'Eat': '吃下', + 'Enlist': '车辆注册', + 'Equip': '装备', + 'Listen': '', + 'Open': '打开', + 'Propose': '求婚', + 'Return': '退还', + 'Sell': '卖出', + 'Send': '发送', + 'Take': '使用', + 'Trash': '丢弃', + 'Turn on': '开启', + 'Unequip': '脱下', + 'Use': '使用', + 'Donate this Item': '捐献该物品', + 'Equip this Item': '装备该物品', + 'Sell this Item': '卖出该物品', + 'Send this Item': '发送该物品', + 'Trash this Item': '丢弃该物品', + 'Unequip this Item': '脱下该物品', + 'Return to Faction': '退还帮派', + 'Buy:': '买价:', + 'Sell:': '卖价:', + 'Value:': '价值:', + 'Accuracy:': '命中:', + 'Damage:': '伤害:', + 'Circ:': '流通:', + 'Quality:': '品质:', + 'Stealth:': '隐匿:', }; const itemNameDict = { "Ammunition Pack": '弹药包', @@ -2197,9 +2231,39 @@ 'Effect: Increases happiness by 75 and booster cooldown by 30 minutes.': '', // 能饮 'Effect: Increases energy by 10 and booster cooldown by 2 hours.': '', + // 手雷 + "Effect: Opponent becomes Maced, decreasing Dexterity to 1/5th for 15-20 seconds.": + '效果:对手被梅斯毒气影响,闪避降低至1/5,持续15-20s。', + "Effect: Opponent becomes Blinded, decreasing Speed to 1/5th for 15-20 seconds.": + '效果:对手被致盲,速度降低至1/5,持续15-20s。', + "Effect: Opponent becomes Gassed, decreasing Dexterity to 1/3rd for 120-180 seconds.": + '效果:对手变得疲惫,闪避降低至1/3,持续120-180s。', + "Effect: Opponent receives Severe Burning damage over 3 turns.": + '效果:对手在3个回合内受到严重的燃烧伤害。', + "Effect: Opponent becomes Smoked, decreasing Speed to 1/3rd for 120-180 seconds.": + '效果:对手被烟雾影响,速度降低至1/3持续120-180s。', + "Effect: User becomes Hastened, increasing Speed by 500% for 120 seconds.": + '效果:使用者急促起来,速度提高500%持续120s。', + "Effect: User becomes Sharpened, increasing Dexterity by 500% for 120 seconds.": + '效果:使用者变得更加敏锐,闪避增加500%,持续120s。', + "Effect: User becomes Strengthened, increasing Strength by 500% for 120 seconds.": + '效果:使用者变得更强壮,力量增加500%,持续120秒。', + "Effect: User becomes Hardened, increasing Defense by 300% for 120 seconds and replenishing life by 25%.": + '效果:使用者变得坚硬,在120秒内增加300%的防御,并补充25%的生命。', + "Effect: Opponent becomes Concussed, decreasing Dexterity to 1/5th for 15-20 seconds.": + '效果:对手脑部震荡,闪避下降到1/5,持续15-20秒。', }; const itemTypeDict = { - 'is a Machine Gun Weapon.': '', + 'is a Machine Gun Weapon.': '是一种机枪。', + 'is a SMG Weapon.': '是一种冲锋枪。', + 'is a Shotgun Weapon.': '是一种霰弹枪。', + 'is a Rifle Weapon.': '是一种步枪。', + 'is a Heavy Artillery Weapon.': '是一种重炮。', + 'is a Pistol Weapon.': '是一种手枪。', + 'is a Piercing Weapon.': '是一种穿刺武器(piercing)。', + 'is a Clubbing Weapon.': '是一种冲击武器(Clubbing)。', + 'is a Slashing Weapon.': '是一种切割武器(slashing)。', + 'is a Mechanical Weapon.': '是一种机械武器。', 'is a Temporary Weapon.': '是一种投掷武器。', 'is a Clothing Item.': '是一种服装物品。', 'is a Medical Item.': '是一种医疗物品。', @@ -2870,7 +2934,7 @@ /** * 搜索玩家的4个分类按钮 */ - function playerSearchBoxTrans() { + const playerSearchBoxTrans = function playerSearchBoxTrans() { const psbtOB = new MutationObserver(_ => { if ($('div.ac-wrapper').length === 0) return; psbtOB.disconnect(); @@ -2882,7 +2946,6 @@ }); psbtOB.observe(document, {childList: false, subtree: true, attributes: true}); } - playerSearchBoxTrans(); /** @@ -3089,8 +3152,10 @@ $(e).text('你的' + propertyDict[$(e).text().trim().slice(5)]); } } else if ($(e).prev().attr('class') === 'cql-gym') { - if (gymList[$(e).text()]) { + if (gymList[$(e).text().trim()]) { $(e).text(gymList[$(e).text()]); + } else if (gymList[$(e).text().trim().split(' ').slice(0, 2).join(' ')]) { + $(e).text(gymList[$(e).text().trim().split(' ').slice(0, 2).join(' ')]); } } }); @@ -3249,7 +3314,7 @@ }); }); const trans = () => { - if ($('.wh-translate').length === 0) { + if ($('.wh-translate').length === 0 && $('div#tab-menu.captcha').length === 0) { $('div.content-title').before( `