use appdirs to define path to polyglot data

This commit is contained in:
mammo0 2021-03-11 13:34:48 +01:00
parent e0693d697e
commit dd128162ef
2 changed files with 9 additions and 0 deletions

View file

@ -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 .main import main
from .manage import manage from .manage import manage

View file

@ -9,3 +9,4 @@ pyicu==2.6
pycld2==0.41 pycld2==0.41
morfessor==2.0.6 morfessor==2.0.6
polyglot==16.7.4 polyglot==16.7.4
appdirs==1.4.4