Skip to content

Commit

Permalink
Fix glocale problems on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
prculley authored and Nick-Hall committed Aug 18, 2023
1 parent 7b0b646 commit 345aca1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gramps/gen/utils/grampslocale.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,17 +731,17 @@ def check_available_translations(self, loc):
# is cached so we don't have to query the file system every
# time this function is called.
if not hasattr(self, "languages"):
self.language = self.get_available_translations()
self.languages = self.get_available_translations()

if not loc:
return None

if loc[:5] in self.language:
if loc[:5] in self.languages:
return loc[:5]
# US English is the outlier, all other English locales want real English:
if loc[:2] == "en" and loc[:5] != "en_US":
return "en_GB"
if loc[:2] in self.language:
if loc[:2] in self.languages:
return loc[:2]
return None

Expand Down

0 comments on commit 345aca1

Please sign in to comment.