Rename Replay speed to Game speed in Singleplayer (#1145)

## Description:

Change the title of the replay panel from "Replay speed" to "Game speed"
when in a Singleplayer game.

BEFORE

![afbeelding](https://github.com/user-attachments/assets/1ff17f05-ebae-4adf-a90d-618a87ca7432)

AFTER
![Game
speed](https://github.com/user-attachments/assets/5af78157-17e9-4e00-b4c3-d36c33b026f9)

## 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:

tryout33
This commit is contained in:
VariableVince
2025-06-11 08:13:18 +02:00
committed by GitHub
parent 9b2c6cc1f6
commit 4cd3c2f984
2 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -446,7 +446,8 @@
"alliances": "Alliances"
},
"replay_panel": {
"replay_speed": "Replay speed"
"replay_speed": "Replay speed",
"game_speed": "Game speed"
},
"error_modal": {
"crashed": "Game crashed!",
+7 -2
View File
@@ -18,12 +18,15 @@ export class ReplayPanel extends LitElement implements Layer {
@state()
private _replaySpeedMultiplier: number = defaultReplaySpeedMultiplier;
private _isSinglePlayer: boolean = false;
@state()
private _isVisible = false;
init() {
if (this.game?.config().gameConfig().gameType === GameType.Singleplayer) {
this._isSinglePlayer =
this.game?.config().gameConfig().gameType === GameType.Singleplayer;
if (this._isSinglePlayer) {
this.setVisible(true);
}
}
@@ -65,7 +68,9 @@ export class ReplayPanel extends LitElement implements Layer {
@contextmenu=${(e) => e.preventDefault()}
>
<label class="block mb-1 text-white" translate="no">
${translateText("replay_panel.replay_speed")}
${this._isSinglePlayer
? translateText("replay_panel.game_speed")
: translateText("replay_panel.replay_speed")}
</label>
<div class="grid grid-cols-2 gap-1">
<button