Skip to content

Commit

Permalink
macOS: disable *_ES locales to avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiascode committed May 20, 2024
1 parent 75a2650 commit a704546
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pynicotine/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def _set_system_language(language=None):
# Remove them, since they are not supported.
default_locale = next(iter(os_preferences.get("AppleLocale", "").split("@", maxsplit=1)))

if default_locale.endswith("_ES"):
# *_ES locale is currently broken on macOS (crashes when sorting strings).
# Disable it for now.
default_locale = "pt_PT"

if not language and "LANGUAGE" not in os.environ:
languages = os_preferences.get("AppleLanguages", [""])
language = next(iter(languages)).replace("-", "_")
Expand Down

0 comments on commit a704546

Please sign in to comment.