File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ def show_convert_usage():
152
152
def show_translate_usage ():
153
153
print (" ** translate **" )
154
154
print (" Usage:" )
155
- print (" seleniumbase translate [SB_FILE] .py [LANGUAGE] [ACTION]" )
156
- print (" OR: sbase translate [SB_FILE] .py [LANGUAGE] [ACTION]" )
155
+ print (" seleniumbase translate [SB_FILE.py] [LANGUAGE] [ACTION]" )
156
+ print (" OR: sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]" )
157
157
print (" Languages:" )
158
158
print (" --en / --English | --zh / --Chinese" )
159
159
print (" --nl / --Dutch | --fr / --French" )
@@ -392,6 +392,14 @@ def main():
392
392
show_convert_usage ()
393
393
elif command == "translate" :
394
394
if len (command_args ) >= 1 :
395
+ if sys .version_info [0 ] == 2 :
396
+ colorama .init (autoreset = True )
397
+ c5 = colorama .Fore .RED + colorama .Back .LIGHTYELLOW_EX
398
+ cr = colorama .Style .RESET_ALL
399
+ msg = "The SeleniumBase Translator does NOT support Python 2!"
400
+ message = "\n " + c5 + msg + cr + "\n "
401
+ print ("" )
402
+ raise Exception (message )
395
403
from seleniumbase .translate import translator
396
404
translator .main ()
397
405
else :
You can’t perform that action at this time.
0 commit comments