diff --git a/gym_list.txt b/gym_list.txt new file mode 100644 index 0000000..8ba73b0 --- /dev/null +++ b/gym_list.txt @@ -0,0 +1,35 @@ +Premier Fitness +Average Joes +Woody's Workout Club +Beach Bods +Silver Gym +Pour Femme +Davies Den +Global Gym + +Knuckle Heads +Pioneer Fitness +Anabolic Anomalies +Core +Racing Fitness +Complete Cardio +Legs, Bums and Tums +Deep Burn + +Apollo Gym +Gun Shop +Force Training +Cha Cha's +Atlas +Last Round +The Edge +George's + +Balboas Gym +Frontline Fitness +Gym 3000 +Mr. Isoyamas +Total Rebound +Elites +The Sports Science Lab +The Jail Gym diff --git a/torn-trans-zhcn.user.js b/torn-trans-zhcn.user.js index ed8fde7..3bc075f 100644 --- a/torn-trans-zhcn.user.js +++ b/torn-trans-zhcn.user.js @@ -244,6 +244,8 @@ 'London to Torn.': '正从英国伦敦(London)回城。', 'Torn to Zurich.': '正在飞往瑞士苏黎世(Zurich)。', 'Zurich to Torn.': '正从瑞士苏黎世(Zurich)回城。', + 'Torn to Buenos Aires.':'正在飞往阿根廷布宜诺斯艾利斯(Buenos Aires)。', + 'Buenos Aires to Torn.': '正从阿根廷布宜诺斯艾利斯(Buenos Aires)回城。', }; // 界面tips todo 全收集、翻译 const tipsDict = { @@ -251,7 +253,8 @@ 'The opportunities for employment in Torn are wide and varied, from jobs in the zoo and the meat warehouse through to fantastic openings at the strip club - a description rarely used to refer to those who work there.': "托恩的就业机会广泛而多样,从动物园和肉类仓库的工作,到脱衣舞俱乐部的奇妙开场--这是一个很少用来形容在那里工作的人的描述。", 'One of the main requirements for a wedding to take place in Torn is the procurement of a ring. You may either purchase one from the Jewellery Store, or you can choose the more romantic option of stealing one, which requires far more effort if you think about it.': "在托恩举行婚礼的主要要求之一就是购买一枚戒指。你可以从珠宝店购买,也可以选择在偷窃戒指中选择一种很浪漫的方式,但是你冷静下来想想的话,这也是需要付出更大代价的。", "Despite having no discernible court system Torn still employs several thousand people within its Judicial Services department. Nobody knows what the hell these people do all day, but if we had to guess, we'd say Solitaire.": "尽管没有明显的法院系统,托恩仍然在其司法服务部门雇用了几千人。没有人知道这些人整天都在做什么,但如果我们必须猜测,我们会说是接龙。", - "At one point a Dual Wield Melee course was available at Torn City College for a fee of $50,000,000, but this was discontinued when Torn's citizens realized they were effectively paying to learn how to hold two things at once.": "托恩城市学院一度开设了双持近战课程,收费50,000,000美元,但当托恩的市民意识到他们实际上是在花钱学习如何同时持有两样东西时,这个课程就停止了。" + "At one point a Dual Wield Melee course was available at Torn City College for a fee of $50,000,000, but this was discontinued when Torn's citizens realized they were effectively paying to learn how to hold two things at once.": "托恩城市学院一度开设了双持近战课程,收费50,000,000美元,但当托恩的市民意识到他们实际上是在花钱学习如何同时持有两样东西时,这个课程就停止了。", + }; const cityDict = { 'Map': '地图', @@ -266,37 +269,37 @@ 'City Hall': '市政厅', 'Hospital': '医院', 'Jail': '监狱', - 'Visitor Center': "游客中心", - "Staff": "员工", + 'Visitor Center': "WIKI", + "Staff": "Torn City 员工", "Committee": "委员会", "Community Center": "社区中心", - "Chronicle Archives": "纪事档案", + "Chronicle Archives": "纪事档案馆", "Bank": "银行", - "Stock Exchange": "证券交易所", - "Item Market": "物品市场", + "Stock Exchange": "股票交易所", + "Item Market": "交易市场", "Sweet Shop": "糖果店", "Msg Inc": "广告公司", "Donator House": "捐赠者中心", - "Big Al's Gun Shop": "Big Al的枪械店", - "Cyber Force": "Cyber Force网络商店", + "Big Al's Gun Shop": "Big Al的枪店", + "Cyber Force": "赛博军团", "Church": "教堂", "Education": "教育", "Travel Agency": "旅行社", "Auction House": "拍卖行", - "Points Building": "积分(PT)建设中心", - "Points Market": "积分(PT)市场", - "Docks": "码头", + "Points Building": "PT 商店", + "Points Market": "PT 市场", + "Docks": "码头车行", "Estate Agents": "地产中介", "Jewelry Store": "珠宝店", - "Pawn Shop": "当铺", + "Pawn Shop": "PT 当铺", "Post Office": "邮局", - "Super Store": "超级商店", + "Super Store": "电器商店", "TC Clothing": "TC服装店", - "Token Shop": "代币商店", - "Casino": "赌博", + "Token Shop": "Token 商店", + "Casino": "赌场", "Dump": "垃圾场", "Missions": "任务", - "Loan Shark": "高利贷", + "Loan Shark": "鲨客借贷", "Race Track": "赛车场", "City Center": "城市中心", "East Side": "东部地区", @@ -308,7 +311,18 @@ 'Area': '地区', "Type": "类型", "Name": "名称", - "Popularity": "人口数量" + "Popularity": "人数", + 'FINANCIAL':'金融', + 'LEISURE':'休闲', + 'Leisure':'休闲', + 'MISC':'杂项', + 'Miscellaneous':'杂项', + 'REAL ESTATE':'房地产', + 'Real Estate':'房地产', + 'SHOPPING':'购物', + 'Nikeh Sports':'', + "Bits 'n' Bobs":'胖鲍勃的杂货店', + // '':'', }; const gymDict = { 'Strength': '力量 STR', @@ -340,7 +354,10 @@ "Damage on impact": "攻击造成的伤害", 'Ability to evade an attack': '躲避攻击的能力', 'Chance of hitting': '躲避攻击的能力', - '{$} energy per train': '每次锻炼花费{$}能量', + // '{$} energy per train': '每次锻炼花费{$}能量', + 'energy per train': '能量/次锻炼', + // 'energy per train': '每次锻炼花费5能量', + // 'energy per train': '每次锻炼花费50能量', 'Class:': '健身房类别:', "Membership cost:": "会员价格: ", "Energy usage:": "能量消耗: ", @@ -355,7 +372,10 @@ 'Unavailable': '不可用', "Middleweight": "中量级", "Lightweight": "轻量级", - 'per train': '能量/次' + 'per train': '能量/次', + '5 per train': '5能量/次', + '10 per train': '10能量/次', + '50 per train': '50能量/次', }; const eduDict = { @@ -384,46 +404,43 @@ 'course?': '课程吗?', 'The current progress will be canceled and you\'ll have to start all over again.': '目前的进度将被取消,你将需要重新开始。', }; + const gymList={ + 'Premier Fitness':'首席健身中心', + 'Average Joes':'普通的乔伊', + "Woody's Workout Club":'伍迪的健身俱乐部', + 'Beach Bods':'沙滩之恋', + 'Silver Gym':'银色健身房', + 'Pour Femme':'女士专用', + 'Davies Den':'戴维斯之家', + 'Global Gym':'全球健身房', + 'Knuckle Heads':'手指头', + 'Pioneer Fitness':'先锋健身', + 'Anabolic Anomalies':'合成代谢异常', + 'Core':'主干力量', + 'Racing Fitness':'竞速健身', + 'Complete Cardio':'完全有氧', + 'Legs, Bums and Tums':'腿部、臀部和牙龈', + 'Deep Burn':'深度烧伤', - /** - * 飞行页面 - */ - if (window.location.href.indexOf('index.php') >= 0 && - $('div.travelling h4').length !== 0) { - const travelOB = new MutationObserver(travelOBInit); + 'Apollo Gym':'阿波罗健身房', + 'Gun Shop':'枪店健身', + 'Force Training':'暴力训练', + "Cha Cha's":'茶茶的健身房', + 'Atlas':'阿特拉斯健身房', + 'Last Round':'最后一轮', + 'The Edge':'临界点', + "George's":'乔治健身房', - function travelOBInit() { - travelOB.disconnect(); - travelTrans(); - travelOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); - } - - function travelTrans() { - titleTrans(); - contentTitleLinksTrans(); - - // 气泡 - if (tipsDict[$('div.inner-popup').text().trim()]) - $('div.inner-popup').text(tipsDict[$('div.inner-popup').text().trim()]); - // Remaining Flight Time - - $('div.destination-title span').contents().each((i, e) => { - if (e.childNodes.length !== 0) return; - if (!e.nodeValue) return; - if (travelingDict[e.nodeValue.trim()]) - e.nodeValue = travelingDict[e.nodeValue.trim()]; - }); - // torntools扩展插件落地时间 - if ($('div.tt-landing-time span.description').text().split(' ')[0] === 'Landing') { - const landingTime = $('div.tt-landing-time span.description').text().slice(11, 19); - $('div.tt-landing-time span.description').text('于 ' + landingTime + ' 降落'); - } - } - - travelTrans(); - travelOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); - return; - } + 'Balboas Gym':'巴尔博斯健身房', + 'Frontline Fitness':'前线健身', + 'Gym 3000':'健身房3000', + 'Mr. Isoyamas':'伊索亚玛斯先生', + 'Total Rebound':'全面反弹', + 'Elites':'精英健身', + 'The Sports Science Lab':'运动科学实验室', + 'The Jail Gym':'监狱健身房', + }; /** * 边栏 @@ -503,7 +520,56 @@ } }).observe(tooltip, {attributes: true, childList: true, subtree: true}); } - }, 500); + }, 1000); + + /** + * header + */ + if($('div#header-root').length>0){} + + /** + * chatbox + */ + if($('div#chatRoot').length>0){} + + /** + * 飞行页面 + */ + if (window.location.href.indexOf('index.php') >= 0 && + $('div.travelling h4').length !== 0) { + const travelOB = new MutationObserver(travelOBInit); + + function travelOBInit() { + travelOB.disconnect(); + travelTrans(); + travelOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); + } + + function travelTrans() { + titleTrans(); + contentTitleLinksTrans(); + + // 气泡 + if (tipsDict[$('div.inner-popup').text().trim()]) + $('div.inner-popup').text(tipsDict[$('div.inner-popup').text().trim()]); + // Remaining Flight Time - + $('div.destination-title span').contents().each((i, e) => { + if (e.childNodes.length !== 0) return; + if (!e.nodeValue) return; + if (travelingDict[e.nodeValue.trim()]) + e.nodeValue = travelingDict[e.nodeValue.trim()]; + }); + // torntools扩展插件落地时间 + if ($('div.tt-landing-time span.description').text().split(' ')[0] === 'Landing') { + const landingTime = $('div.tt-landing-time span.description').text().slice(11, 19); + $('div.tt-landing-time span.description').text('于 ' + landingTime + ' 降落'); + } + } + + travelTrans(); + travelOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true}); + return; + } /** * 主页 todo @@ -580,7 +646,6 @@ if (cityDict[$('div.title-black').text()]) $('div.title-black').text(cityDict[$('div.title-black').text()]); - // 标志建筑 6个分类 $('ul.map-symbols span').each((i, e) => { if (cityDict[$(e).text()]) @@ -604,8 +669,20 @@ // 快速链接中的区域 $('li a[class^="font-num-"] span').each((i, e) => { - if (cityDict[$(e).text()]) + // console.log($(e).prev().attr('class')==='cql-gym') + if (cityDict[$(e).text()]) { $(e).text(cityDict[$(e).text()]); + } + else if($(e).prev().attr('class')==='cql-your-property') { + if (propertyDict[$(e).text().trim().slice(5)]) { + $(e).text('你的' + propertyDict[$(e).text().trim().slice(5)]); + } + } + else if($(e).prev().attr('class')==='cql-gym') { + if (gymList[$(e).text()]) { + $(e).text(gymList[$(e).text()]); + } + } }); // 快速链接中的分类选择 @@ -627,7 +704,7 @@ } /** - * 健身房页面 + * gym健身房页面 */ if (window.location.href.indexOf('gym.php') >= 0) { const gymOB = new MutationObserver(gymOBInit); @@ -660,15 +737,13 @@ }); // 每次锻炼的花销 $('div[class^="description"] p:nth-child(2)').each((i, e) => { - if ($(e).text().split(' ').length === 1) { + if (e.childNodes.length === 1) { if (gymDict[$(e).text().trim()]) $(e).text(gymDict[$(e).text().trim()]); - return; - } - const energyPerTrain = $(e).text().split(' ')[0]; - if (gymDict[$(e).text().replace(energyPerTrain, `{$}`)]) { - e.firstChild.nodeValue = gymDict[$(e).text().replace(energyPerTrain, `{$}`)].replace(`{$}`, energyPerTrain); - e.lastChild.nodeValue = ''; + }else if (e.childNodes.length === 2){ + if(gymDict[e.lastChild.nodeValue.trim()]) { + e.lastChild.nodeValue = gymDict[e.lastChild.nodeValue.trim()]; + } } }); // 锻炼页面所有按钮