From 5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de Mon Sep 17 00:00:00 2001 From: nokoe Date: Tue, 15 Oct 2024 00:04:10 +0200 Subject: replace old book textures with ui book --- client/global.gd | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/global.gd') diff --git a/client/global.gd b/client/global.gd index b6fb8b8a..f16aa52e 100644 --- a/client/global.gd +++ b/client/global.gd @@ -217,6 +217,11 @@ func find_menu(node: Node) -> Menu: if node is Menu: return node else: return find_menu(node.get_parent()) +func get_message_str(m: Dictionary) -> String: + if "text" in m: return m.text + if "translation" in m: return tr(m.translation.id).format(m.translation.params.map(get_message_str)) + return "[unsupported message type]" + func language_list(): var a = TranslationServer.get_loaded_locales() a.sort() -- cgit v1.2.3-70-g09d2