frame-of-mind/src/dev-util/i18n.gd

36 lines
1.3 KiB
GDScript3
Raw Normal View History

## Localization Utility class to move lists of keys out of difficult to read code
extends Node
func get_memento_prompt(count: int) -> StringName:
return TranslationServer.translate(_memento_prompts.get(count, ""))
func get_story_caption(id: Scenes.id) -> StringName:
return TranslationServer.translate(_story_captions.get(id, ""))
2026-01-23 14:23:53 +00:00
func get_scene_caption(id: Scenes.id) -> StringName:
return _story_captions.get(id)
const _memento_prompts: Dictionary[int, StringName] = {
1: "There are three Mementos left to find.",
2: "You have collected half of the mementos.",
3: "Find the last Memento to complete the Board.",
4: "Combine cards to order your thoughts.",
}
const _story_captions : Dictionary[Scenes.id, StringName] = {
Scenes.id.YOUTH_DRAVEN: "Starlight",
Scenes.id.YOUTH_CHILDHOOD: "crafted Mask",
Scenes.id.YOUTH_VOICE_TRAINING: "Comic Stash",
Scenes.id.YOUTH_JUI_JUTSU: "Sports Clothes",
Scenes.id.TRANSITION: "Move on",
Scenes.id.ADULT_DND: "colorful Dice",
Scenes.id.ADULT_VOLUNTARY: "Gemstone Art",
Scenes.id.ADULT_AUTISM: "Chat Messages",
Scenes.id.ADULT_EATING: "Dishes",
Scenes.id.ADULT_SELF_ADVOCACY: "Science Poster",
Scenes.id.ADULT_THERAPY_VOLUNTEER: "Doctors Note",
Scenes.id.ADULT_THERAPY_UNI: "Doctors Note",
Scenes.id.ADULT_BURNOUT: "Paperwork",
}