XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

chore(webui): add loading string to translation system (#2440)

Closes #2439 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2440 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

c46c43f1
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

8 个文件 +15 -5
Modified static/webui/index.html +2 -1
@@ -457,7 +457,8 @@
457 457 </div>
458 458 </div>
459 459 <div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI">
460 <h3 class="mb-0"></h3>
460 <h3 id="detailedView-loading" class="mb-0" data-loc="general_loading"></h3>
461 <h3 id="detailedView-title" class="mb-0"></h3>
461 462 <p class="text-body-secondary"></p>
462 463 <div id="archonShards-card" class="card mb-3 d-none">
463 464 <h5 class="card-header" data-loc="detailedView_archonShardsLabel"></h5>
Modified static/webui/script.js +7 -4
@@ -1166,14 +1166,15 @@ function updateInventory() {
1166 1166 const item = data[category].find(x => x.ItemId.$oid == oid);
1167 1167
1168 1168 if (item) {
1169 document.getElementById("detailedView-loading").classList.add("d-none");
1170
1169 1171 if (item.ItemName) {
1170 $("#detailedView-route h3").text(item.ItemName);
1172 $("#detailedView-title").text(item.ItemName);
1171 1173 $("#detailedView-route .text-body-secondary").text(
1172 1174 itemMap[item.ItemType]?.name ?? item.ItemType
1173 1175 );
1174 1176 } else {
1175 $("#detailedView-route h3").text(itemMap[item.ItemType]?.name ?? item.ItemType);
1176 $("#detailedView-route .text-body-secondary").text("");
1177 $("#detailedView-title").text(itemMap[item.ItemType]?.name ?? item.ItemType);
1177 1178 }
1178 1179
1179 1180 if (category == "Suits") {
@@ -2184,7 +2185,9 @@ function doAddMissingMaxRankMods() {
2184 2185 // DetailedView Route
2185 2186
2186 2187 single.getRoute("#detailedView-route").on("beforeload", function () {
2187 this.element.querySelector("h3").textContent = "Loading...";
2188 document.getElementById("detailedView-loading").classList.remove("d-none");
2189 document.getElementById("detailedView-title").textContent = "";
2190 document.querySelector("#detailedView-route .text-body-secondary").textContent = "";
2188 2191 document.getElementById("archonShards-card").classList.add("d-none");
2189 2192 document.getElementById("valenceBonus-card").classList.add("d-none");
2190 2193 if (window.didInitialInventoryUpdate) {
Modified static/webui/translations/de.js +1 -0
@@ -4,6 +4,7 @@ dict = {
4 4 general_addButton: `Hinzufügen`,
5 5 general_setButton: `[UNTRANSLATED] Set`,
6 6 general_bulkActions: `Massenaktionen`,
7 general_loading: `[UNTRANSLATED] Loading...`,
7 8
8 9 code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
9 10 code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,
Modified static/webui/translations/en.js +1 -0
@@ -3,6 +3,7 @@ dict = {
3 3 general_addButton: `Add`,
4 4 general_setButton: `Set`,
5 5 general_bulkActions: `Bulk Actions`,
6 general_loading: `Loading...`,
6 7
7 8 code_loginFail: `Login failed. Double-check the email and password.`,
8 9 code_regFail: `Registration failed. Account already exists?`,
Modified static/webui/translations/es.js +1 -0
@@ -4,6 +4,7 @@ dict = {
4 4 general_addButton: `Agregar`,
5 5 general_setButton: `Establecer`,
6 6 general_bulkActions: `Acciones masivas`,
7 general_loading: `[UNTRANSLATED] Loading...`,
7 8
8 9 code_loginFail: `Error al iniciar sesión. Verifica el correo electrónico y la contraseña.`,
9 10 code_regFail: `Error al registrar la cuenta. ¿Ya existe una cuenta con este correo?`,
Modified static/webui/translations/fr.js +1 -0
@@ -4,6 +4,7 @@ dict = {
4 4 general_addButton: `Ajouter`,
5 5 general_setButton: `[UNTRANSLATED] Set`,
6 6 general_bulkActions: `Action groupée`,
7 general_loading: `[UNTRANSLATED] Loading...`,
7 8
8 9 code_loginFail: `Connexion échouée. Vérifiez le mot de passe.`,
9 10 code_regFail: `Enregistrement impossible. Compte existant?`,
Modified static/webui/translations/ru.js +1 -0
@@ -4,6 +4,7 @@ dict = {
4 4 general_addButton: `Добавить`,
5 5 general_setButton: `Установить`,
6 6 general_bulkActions: `Массовые действия`,
7 general_loading: `[UNTRANSLATED] Loading...`,
7 8
8 9 code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
9 10 code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,
Modified static/webui/translations/zh.js +1 -0
@@ -4,6 +4,7 @@ dict = {
4 4 general_addButton: `添加`,
5 5 general_setButton: `设置`,
6 6 general_bulkActions: `批量操作`,
7 general_loading: `[UNTRANSLATED] Loading...`,
7 8
8 9 code_loginFail: `登录失败.请检查邮箱和密码.`,
9 10 code_regFail: `注册失败.账号已存在.`,