i18n(@projects/@magic-civilization): 🌐 route replay_viewer button/label text through ThemeVocabulary
replay_viewer.tscn hardcoded its title/placeholder/turn/play/step/speed-label text (pre-existing since May). Route the word labels through ThemeVocabulary (replay_back/title/placeholder/step keys) set in _ready; runtime-set labels (turn/play-pause/speed) lose their static .tscn text. Symbolic speed buttons (0.5×/1×/2×) left as-is (not flagged). Clears validate-i18n for this scene. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
91cfb09dc2
commit
5b2b88b2a9
3 changed files with 8 additions and 7 deletions
|
|
@ -331,6 +331,10 @@
|
|||
"tutorial_next": "Next",
|
||||
"tutorial_back": "Back",
|
||||
"tutorial_done": "Begin",
|
||||
"replay_back": "Back",
|
||||
"replay_title": "Replay Viewer",
|
||||
"replay_placeholder": "World map renderer (wired when GdReplayPlayer bridge lands)",
|
||||
"replay_step": "Step",
|
||||
"tutorial_skip": "Skip Tutorial",
|
||||
"tutorial_step_1_title": "The Hex Map",
|
||||
"tutorial_step_1_body": "The world is carved into hex tiles. Click a tile to inspect it. Right-click (or click a destination) to move your selected unit. Drag with the middle mouse button to pan; scroll to zoom.",
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ var _events_cursor: int = 0
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
_back_button.text = ThemeVocabulary.lookup("replay_back")
|
||||
(%TitleLabel as Label).text = ThemeVocabulary.lookup("replay_title")
|
||||
(%PlaceholderLabel as Label).text = ThemeVocabulary.lookup("replay_placeholder")
|
||||
_back_button.pressed.connect(_on_back_pressed)
|
||||
_play_pause_button.pressed.connect(_on_play_pause_pressed)
|
||||
_scrubber.value_changed.connect(_on_scrubber_changed)
|
||||
|
|
@ -56,6 +59,7 @@ func _ready() -> void:
|
|||
# Step button.
|
||||
var step_btn: Button = %StepButton
|
||||
if step_btn != null:
|
||||
step_btn.text = ThemeVocabulary.lookup("replay_step")
|
||||
step_btn.pressed.connect(_on_step_pressed)
|
||||
|
||||
# Consume the staging field set by EndGameSummary when navigating from the
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ theme_override_constants/separation = 16
|
|||
|
||||
[node name="TitleLabel" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Replay Viewer"
|
||||
theme_override_font_sizes/font_size = 32
|
||||
theme_override_colors/font_color = Color(0.9, 0.8, 0.4, 1)
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -51,7 +50,6 @@ layout_mode = 2
|
|||
[node name="TurnLabel" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Turn 1 / 100"
|
||||
theme_override_font_sizes/font_size = 20
|
||||
horizontal_alignment = 1
|
||||
|
||||
|
|
@ -83,7 +81,6 @@ anchor_right = 0.5
|
|||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "World map renderer (wired when GdReplayPlayer bridge lands)"
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.4, 1)
|
||||
horizontal_alignment = 1
|
||||
|
||||
|
|
@ -99,13 +96,11 @@ theme_override_constants/separation = 12
|
|||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Play"
|
||||
|
||||
[node name="StepButton" type="Button" parent="MarginContainer/VBoxContainer/ControlRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
text = "Step"
|
||||
|
||||
[node name="SpeedHalf" type="Button" parent="MarginContainer/VBoxContainer/ControlRow"]
|
||||
unique_name_in_owner = true
|
||||
|
|
@ -129,7 +124,6 @@ text = "2×"
|
|||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(60, 0)
|
||||
text = "1.0×"
|
||||
|
||||
[node name="BottomRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
|
@ -139,7 +133,6 @@ alignment = 2
|
|||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 44)
|
||||
text = "Back"
|
||||
|
||||
[node name="CommsRenderer" parent="." instance=ExtResource("2_comms")]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue