From b7cfdb7376547c14042b026ec98c8d47a76d3958 Mon Sep 17 00:00:00 2001 From: Aotumuri Date: Sun, 20 Jul 2025 16:23:12 +0900 Subject: [PATCH] Make SpawnAd loading text translatable using translateText (#1393) ## Description: Replaced the hardcoded "loading" text in the SpawnAd component with `translateText("spawn_ad.loading")` for proper localization. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: aotumuri --- resources/lang/en.json | 3 +++ src/client/graphics/layers/SpawnAd.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lang/en.json b/resources/lang/en.json index 882fb8e5b..bfcb736d7 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -576,6 +576,9 @@ "grogu": "Grogu" } }, + "spawn_ad": { + "loading": "Loading advertisement..." + }, "auth": { "login_required": "Login is required to access this website.", "redirecting": "You are being redirected...", diff --git a/src/client/graphics/layers/SpawnAd.ts b/src/client/graphics/layers/SpawnAd.ts index f6b239623..f8f39294f 100644 --- a/src/client/graphics/layers/SpawnAd.ts +++ b/src/client/graphics/layers/SpawnAd.ts @@ -1,5 +1,6 @@ import { LitElement, css, html } from "lit"; import { customElement, state } from "lit/decorators.js"; +import { translateText } from "../../../client/Utils"; import { GameView } from "../../../core/game/GameView"; import { getGamesPlayed } from "../../Utils"; import { Layer } from "./Layer"; @@ -123,7 +124,9 @@ export class SpawnAd extends LitElement implements Layer { class="w-full h-full flex items-center justify-center" > ${!this.adLoaded - ? html`Loading ad...` + ? html`${translateText("spawn_ad.loading")}` : ""}