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
This commit is contained in:
Aotumuri
2025-07-20 16:23:12 +09:00
committed by GitHub
parent 20821e99aa
commit b7cfdb7376
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -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...",
+4 -1
View File
@@ -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`<span class="text-white text-sm">Loading ad...</span>`
? html`<span class="text-white text-sm"
>${translateText("spawn_ad.loading")}</span
>`
: ""}
</div>
</div>