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
This commit is contained in:
Alexander Lercher 2024-04-30 14:35:46 +02:00
parent b8375442a7
commit 1066e7dd88
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ node_modules
*.egg-info
*.pyc
*.tgz
**/.DS_Store

View File

@ -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()