From 415819a5c705909f41604d51d01fea5a914832f5 Mon Sep 17 00:00:00 2001 From: Andy Wood Date: Mon, 20 May 2024 14:46:39 +0100 Subject: [PATCH] Fix statement ordering --- ui/i18n.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/i18n.py b/ui/i18n.py index 1ece919..59d96df 100644 --- a/ui/i18n.py +++ b/ui/i18n.py @@ -49,15 +49,14 @@ def _(x): return x DEFAULT_LOCALE = 'en_GB.UTF-8@ueb2' +translations = install(DEFAULT_LOCALE) +# this will've already been installed globally, but this keeps flake8 happy +_ = translations.gettext + BUILTIN_LANGUAGES = OrderedDict([ (lang.code, _(lang.title)) for lang in builtin ]) -translations = install(BUILTIN_LANGUAGES[DEFAULT_LOCALE]) - -# this will've already been installed globally, but this keeps flake8 happy -_ = translations.gettext - # For detecting the default language of older installations, which # didn't really have switchable language but did add a default # sort-of-locale to the global state file.