~metalune/simplytranslate_web

42475d1fb0bf35309f8d4f52a833fdd1bebf4129 — fattalion 3 months ago 42e8033
Small refactor to getting langs from form body
1 files changed, 2 insertions(+), 8 deletions(-)

M main.py
M main.py => main.py +2 -8
@@ 57,15 57,9 @@ async def index():

    inp = (await request.form).get("input", "")

    from_lang = (await request.form).get("from_language", None)
    from_lang = (await request.form).get("from_language", "Autodetect")

    if from_lang == None:
        from_lang = "Autodetect"

    to_lang = (await request.form).get("to_language", None)

    if to_lang == None:
        to_lang = "English"
    to_lang = (await request.form).get("to_language", "English")

    translation = None