mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:10:42 +00:00
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:
@@ -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...",
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user