Chinese translation

This commit is contained in:
mingjun97 2022-05-10 00:48:06 -07:00
parent 87302028ef
commit 5d13a872a4
12 changed files with 107 additions and 104 deletions

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="styles/console.css" />
<script src="scripts/onload.js"></script>
<script src="scripts/console.js"></script>
@ -10,14 +11,14 @@
<div id="main">
<div id="titleBar">
Mojo Console <img src="" id="logo" />
<div id="status" class="ready"><span id="statusText">Ready</span><span class="dot"></span></div>
<div id="status" class="ready"><span id="statusText">正常</span><span class="dot"></span></div>
</div>
<div id="right">
<div id="sidebar">
<div class="sidebarItem" data-value="cheat">Cheating</div>
<div class="sidebarItem" data-value="players">Players</div>
<div class="sidebarItem" data-value="server">Server</div>
<div class="sidebarItem" data-value="settings">Settings</div>
<div class="sidebarItem" data-value="cheat">指令</div>
<div class="sidebarItem" data-value="players">玩家</div>
<div class="sidebarItem" data-value="server">服务器</div>
<div class="sidebarItem" data-value="settings">设置</div>
</div>
<iframe id="content" src="pages/cheat.html"></iframe>
</div>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../styles/cheat.css" />
<link rel="stylesheet" href="../styles/picnic.css">
<script type="text/javascript" src="../scripts/cheat.js"></script>
@ -20,17 +21,17 @@
<div class="container">
<div class="toolset">
<input id='tab-1' type='radio' name='tabgroupB' checked />
<label class="pseudo button toggle" for="tab-1">Quick Command</label>
<label class="pseudo button toggle" for="tab-1">常用指令</label>
<input id='tab-2' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-2">Avatar</label>
<label class="pseudo button toggle" for="tab-2">角色</label>
<input id='tab-3' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-3">Weapon</label>
<label class="pseudo button toggle" for="tab-3">武器</label>
<input id='tab-4' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-4">Reliquary</label>
<label class="pseudo button toggle" for="tab-4">圣遗物</label>
<input id='tab-5' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-5">Item</label>
<label class="pseudo button toggle" for="tab-5">道具</label>
<input id='tab-6' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-6">Monster</label>
<label class="pseudo button toggle" for="tab-6">怪物</label>
</div>
<div id="panel">

View File

@ -2,24 +2,24 @@
function genAvatar() {
var panel = document.getElementById("panel");
panel.innerHTML = `<div class="form">
<h2>Send Character to you</h2>
<label for="character-id">Character Name:</label>
<h2>向自己发送角色</h2>
<label for="character-id">角色名称:</label>
<div style="display: flex;">
<select id="character-filter" style="flex: 2">
<option value="0"> Filter:All </option>
<option value="Electric"> Filter:Electric </option>
<option value="Ice"> Filter:Ice </option>
<option value="Wind"> Filter:Wind </option>
<option value="Water"> Filter:Water </option>
<option value="Fire"> Filter:Fire </option>
<option value="Rock"> Filter:Rock </option>
<option value="Grass"> Filter:Grass </option>
<option value="0"> 筛选全部 </option>
<option value="Electric"> 筛选雷元素 </option>
<option value="Ice"> 筛选冰元素 </option>
<option value="Wind"> 筛选风元素 </option>
<option value="Water"> 筛选水元素 </option>
<option value="Fire"> 筛选火元素 </option>
<option value="Rock"> 筛选岩元素 </option>
<option value="Grass"> 筛选草元素 </option>
</select>
<select id="character-id" style="flex: 4; margin-left: 0.5em"> </select>
</div>
<label for="level">Level:</label><input type="number" id="level" name="level" value=1 />
<label for="amount">Constellation(Will be sent as Stella Fortuna):</label><input type="number" id="amount" name="amount" value=0 />
<button id="execute">Send</button>
<label for="level">等级:</label><input type="number" id="level" name="level" value=1 />
<label for="amount">命座以命星的形式发送:</label><input type="number" id="amount" name="amount" value=0 />
<button id="execute">发送</button>
</div>`;
updateCharacterList();

File diff suppressed because one or more lines are too long

View File

@ -3,24 +3,24 @@ var delayedSearch = null;
function genItem() {
var panel = document.getElementById("panel");
panel.innerHTML = `<div class="form">
<h2>Send Items to you</h2>
<label for="method">Give method:</label>
<h2>发送道具</h2>
<label for="method">发送方式:</label>
<select id="method">
<option value="give"/> Give </option>
<option value="drop"/> Drop </option>
<option value="give"/> 直接给予 </option>
<option value="drop"/> 周围掉落 </option>
</select>
<label for="item-search">Item Name:</label>
<label for="item-search">道具名称:</label>
<div style="display: flex; flex-direction: column;">
<div style="display: flex; align-items: center; overflow: hidden;">
<input id="item-search" style="flex: 4" type="text" placeholder="Search Item Name" />
<button id="clear" style="margin-left: 0.25em; transition: all ease-in-out 0.5s; flex: 0; opacity: 0;">Clear</button>
<input id="item-search" style="flex: 4" type="text" placeholder="搜索道具名称" />
<button id="clear" style="margin-left: 0.25em; transition: all ease-in-out 0.5s; flex: 0; opacity: 0;">清除</button>
</div>
<div id="name-list" style="overflow-y: auto; overflow-x: hidden; max-height: 20em;height: 100%; transition: all ease-in-out 0.5s;">
<div id="name-list" style="overflow-y: auto; overflow-x: hidden; max-height: 10em;height: 100%; transition: all ease-in-out 0.5s;">
</div>
</div>
<label for="amount">Amount:</label><input type="number" id="amount" name="amount" value=100 />
<label for="amount">数量:</label><input type="number" id="amount" name="amount" value=100 />
<input type="hidden" id="item-id" />
<button disabled id="execute">Send</button>
<button disabled id="execute">发送</button>
</div>`;
updateItemList();
@ -36,7 +36,7 @@ function genItem() {
clearTimeout(delayedSearch);
}
delayedSearch = setTimeout(() => updateItemList(), 500);
document.getElementById("name-list").style.height = "20em";
document.getElementById("name-list").style.height = "10em";
};
document.getElementById("clear").onclick = ()=>{
document.getElementById("item-search").value = "";
@ -88,7 +88,7 @@ function updateItemList() {
var filter = document.getElementById("item-search").value;
var list = document.getElementById("name-list");
list.innerHTML = "";
list.style.height = "20em";
list.style.height = "10em";
item_data.forEach(element => {
if (filter == "" || element.name.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
var o = document.createElement("label");

File diff suppressed because one or more lines are too long

View File

@ -3,20 +3,20 @@ var delayedSearch = null;
function genMonster() {
var panel = document.getElementById("panel");
panel.innerHTML = `<div class="form">
<h2>Spwan Monsters/Entities near you</h2>
<label for="entity-search">Entity Name:</label>
<h2>在周围生成怪物</h2>
<label for="entity-search">怪物名称:</label>
<div style="display: flex; flex-direction: column;">
<div style="display: flex; align-items: center; overflow: hidden;">
<input id="entity-search" style="flex: 4" type="text" placeholder="Search Entity Name" />
<button id="clear" style="margin-left: 0.25em; transition: all ease-in-out 0.5s; flex: 0; opacity: 0;">Clear</button>
<input id="entity-search" style="flex: 4" type="text" placeholder="搜索怪物名称" />
<button id="clear" style="margin-left: 0.25em; transition: all ease-in-out 0.5s; flex: 0; opacity: 0;">清除</button>
</div>
<div id="name-list" style="overflow-y: auto; overflow-x: hidden; max-height: 20em;height: 100%; transition: all ease-in-out 0.5s;">
<div id="name-list" style="overflow-y: auto; overflow-x: hidden; max-height: 10em;height: 100%; transition: all ease-in-out 0.5s;">
</div>
</div>
<label for="amount">Amount:</label><input type="number" id="amount" name="amount" value=1 />
<label for="amount">Level(Monster Only):</label><input type="number" id="level" name="level" value=50 />
<label for="amount">数量:</label><input type="number" id="amount" name="amount" value=1 />
<label for="amount">等级(仅怪物适用):</label><input type="number" id="level" name="level" value=50 />
<input type="hidden" id="entity-id" />
<button disabled id="execute">Send</button>
<button disabled id="execute">生成</button>
</div>`;
updateEntityList();
@ -32,7 +32,7 @@ function genMonster() {
clearTimeout(delayedSearch);
}
delayedSearch = setTimeout(() => updateEntityList(), 500);
document.getElementById("name-list").style.height = "20em";
document.getElementById("name-list").style.height = "10em";
};
document.getElementById("clear").onclick = ()=>{
document.getElementById("entity-search").value = "";
@ -84,7 +84,7 @@ function updateEntityList() {
var filter = document.getElementById("entity-search").value;
var list = document.getElementById("name-list");
list.innerHTML = "";
list.style.height = "20em";
list.style.height = "10em";
monster_data.forEach(element => {
if (filter == "" || element.name.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
var o = document.createElement("label");

View File

@ -1,32 +1,32 @@
qucick_command = [
{name: "Heal All Characters", command: "heal", args: []},
{name: "Get current position", command: "position", args: []},
{name: "Give Mora", command: "give 202", args: [
{name: "治疗全部角色", command: "heal", args: []},
{name: "获取当前位置", command: "position", args: []},
{name: "给予摩拉", command: "give 202", args: [
{type: "number", default: 100000, width: 145}
]},
{name: "Give Proigem", command: "give 201", args: [
{name: "给予原石", command: "give 201", args: [
{type: "number", default: 10000, width: 120}
]},
{name: "Give Intertwined Fate", command: "give 223", args: [
{name: "给予纠缠之缘", command: "give 223", args: [
{type: "number", default: 10000, width: 100}
]},
{name: "Give Acquaint Fate", command: "give 224", args: [
{name: "给予相遇之缘", command: "give 224", args: [
{type: "number", default: 10000, width: 100}
]},
{name: "Toggle Godmode", command: "godmode", args: []},
{name: "Set world level(relog required)", command: "setworldlevel", args: [
{name: "开启/关闭无敌模式", command: "godmode", args: []},
{name: "设置世界等级(需要重新登陆)", command: "setworldlevel", args: [
{type: "number", default: 8, width: 60}
]},
{name: "Give all items", command: "giveall", args: []},
{name: "Clear all items", command: "clear all", args: []},
{name: "Set talent E", command: "talent e", args: [
{name: "获取全部道具", command: "giveall", args: []},
{name: "清除全部道具", command: "clear all", args: []},
{name: "设置当前角色E技能等级", command: "talent e", args: [
{type: "number", default: 10, width: 60}
]},
{name: "Set talent Q", command: "talent q", args: [
{name: "设置当前角色Q技能等级", command: "talent q", args: [
{type: "number", default: 10, width: 60}
]},
{name: "Set talent N", command: "talent n", args: [
{name: "设置当前角色普攻等级", command: "talent n", args: [
{type: "number", default: 10, width: 60}
]},
]

View File

@ -3,19 +3,19 @@ var filterMethod = "set";
function genReli() {
var panel = document.getElementById("panel");
panel.innerHTML = `<div class="form">
<h2>Send Reli to you</h2>
<label>Reliquary Name:</label>
<div> Search by:
<input id="by-set" type="radio" name="filter_type" checked /> <label for="by-set" class="checkable">Set</label>
<input id="by-name" type="radio" name="filter_type" /> <label for="by-name" class="checkable">Name</label>
<button id="clear-reli-search" class="hidden by-name">Clear</button>
<h2>发送圣遗物</h2>
<label>圣遗物名称</label>
<div> 检索方式
<input id="by-set" type="radio" name="filter_type" checked /> <label for="by-set" class="checkable">按套装</label>
<input id="by-name" type="radio" name="filter_type" /> <label for="by-name" class="checkable">按名称</label>
<button id="clear-reli-search" class="hidden by-name">清除</button>
</div>
<div style="display: flex;" id="search-box" class="search-box">
<div style="flex: 2;">
<select id="reli-set" class="by-set">
<option value="0">Set: All</option>
<option value="0">套装全部</option>
</select>
<input id="reli-search" style="margin-top: 0.25em" type="text" class="hidden by-name" placeholder="Search Reliquary Name" />
<input id="reli-search" style="margin-top: 0.25em" type="text" class="hidden by-name" placeholder="搜索圣遗物名称" />
</div>
<div style="flex: 1; margin-left: 0.5em" class="by-set">
<select id="reli-quality" class="by-set">
@ -31,10 +31,10 @@ function genReli() {
<input id="reli-id" type="text" style="display: none;" />
<label for="level">Level:</label><input type="number" id="level" name="level" value=20 />
<label for="level">强化等级:</label><input type="number" id="level" name="level" value=20 />
<div style="display: flex; flex-direction: column; margin-top: 1em;">
<div style="flex: 2; padding: 0.5em;" class="card">
<label for="main-prop">Main Props:</label>
<label for="main-prop">主属性</label>
<div style="display: flex; align-items: end">
<div style="flex: 4;">
<select id="main-prop"> </select>
@ -46,10 +46,10 @@ function genReli() {
</div>
</div>
<div style="flex: 4;padding: 0.5em;" class="card">
<label for="append-prop">Append Props:</label>
<label for="append-prop">副属性</label>
<table style="width: 100%">
<thead>
<tr><th style="width:50%">Prop</th><th style="width:30%">Value</th><th style="width:10%">Times</th><th style="width: 5%"></th></tr>
<tr><th style="width:50%">属性</th><th style="width:30%"></th><th style="width:20%"></th><th style="width: 5%"></th></tr>
</thead>
<tbody id="tbody-affix-prop">
@ -67,14 +67,14 @@ function genReli() {
</div>
</div>
<button id="execute">Send</button>
<button id="execute">发送</button>
</div>`;
document.getElementById("reli-id").setvalue = updateReliId;
var filter = document.getElementById("reli-set");
reli_list.forEach(reli => {
var o = document.createElement("option");
o.value = reli.id;
o.innerText = "Set: " + reli.name;
o.innerText = "套装:" + reli.name;
filter.appendChild(o);
})
document.getElementById("reli-set").oninput = updateQualityList;
@ -161,7 +161,7 @@ function updateQualityList() {
if (element.contains[i+1]) {
var o = document.createElement("option");
o.value = i + 1;
o.innerText = "Q: " + {0: "White", 1: "Green", 2: "Blue", 3: "Purple", 4: "Orange", 5:"Unknown"} [i];
o.innerText = "质量: " + {0: "白色", 1: "绿色", 2: "蓝色", 3: "紫色", 4: "金色", 5:"未知"} [i];
qualities[i] = o;
}
}

View File

@ -2,23 +2,23 @@
function genWeapon() {
var panel = document.getElementById("panel");
panel.innerHTML = `<div class="form">
<h2>Send Weapon to you</h2>
<label for="weapon-id">Weapon Name:</label>
<h2>发送武器</h2>
<label for="weapon-id">武器名称:</label>
<div style="display: flex;">
<select id="weapon-filter" style="flex: 2">
<option value="0"> Filter:All </option>
<option value="1"> Filter:Gray </option>
<option value="2"> Filter:Green </option>
<option value="3"> Filter:Blue </option>
<option value="4"> Filter:Purple </option>
<option value="5"> Filter:Orange </option>
<option value="0"> 筛选全部等级 </option>
<option value="1"> 筛选白色品质 </option>
<option value="2"> 筛选绿色品质 </option>
<option value="3"> 筛选蓝色品质 </option>
<option value="4"> 筛选紫色品质 </option>
<option value="5"> 筛选橙色品质 </option>
</select>
<select id="weapon-id" style="flex: 4; margin-left: 0.5em"> </select>
</div>
<label for="amount">Amount:</label><input type="number" id="amount" name="amount" value=1 />
<label for="level">Level:</label><input type="number" id="level" name="level" value=90 />
<label for="refine">Refine:</label><input type="number" id="refine" name="refine" value=5 />
<button id="execute">Send</button>
<label for="amount">数量:</label><input type="number" id="amount" name="amount" value=1 />
<label for="level">等级:</label><input type="number" id="level" name="level" value=90 />
<label for="refine">精炼等级:</label><input type="number" id="refine" name="refine" value=5 />
<button id="execute">发送</button>
</div>`;
updateWeaponList();

View File

@ -25,15 +25,15 @@ async function sendCommand(payload, method="invoke", background=false, persisten
}
return json
} catch (e) {
var messages = `Request failed.`
var messages = `请求失败.`
if (json.code) {
messages += ` Code: ${json.message}`
messages += ` 错误信息: ${json.message}`
}
message(messages, "fail", false);
}
} catch (err) {
message("Connection issue.", "fail", false);
message("连接失败或服务器内部错误。", "fail", false);
}
}
@ -59,7 +59,7 @@ function message(message, className, persistent=false) {
var dismissButton = document.createElement("button");
mc.classList.add("messageContent");
mc.innerText = message;
dismissButton.innerText = "Dissmiss";
dismissButton.innerText = "关闭";
m.appendChild(mc);
m.appendChild(dismissButton);
document.getElementById("message").appendChild(m);

View File

@ -6,7 +6,7 @@ function checkStatus(){
if (res.code == 200) {
status.classList.add("ready");
status.classList.remove("error");
document.getElementById("statusText").innerText = "Ready";
document.getElementById("statusText").innerText = "正常";
networkIssuesInformed = false;
} else {
throw new Error("");
@ -14,9 +14,9 @@ function checkStatus(){
}).catch(err => {
status.classList.add("error");
status.classList.remove("ready");
document.getElementById("statusText").innerText = "Error";
document.getElementById("statusText").innerText = "已断开";
if (!networkIssuesInformed) {
message("Network issue detected, you may request a new MojoConsole link in game.", "fail");
message("监测到网络或授权问题,请尝试在游戏内重新获取链接。", "fail");
networkIssuesInformed = true;
}
})
@ -38,9 +38,10 @@ document.addEventListener("DOMContentLoaded", () => {
|| document.documentElement.clientHeight
|| document.body.clientHeight;
var content = document.getElementById("content");
height = height - content.getBoundingClientRect().y - 30;
content.style.height = height + "px";
message("Welcome to MojoConsolePlus!");
var height1 = height - content.getBoundingClientRect().y - 30;
content.style.height = height1 + "px";
var area = document.getElementById("right");
area.style.height = height - area.getBoundingClientRect().y + "px";
message("欢迎使用MojoConsolePlus!");
},10); // delay height modification to avoid issues
})