mirror of
https://github.com/Findus23/invoices.git
synced 2024-09-19 15:13:47 +02:00
localized country name
This commit is contained in:
parent
f44bc85006
commit
78eafc3a8b
1 changed files with 3 additions and 1 deletions
4
main.py
4
main.py
|
@ -72,8 +72,10 @@ def compile_invoice(id):
|
|||
autoescape=False,
|
||||
loader=jinja2.FileSystemLoader(os.path.abspath('.'))
|
||||
)
|
||||
fromdata = load_yaml("from.yaml")
|
||||
fromdata["country"] = fromdata["countryDE"] if invoice.locale == "de" else fromdata["countryEN"]
|
||||
data = {
|
||||
"from": load_yaml("from.yaml"),
|
||||
"from": fromdata,
|
||||
"to": load_yaml("recipients/{id}.yaml".format(id=invoice.recipient)),
|
||||
"invoice": invoice,
|
||||
"config": config
|
||||
|
|
Loading…
Reference in a new issue