Skip to content

Commit

Permalink
Fix gtransv2 options check
Browse files Browse the repository at this point in the history
  • Loading branch information
BingLingGroup committed Feb 2, 2020
1 parent a7791ca commit d9a474b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ when the option is not given at the command line.
"(arg_num)" means if the option is given,
the number of the arguments is required.
Author: Bing Ling
Email: agermanidis@gmail.com
Email: binglinggroup@outlook.com
Bug report: https://github.com/BingLingGroup/autosub
```

Expand Down Expand Up @@ -790,7 +790,7 @@ Bugs and suggestions can be reported at [issues](https://github.com/BingLingGrou

I only write the scripts for building standalone executable files on windows, [Nuitka script](scripts/nuitka_build.bat) and [pyinstaller script](scripts/pyinstaller_build.bat).

The version after 0.5.4a doesn't support Nuitka build since 0.5.4a import google.cloud package and it contains `pkg_resources.get_distribution` which is not supported by Nuitka due to this [Nuitka issue #146](https://github.com/Nuitka/Nuitka/issues/146). You can manually remove the codes include the google.cloud package and build it. I will consider remove the codes to support Nuitka build in the future version.
The version after 0.5.4a doesn't support Nuitka build since 0.5.4a import google.cloud package and it contains `pkg_resources.get_distribution` which is not supported by Nuitka due to this [Nuitka issue #146](https://github.com/Nuitka/Nuitka/issues/146). You can manually remove the codes include the google.cloud package and build it. I will consider removing the codes to support Nuitka build in the future version.

Nuitka build is pretty tricky. These environments I tried and worked.

Expand Down
2 changes: 1 addition & 1 deletion autosub/cmdline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def validate_aovp_args(args): # pylint: disable=too-many-branches, too-many-ret
Check that the commandline arguments passed to autosub are valid
for audio or video processing.
"""
if args.sleep_seconds < 0 or args.lines_per_trans < 0:
if args.sleep_seconds < 0:
raise exceptions.AutosubException(
_("Error: \"-slp\"/\"--sleep-seconds\" arg is illegal."))

Expand Down
1 change: 0 additions & 1 deletion autosub/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
# when using external speech region control

DEFAULT_DST_LANGUAGE = 'en-US'
DEFAULT_LINES_PER_TRANS = 15
DEFAULT_SIZE_PER_TRANS = 4000
DEFAULT_SLEEP_SECONDS = 5

Expand Down
Binary file modified autosub/data/locale/zh_CN/LC_MESSAGES/autosub.options.mo
Binary file not shown.
12 changes: 6 additions & 6 deletions autosub/data/locale/zh_CN/LC_MESSAGES/autosub.options.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-02 11:17+0800\n"
"PO-Revision-Date: 2020-02-02 11:19+0800\n"
"POT-Creation-Date: 2020-02-02 16:25+0800\n"
"PO-Revision-Date: 2020-02-02 16:25+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -620,8 +620,8 @@ msgstr ""
#: autosub/options.py:554
msgid ""
"List all recommended \"-S\"/\"--speech-language\" Google Speech-to-Text "
"language codes. If no arg is given, list all. Or else will list get a group "
"of \"good match\" of the arg. Default \"good match\" standard is whose match "
"language codes. If no arg is given, list all. Or else will list a group of "
"\"good match\" of the arg. Default \"good match\" standard is whose match "
"score above 90 (score between 0 and 100). Ref: https://tools.ietf.org/html/"
"bcp47 https://github.com/LuminosoInsight/langcodes/blob/master/langcodes/"
"__init__.py lang code example: language-script-region-variant-extension-"
Expand All @@ -638,8 +638,8 @@ msgstr ""
#: autosub/options.py:570
msgid ""
"List all available \"-SRC\"/\"--src-language\" py-googletrans translation "
"language codes. Or else will list get a group of \"good match\" of the arg. "
"Same docs above. (arg_num = 0 or 1)"
"language codes. Or else will list a group of \"good match\" of the arg. Same "
"docs above. (arg_num = 0 or 1)"
msgstr ""
"列出所有可用的\"-SRC\"/\"--src-language\"也就是py-googletrans可用的翻译用的语"
"言代码。否则会给出一个“好的匹配”的清单。同样的参考文档如上。(参数个数为0或"
Expand Down
4 changes: 2 additions & 2 deletions autosub/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def get_cmd_args(): # pylint: disable=too-many-statements
help=_("List all recommended \"-S\"/\"--speech-language\" "
"Google Speech-to-Text language codes. "
"If no arg is given, list all. "
"Or else will list get a group of \"good match\" "
"Or else will list a group of \"good match\" "
"of the arg. Default \"good match\" standard is whose "
"match score above 90 (score between 0 and 100). "
"Ref: https://tools.ietf.org/html/bcp47 "
Expand All @@ -569,7 +569,7 @@ def get_cmd_args(): # pylint: disable=too-many-statements
nargs='?',
help=_("List all available \"-SRC\"/\"--src-language\" "
"py-googletrans translation language codes. "
"Or else will list get a group of \"good match\" "
"Or else will list a group of \"good match\" "
"of the arg. "
"Same docs above. "
"(arg_num = 0 or 1)"))
Expand Down
2 changes: 1 addition & 1 deletion docs/README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ Auditok的选项:
"参数个数"指的是如果提供了选项,
该选项所需要的参数个数。
作者: Bing Ling
Email: agermanidis@gmail.com
Email: binglinggroup@outlook.com
问题反馈: https://github.com/agermanidis/autosub
```

Expand Down

0 comments on commit d9a474b

Please sign in to comment.