From 58f21ca06eccaaa9d8789d92012ca5b4d190ce6d Mon Sep 17 00:00:00 2001 From: Domeniko Gentner Date: Fri, 15 Jan 2021 19:57:01 +0100 Subject: [PATCH] corrected i18n path --- labertasche/language/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/labertasche/language/__init__.py b/labertasche/language/__init__.py index 18695a3..3117418 100644 --- a/labertasche/language/__init__.py +++ b/labertasche/language/__init__.py @@ -6,7 +6,7 @@ # * _repo : https://git.tuxstash.de/gothseidank/labertasche # * _license : This project is under MIT License # *********************************************************************************/ -from flask import Request +from flask import Request, current_app from pathlib import Path from json import load @@ -19,7 +19,8 @@ class Language: self.languages = list() # Directory where translations live - i18n_dir = Path('i18n').absolute() + i18n_dir = Path(current_app.root_path).absolute() + i18n_dir = i18n_dir / "i18n" # Looks for translations for filename in i18n_dir.glob("*.json"):