diff --git a/app.py b/app.py index ff77e3c6d3007591f26d6c670158cb63cf448299..b2d552cc731eeb9a882f3c2a839772a048bed9cf 100644 --- a/app.py +++ b/app.py @@ -18,18 +18,16 @@ def create_app(): with open("localisations.toml", "rb") as file: localisations = tomllib.load(file) + for language in app.config["ENABLED_LOCALISATIONS"]: + check_localisation(app.logger, localisations, language) + app.config["LOCALISATIONS"] = localisations - del localisations + + app.logger.info("Localisations loaded.") with app.app_context(): import routes - for language in app.config["ENABLED_LOCALISATIONS"]: - check_localisation(app.logger, app.config["LOCALISATIONS"], language) - del language - - app.logger.info("Localisations loaded.") - return app