Skip to content

Commit

Permalink
Merge branch 'SkyEye-FAST/issue7' of https://github.com/SkyEye-FAST/m…
Browse files Browse the repository at this point in the history
…inecraft_translation_flask into SkyEye-FAST/issue7
  • Loading branch information
SkyEye-FAST committed Jul 23, 2024
2 parents 7884d36 + a2d9710 commit f3367a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
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
1 change: 0 additions & 1 deletion static/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@
"4oC": "enchantment.minecraft.silk_touch",
"bNr": "enchantment.minecraft.smite",
"l1A": "enchantment.minecraft.soul_speed",
"w0v": "enchantment.minecraft.sweeping",
"UNd": "enchantment.minecraft.sweeping_edge",
"hhb": "enchantment.minecraft.swift_sneak",
"XI0": "enchantment.minecraft.thorns",
Expand Down
1 change: 0 additions & 1 deletion static/table.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,6 @@ enchantment.minecraft.sharpness Sharpness 锋利 鋒利 鋒利 銳 ダメージ
enchantment.minecraft.silk_touch Silk Touch 精准采集 絲綢之觸 絲綢之觸 完璧 シルクタッチ 섬세한 손길 Độ mềm mại
enchantment.minecraft.smite Smite 亡灵杀手 不死剋星 不死剋星 剋亡 アンデッド特効 강타 Hại thây ma
enchantment.minecraft.soul_speed Soul Speed 灵魂疾行 靈魂疾走 靈魂疾走 靈逸 ソウルスピード 영혼 가속 Tốc độ linh hồn
enchantment.minecraft.sweeping Sweeping Edge 横扫之刃 橫掃之刃 橫掃之刃 橫斬之刃 範囲ダメージ増加 휩쓸기 Quét cạnh
enchantment.minecraft.sweeping_edge Sweeping Edge 横扫之刃 橫掃之刃 橫掃之刃 橫斬之刃 範囲ダメージ増加 휩쓸기 Quét cạnh
enchantment.minecraft.swift_sneak Swift Sneak 迅捷潜行 迅捷潛行 迅捷潛行 迅伏 スニーク速度上昇 신속한 잠행 Đi rón rén nhanh
enchantment.minecraft.thorns Thorns 荆棘 荊棘 尖刺 荊棘 棘の鎧 가시 Gai
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
2 changes: 1 addition & 1 deletion templates/table.html

Large diffs are not rendered by default.

0 comments on commit f3367a3

Please sign in to comment.