Skip to content

Commit

Permalink
locale
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Aug 21, 2024
1 parent 796fd12 commit 5ef8aa4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions modules/maimai/chunithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def _(msg: Bot.MessageSession, song: str, diff: str = None):
ds = music['ds'][5]
level = music['level'][5]
res.append(msg.locale.t(
"chunithm.message.song.chart",
"chunithm.message.chart",
diff='World\'s End',
level=level,
ds=ds,
Expand All @@ -180,7 +180,7 @@ async def _(msg: Bot.MessageSession, song: str, diff: str = None):
ds = music['ds'][diff]
level = music['level'][diff]
res.append(msg.locale.t(
"chunithm.message.song.chart",
"chunithm.message.chart",
diff=diff_list[diff],
level=level,
ds=ds,
Expand Down
2 changes: 1 addition & 1 deletion modules/maimai/locales/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"chunithm.help.desc": "查询 CHUNITHM 相关内容。",
"chunithm.message.b30.text_prompt": "以下为 ${user} (Rating ${rating}) 的 Best30 列表:",
"chunithm.message.song": "艺术家:${artist}\n分类:${genre}\nBPM:${bpm}\n版本:${version}\n难度:${level}",
"chunithm.message.song.chart": "${diff} ${level} (${ds})\n连击:${combo}\n谱师:${charter}",
"chunithm.message.chart": "${diff} ${level} (${ds})\n连击:${combo}\n谱师:${charter}",
"chunithm.message.song.worlds_end": "艺术家:${artist}\n分类:${genre}\nBPM:${bpm}\n版本:${version}",
"chunithm.message.user_unbound": "未绑定用户,请使用“${prefix}chunithm bind”绑定一个用户。",
"maimai.help.alias": "查询歌曲的别名。",
Expand Down
2 changes: 1 addition & 1 deletion modules/maimai/locales/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"chunithm.help.desc": "查詢 CHUNITHM 相關內容。",
"chunithm.message.b30.text_prompt": "以下為 ${user} (Rating ${rating}) 的 Best30 列表:",
"chunithm.message.song": "藝術家:${artist}\n分類:${genre}\nBPM:${bpm}\n版本:${version}\n難度:${level}",
"chunithm.message.song.chart": "${diff} ${level} (${ds})\n連擊:${combo}\n譜師:${charter}",
"chunithm.message.chart": "${diff} ${level} (${ds})\n連擊:${combo}\n譜師:${charter}",
"chunithm.message.user_unbound": "未綁定使用者,請使用「${prefix}chunithm bind」綁定一個使用者。",
"maimai.help.alias": "查詢歌曲的別名。",
"maimai.help.b50": "查詢 Maimai 使用者的 B50 列表。",
Expand Down
12 changes: 6 additions & 6 deletions modules/maimai/maimai.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
level = music['level'][0]
if len(chart['notes']) == 4:
res.append(msg.locale.t(
"maimai.message.song.sd",
"maimai.message.chart.sd",
diff='Utage',
level=level,
ds=ds,
Expand All @@ -270,7 +270,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
charter=chart['charter']))
else:
res.append(msg.locale.t(
"maimai.message.song.dx",
"maimai.message.chart.dx",
diff='Utage',
level=level,
ds=ds,
Expand All @@ -287,7 +287,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
level = music['level'][0]
if len(chartL['notes']) == 4:
res.append(msg.locale.t(
"maimai.message.song.sd",
"maimai.message.chart.sd",
diff='Utage',
level=level,
ds=ds,
Expand All @@ -298,7 +298,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
charter=chartL['charter']))
else:
res.append(msg.locale.t(
"maimai.message.song.dx",
"maimai.message.chart.dx",
diff='Utage',
level=level,
ds=ds,
Expand All @@ -315,7 +315,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
level = music['level'][diff]
if len(chart['notes']) == 4:
res.append(msg.locale.t(
"maimai.message.song.sd",
"maimai.message.chart.sd",
diff=diff_list[diff],
level=level,
ds=ds,
Expand All @@ -326,7 +326,7 @@ async def _(msg: Bot.MessageSession, id_or_alias: str):
charter=chart['charter']))
else:
res.append(msg.locale.t(
"maimai.message.song.dx",
"maimai.message.chart.dx",
diff=diff_list[diff],
level=level,
ds=ds,
Expand Down
3 changes: 1 addition & 2 deletions modules/maimai/regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ async def _(msg: Bot.MessageSession):
for sid in sorted(sid_list, key=int):
s = (await total_list.get()).by_id(sid)
res += f"{s['id']} - {s['title']}{' (DX)' if s['type'] == 'DX' else ''}\n"
res += msg.locale.t("maimai.message.song.prompt", prefix=msg.prefixes[0])
await msg.finish(res)
await msg.finish(res.strip())
else:
sid = str(sid_list[0])
music = (await total_list.get()).by_id(sid)
Expand Down

0 comments on commit 5ef8aa4

Please sign in to comment.