Add localization support for achievements: implement language-specific titles and update UI components

This commit is contained in:
Kirill
2026-10-18 20:32:20 +03:00
parent e1782c7b10
commit 2aced0c61a
6 changed files with 42 additions and 31 deletions
@@ -2,6 +2,10 @@ extends Node
## Player-wide achievement progress and the shared in-game notification queue.
const E = preload("res://world/owniverse/math/exact.gd")
const ITEM = preload("res://ui/achievements/achievement_item.tscn")
const TITLES = {
"en": preload("res://ui/achievements/achievements.en.png"),
"ru": preload("res://ui/achievements/achievements.ru.png"),
}
var progress_path: String = "user://achievements.cfg"
const HOLD_SECONDS = 3.0
const FADE_SECONDS = 0.3
@@ -158,6 +162,8 @@ func _display_event(event: Dictionary) -> void:
panel.show()
func _rebuild_list() -> void:
var title: TextureRect = stage.get_node_or_null("Achievements/Header/Title")
if title != null: title.texture = TITLES[locale]
var unlocked := 0
var position := 1
for id in definitions: