Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jul 23, 2024
2 parents 4c4b9c6 + 4e4eebd commit 941f96d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
__pycache__/
.idea
.vercel
.env

__pycache__/
group_code.py
rating.py
hist.py

tongyong_guifan.txt

I.Ming*.ttf
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ def index() -> str:
query_str = form.input_string.data
query_mode = request.form.get("query-mode", "source")
enable_jkv = form.jkv_check.data
selected_option = request.form.get("options", "")
selected_option = request.form.get("option", "")
if query_str:
if query_mode == "source":
results = get_translation(query_str)
elif query_mode == "transl":
query_lang = request.form.get("query-lang", "zh_cn")
results = get_translation(query_str, query_lang)
elif query_mode == "key":
results = get_translation(query_str, "key")
Expand Down
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
{{ form.input_string(autocomplete="off", id="input_string") }}

{% if input_value %}
<label for="options">{{ _("Select a translation key: ") }}</label>
<select name="options" id="options">
<label for="option">{{ _("Select a translation key: ") }}</label>
<select name="option" id="option">
{% for option in keys %}
<option value="{{ option }}" {% if option==key %}selected{% endif %}>{{ option }}</option>
{% endfor %}
Expand Down

0 comments on commit 941f96d

Please sign in to comment.