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

Merged
Sainan merged 1 commits from webui-loading into main 2025-07-08 20:50:28 -07:00
8 changed files with 15 additions and 5 deletions
Showing only changes of commit c3b9671ccc - Show all commits

View File

@ -457,7 +457,8 @@
</div> </div>
</div> </div>
<div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI"> <div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI">
<h3 class="mb-0"></h3> <h3 id="detailedView-loading" class="mb-0" data-loc="general_loading"></h3>
<h3 id="detailedView-title" class="mb-0"></h3>
<p class="text-body-secondary"></p> <p class="text-body-secondary"></p>
<div id="archonShards-card" class="card mb-3 d-none"> <div id="archonShards-card" class="card mb-3 d-none">
<h5 class="card-header" data-loc="detailedView_archonShardsLabel"></h5> <h5 class="card-header" data-loc="detailedView_archonShardsLabel"></h5>

View File

@ -1166,14 +1166,15 @@ function updateInventory() {
const item = data[category].find(x => x.ItemId.$oid == oid); const item = data[category].find(x => x.ItemId.$oid == oid);
if (item) { if (item) {
document.getElementById("detailedView-loading").classList.add("d-none");
if (item.ItemName) { if (item.ItemName) {
$("#detailedView-route h3").text(item.ItemName); $("#detailedView-title").text(item.ItemName);
$("#detailedView-route .text-body-secondary").text( $("#detailedView-route .text-body-secondary").text(
itemMap[item.ItemType]?.name ?? item.ItemType itemMap[item.ItemType]?.name ?? item.ItemType
); );
} else { } else {
$("#detailedView-route h3").text(itemMap[item.ItemType]?.name ?? item.ItemType); $("#detailedView-title").text(itemMap[item.ItemType]?.name ?? item.ItemType);
$("#detailedView-route .text-body-secondary").text("");
} }
if (category == "Suits") { if (category == "Suits") {
@ -2171,7 +2172,9 @@ function doAddMissingMaxRankMods() {
// DetailedView Route // DetailedView Route
single.getRoute("#detailedView-route").on("beforeload", function () { single.getRoute("#detailedView-route").on("beforeload", function () {
this.element.querySelector("h3").textContent = "Loading..."; document.getElementById("detailedView-loading").classList.remove("d-none");
document.getElementById("detailedView-title").textContent = "";
document.querySelector("#detailedView-route .text-body-secondary").textContent = "";
document.getElementById("archonShards-card").classList.add("d-none"); document.getElementById("archonShards-card").classList.add("d-none");
document.getElementById("valenceBonus-card").classList.add("d-none"); document.getElementById("valenceBonus-card").classList.add("d-none");
if (window.didInitialInventoryUpdate) { if (window.didInitialInventoryUpdate) {

View File

@ -4,6 +4,7 @@ dict = {
general_addButton: `Hinzufügen`, general_addButton: `Hinzufügen`,
general_setButton: `[UNTRANSLATED] Set`, general_setButton: `[UNTRANSLATED] Set`,
general_bulkActions: `Massenaktionen`, general_bulkActions: `Massenaktionen`,
general_loading: `[UNTRANSLATED] Loading...`,
code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`, code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`, code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,

View File

@ -3,6 +3,7 @@ dict = {
general_addButton: `Add`, general_addButton: `Add`,
general_setButton: `Set`, general_setButton: `Set`,
general_bulkActions: `Bulk Actions`, general_bulkActions: `Bulk Actions`,
general_loading: `Loading...`,
code_loginFail: `Login failed. Double-check the email and password.`, code_loginFail: `Login failed. Double-check the email and password.`,
code_regFail: `Registration failed. Account already exists?`, code_regFail: `Registration failed. Account already exists?`,

View File

@ -4,6 +4,7 @@ dict = {
general_addButton: `Agregar`, general_addButton: `Agregar`,
general_setButton: `Establecer`, general_setButton: `Establecer`,
general_bulkActions: `Acciones masivas`, general_bulkActions: `Acciones masivas`,
general_loading: `[UNTRANSLATED] Loading...`,
code_loginFail: `Error al iniciar sesión. Verifica el correo electrónico y la contraseña.`, code_loginFail: `Error al iniciar sesión. Verifica el correo electrónico y la contraseña.`,
code_regFail: `Error al registrar la cuenta. ¿Ya existe una cuenta con este correo?`, code_regFail: `Error al registrar la cuenta. ¿Ya existe una cuenta con este correo?`,

View File

@ -4,6 +4,7 @@ dict = {
general_addButton: `Ajouter`, general_addButton: `Ajouter`,
general_setButton: `[UNTRANSLATED] Set`, general_setButton: `[UNTRANSLATED] Set`,
general_bulkActions: `Action groupée`, general_bulkActions: `Action groupée`,
general_loading: `[UNTRANSLATED] Loading...`,
code_loginFail: `Connexion échouée. Vérifiez le mot de passe.`, code_loginFail: `Connexion échouée. Vérifiez le mot de passe.`,
code_regFail: `Enregistrement impossible. Compte existant?`, code_regFail: `Enregistrement impossible. Compte existant?`,

View File

@ -4,6 +4,7 @@ dict = {
general_addButton: `Добавить`, general_addButton: `Добавить`,
general_setButton: `Установить`, general_setButton: `Установить`,
general_bulkActions: `Массовые действия`, general_bulkActions: `Массовые действия`,
general_loading: `[UNTRANSLATED] Loading...`,
code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`, code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`, code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,

View File

@ -4,6 +4,7 @@ dict = {
general_addButton: `添加`, general_addButton: `添加`,
general_setButton: `设置`, general_setButton: `设置`,
general_bulkActions: `批量操作`, general_bulkActions: `批量操作`,
general_loading: `[UNTRANSLATED] Loading...`,
code_loginFail: `登录失败.请检查邮箱和密码.`, code_loginFail: `登录失败.请检查邮箱和密码.`,
code_regFail: `注册失败.账号已存在.`, code_regFail: `注册失败.账号已存在.`,