diff --git a/src/octoprint/server/util/flask.py b/src/octoprint/server/util/flask.py index 4be3d26f5..4a9b1a5b2 100644 --- a/src/octoprint/server/util/flask.py +++ b/src/octoprint/server/util/flask.py @@ -71,7 +71,7 @@ def enable_additional_translations(default_locale="en", additional_folders=None) locale_dir = os.path.join(entry.path, 'LC_MESSAGES') if not os.path.isdir(locale_dir): continue - if len(list(filter(lambda x: x.name.endswith('.mo'), scandir(locale_dir)))): + if any(filter(lambda x: x.name.endswith('.mo'), scandir(locale_dir))): result.append(Locale.parse(entry.name)) return result