高级搜索现已翻译 gym逻辑调整 更新版本
This commit is contained in:
parent
57eea7b056
commit
cd4330fa4f
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Torn翻译
|
||||
// @namespace WOOH
|
||||
// @version 0.1.1111a
|
||||
// @version 0.1.1112a
|
||||
// @description UI翻译
|
||||
// @author Woohoo-[2687093] sabrina_devil[2696209]
|
||||
// @match https://www.torn.com/*
|
||||
@ -449,6 +449,7 @@
|
||||
};
|
||||
const headerDict = {
|
||||
"User's Name / ID": '用户名或ID',
|
||||
"Name": '用户名',
|
||||
'Faction': '帮派',
|
||||
'Company': '帮派',
|
||||
'Places': '地点',
|
||||
@ -459,18 +460,38 @@
|
||||
'Search users by...': '高级用户搜索',
|
||||
'Property': '住房',
|
||||
'Male': '男性',
|
||||
'Female': '女性',
|
||||
'to': '到',
|
||||
'Condition': '条件',
|
||||
'Married': '在已婚状态',
|
||||
'Travelling': '在飞行中',
|
||||
'In a faction': '在帮派中',
|
||||
'In a company': '在公司中',
|
||||
'In hospital': '在医院里',
|
||||
'In jail': '在监狱里',
|
||||
'In Federal jail': '在联邦监狱里',
|
||||
'Level': '等级',
|
||||
'Days old': '游戏天数',
|
||||
'Offences': '违法行为',
|
||||
'Last action': '上次动作',
|
||||
'Reset': '重置',
|
||||
'Search': '搜索',
|
||||
'0 - 15 min': '0 - 15 分钟',
|
||||
'15 min - 1 hour': '15 分钟 - 1 小时',
|
||||
'1 hour - 1 day': '1 小时 - 1 天',
|
||||
'1 day - 1 week': '1 天 - 1 周',
|
||||
'1 week - 1 month': '1 周 - 1 月',
|
||||
'1 month - 1 year': '1 月 - 1 年',
|
||||
'longer than 1 year ago': '久于 1 年前',
|
||||
'Not': '不',
|
||||
'View Log': '查看日志',
|
||||
'View Profile': '查看个人资料',
|
||||
'Settings': '设置',
|
||||
'Server:': '服务器 ',
|
||||
'Dark Mode': '',
|
||||
'News Ticker': '',
|
||||
'Logout': '',
|
||||
'Dark Mode': '黑夜模式',
|
||||
'News Ticker': '滚动通知',
|
||||
'Logout': '登出',
|
||||
'Gender': '性别',
|
||||
};
|
||||
const eventsDict = {
|
||||
// "ALL EVENTS": "所有通知",
|
||||
@ -573,7 +594,6 @@
|
||||
/**
|
||||
* header
|
||||
*/
|
||||
// $('div#header-root').each((i,e)=>{
|
||||
if ($('div#header-root').length > 0) {
|
||||
const headerOB = new MutationObserver(_ => {
|
||||
headerOB.disconnect();
|
||||
@ -609,8 +629,11 @@
|
||||
});
|
||||
// 高级搜索框的已选中
|
||||
$('ul.advancedSearchFormBody div.select-wrapper button.toggler.down').each((i, e) => {
|
||||
if (headerDict[$(e).text()])
|
||||
$(e).text(headerDict[$(e).text()]);
|
||||
// console.log($(e).text())
|
||||
if (headerDict[$(e).text().trim()])
|
||||
$(e).text(headerDict[$(e).text().trim()]);
|
||||
else if (propertyDict[$(e).text().trim()])
|
||||
$(e).text(propertyDict[$(e).text().trim()]);
|
||||
});
|
||||
// 高级搜索的下拉选项
|
||||
$('ul.advancedSearchFormBody li.item').each((i, e) => {
|
||||
@ -841,7 +864,7 @@
|
||||
function gymOBInit() {
|
||||
gymOB.disconnect();
|
||||
gymTrans();
|
||||
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true});
|
||||
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
|
||||
}
|
||||
|
||||
function gymTrans() {
|
||||
@ -940,7 +963,7 @@
|
||||
}
|
||||
|
||||
gymTrans();
|
||||
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true});
|
||||
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user