Skip to content

Commit

Permalink
Platform independent locale management
Browse files Browse the repository at this point in the history
Windows does not have the LANG environment variable, get the language
trough the locale library.
  • Loading branch information
berdav committed Jan 14, 2022
1 parent bade449 commit 777e397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion greenpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import os
import sys
import shutil
import locale
import argparse
import platform
import colorama
Expand Down Expand Up @@ -187,7 +188,7 @@ def main():

sm = SettingsManager(cachedir, args.recovery_expiration)

language = get_language(os.environ["LANG"])
language = get_language(locale.getlocale()[0])
if args.language is not None:
language = args.language

Expand Down

0 comments on commit 777e397

Please sign in to comment.