From 3d2162f31673bfb2ce232e20f12945b673edc12d Mon Sep 17 00:00:00 2001 From: Hannes Date: Fri, 15 Mar 2024 13:03:15 +0100 Subject: [PATCH] Don't crash if userLocale is unset, fixes #10 --- geocatbridge/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geocatbridge/plugin.py b/geocatbridge/plugin.py index ae96b39..917530f 100644 --- a/geocatbridge/plugin.py +++ b/geocatbridge/plugin.py @@ -37,7 +37,7 @@ def __init__(self, iface): self.name = meta.getAppName() self.provider = None - self.locale = QSettings().value("locale/userLocale")[0:2] + self.locale = QSettings().value("locale/userLocale", QLocale().name())[0:2] locale_path = files.getLocalePath(f"bridge_{self.locale}") self.translator = QTranslator()