From 1066e7dd8883d2bb3210980aa81140dcdd1d4eb4 Mon Sep 17 00:00:00 2001 From: Alexander Lercher Date: Tue, 30 Apr 2024 14:35:46 +0200 Subject: [PATCH] Fix TypeError for disabled localization If the localization was not set ("WARNING: Localization disabled because the system language could not be determined.") the translation.install() was missing an argument, raising TypeError: 'bool' object is not iterable --- .gitignore | 1 + gitinspector/localization.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6f142c..480d7e6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules *.egg-info *.pyc *.tgz +**/.DS_Store diff --git a/gitinspector/localization.py b/gitinspector/localization.py index ceac0a7..2f7a558 100644 --- a/gitinspector/localization.py +++ b/gitinspector/localization.py @@ -68,7 +68,7 @@ def init(): __enabled__ = True __installed__ = True - __translation__.install(True) + __translation__.install() def check_compatibility(version): if isinstance(__translation__, gettext.GNUTranslations): @@ -103,4 +103,4 @@ def disable(): __enabled__ = False if __installed__: - gettext.NullTranslations().install(True) + gettext.NullTranslations().install()