corrected i18n path

main
Domeniko Gentner 3 years ago
parent 9a46b52904
commit 58f21ca06e
  1. 5
      labertasche/language/__init__.py

@ -6,7 +6,7 @@
# * _repo : https://git.tuxstash.de/gothseidank/labertasche # * _repo : https://git.tuxstash.de/gothseidank/labertasche
# * _license : This project is under MIT License # * _license : This project is under MIT License
# *********************************************************************************/ # *********************************************************************************/
from flask import Request from flask import Request, current_app
from pathlib import Path from pathlib import Path
from json import load from json import load
@ -19,7 +19,8 @@ class Language:
self.languages = list() self.languages = list()
# Directory where translations live # 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 # Looks for translations
for filename in i18n_dir.glob("*.json"): for filename in i18n_dir.glob("*.json"):

Loading…
Cancel
Save