Add setlocale to set English locale to en_US.UTF-8

This commit is contained in:
Kumi 2023-09-01 20:19:35 +02:00
parent 499faf1dbb
commit b786097a47
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -5,6 +5,7 @@ from argparse import ArgumentParser
from datetime import date, timedelta
from pathlib import Path
from typing import Optional
from locale import setlocale, LC_ALL
from jinja2 import Environment, FileSystemLoader
from dateutil.parser import parse
@ -148,6 +149,9 @@ def main():
args = parser.parse_args()
# Set locale to en_US.UTF-8 for now, only English is supported
setlocale(LC_ALL, "en_US.UTF-8")
if args.country:
country_code = args.country.upper()
assert (