diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-12-10 17:01:35 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-12-10 17:01:35 +0100 |
commit | 626c62e547cfa9dfa1fd3b18a524d62b61ccf0d3 (patch) | |
tree | adef7cc25361290dd6e40063eced60c2ce406dc0 | |
parent | c86100cd0ca4bf74597be4f4d34eaceae748aba5 (diff) | |
download | fietsboek-626c62e547cfa9dfa1fd3b18a524d62b61ccf0d3.tar.gz fietsboek-626c62e547cfa9dfa1fd3b18a524d62b61ccf0d3.tar.bz2 fietsboek-626c62e547cfa9dfa1fd3b18a524d62b61ccf0d3.zip |
fix localized resource loading
-rw-r--r-- | fietsboek/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fietsboek/util.py b/fietsboek/util.py index 63414ae..9269b67 100644 --- a/fietsboek/util.py +++ b/fietsboek/util.py @@ -277,7 +277,7 @@ def check_password_constraints(password: str, repeat_password: Optional[str] = N def read_localized_resource( - locale_name: str, path: str, locale_packages: List[str], raise_on_error: bool = False + locale_name: str, path: str, locale_packages: List[str] = None, raise_on_error: bool = False ) -> str: """Reads a localized resource. @@ -302,7 +302,8 @@ def read_localized_resource( locales.append(locale_name.split("_", 1)[0]) if locale_packages is None: - locale_packages = ["fietsboek"] + locale_packages = [] + locale_packages.insert(0, "fietsboek") for locale in locales: for package in locale_packages: |