diff --git a/app/__init__.py b/app/__init__.py index 1fb8330..53554d9 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,2 +1,10 @@ +import os +from appdirs import user_data_dir + +# override polyglot path +import polyglot +polyglot.polyglot_path = os.path.join(user_data_dir(appname="LibreTranslate", appauthor="uav4geo"), "polyglot_data") + + from .main import main from .manage import manage diff --git a/requirements.txt b/requirements.txt index 30763a7..627a875 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,4 @@ pyicu==2.6 pycld2==0.41 morfessor==2.0.6 polyglot==16.7.4 +appdirs==1.4.4