File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 4
4
from ._locales import Locales
5
5
6
6
7
- __version__ = '0.1.1 '
7
+ __version__ = '0.1.2 '
8
8
__all__ = ['Locales' , 'Locale' ]
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import polib
5
- from googletrans import Translator
6
5
7
6
from .._project import Project , find_project_root
8
7
from ._base import Command
@@ -23,6 +22,12 @@ def init_parser(parser: ArgumentParser) -> None:
23
22
)
24
23
25
24
def run (self ) -> int :
25
+ try :
26
+ from googletrans import Translator
27
+ except ImportError :
28
+ msg = 'Please, run `python3 -m pip install googletrans==4.0.0rc1`'
29
+ raise ImportError (msg )
30
+
26
31
project_root = find_project_root (self .args .path )
27
32
project = Project (project_root )
28
33
translator = Translator ()
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ cli = [
39
39
" mypy" ,
40
40
" tomli" ,
41
41
" polib" ,
42
- " googletrans==4.0.0rc1" ,
43
42
]
44
43
test = [
45
- " pytest " ,
44
+ " googletrans==4.0.0rc1 " ,
46
45
" pytest-cov" ,
47
46
" pytest-xdist" ,
47
+ " pytest" ,
48
48
]
49
49
lint = [
50
50
" flake8-length" ,
You can’t perform that action at this time.
0 commit comments