aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index 6adda3d0..4fe3d52e 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -37,6 +37,7 @@ var focused_node: Control
var focused_menu: Menu # only use this as a last resort, currently exists to open setup menu from settings
func _ready():
+ TranslationManager.load_locales()
GLTFDocument.register_gltf_document_extension(GLTFApplyNodeVisibility.new())
Profile.load(OS.get_data_dir().path_join("hurrycurry").path_join("profile"))
Settings.load(OS.get_config_dir().path_join("hurrycurry").path_join("settings.json"))
@@ -125,6 +126,13 @@ func language_list():
a.insert(0, "system")
return a
+func language_tooltip_list():
+ var out = []
+ for l in language_list():
+ var percentage = "%.0d" % (TranslationManager.LOCALE_STATS.get(l, 0.) * 100.)
+ out.append(tr("c.settings.ui.language.tooltip").format([percentage]))
+ return out
+
static func unordered_array_eq(a: Array, b: Array) -> bool:
return unordered_array_subset(a, b) and unordered_array_subset(b, a)