~metalune/simplytranslate_gemini

f698d4bade394f1daa0f48844bfc3bc03c82d5cc — metalune 2 months ago 80e3336 master
Don't display any engine options if there's only one engine
1 files changed, 4 insertions(+), 0 deletions(-)

M main.py
M main.py => main.py +4 -0
@@ 99,6 99,10 @@ def index(request, engine_name=engine_names[0], rest=""):
    add_engine_line("libre", "Libre")
    add_engine_line("google", "Google")

    # if there is only one engine, just don't explain any engine options
    if len(engine_lines) == 1:
        engine_lines = []

    translate = False
    translate_line = f"=> /set_text/{engine_name}/{fr}/{to} "
    if not text.strip(): # Check if text is empty