Skip to content

Commit

Permalink
Default to en_US if the locale is unknown #175
Browse files Browse the repository at this point in the history
  • Loading branch information
fossfreedom committed Mar 29, 2018
1 parent 2ee4511 commit b01eeeb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion budgie-welcome
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,10 @@ class Translations(object):
if arg.locale:
self.locale = arg.locale
else:
self.locale = str(locale.getlocale()[0])
try:
self.locale = str(locale.getlocale()[0])
except ValueError:
self.locale = "en_US"

self.pages_dir = self.get_pages_path()
# Should this locale not exist, try a non-specific region. (e.g. "en_GB" → "en")
Expand Down

0 comments on commit b01eeeb

Please sign in to comment.