1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-17 21:10:12 +01:00

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