Skip to content
Snippets Groups Projects
Commit 80f33dbd authored by Brita Linnestad's avatar Brita Linnestad
Browse files

Merge branch 'main' of gitlab.nibio.no:VIPS/models/grid/NAERSTADMO

parents 82543f90 4983c588
Branches
No related tags found
No related merge requests found
[i18n]
# 1st is the default language
languages=en,nb
[i18n.en]
no_forecast = No forecast
no_risk = No risk
possible_risk = Possible risk
high_risk = High risk
[i18n.nb]
no_forecast = Varsel beregnes ikke
no_risk = Ingen infeksjonsrisiko
possible_risk = Mulig fare for angrep
high_risk = Høy fare for angrep
......@@ -115,6 +115,16 @@ def create_warning_status(start_date):
# Generate mapfile
# Building data sets for language specific legends
languages = []
language_codes = config["i18n"]["languages"].split(",");
for language_code in language_codes:
language = {"language_code": language_code}
if ("i18n.%s" % language_code) in config:
for keyword in config["i18n.%s" % language_code]:
language[keyword] = config["i18n.%s" % language_code][keyword]
languages.append(language)
# The paths should be set in a .env file
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template("mapfile/template.j2")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment