Archived
1
0
Fork 0

Update locale

This commit is contained in:
多羅狼 2023-12-14 19:39:37 +08:00 committed by GitHub
parent 448b32eddd
commit b34297eba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 12 deletions

View file

@ -119,19 +119,19 @@
中文弯引号和英文弯引号属于同一个字符,如果使用弯引号反而会造成阅读问题,请使用直引号 `"`
正确:
>
> "Success is not final, failure is not fatal: It is the courage to continue that counts."
错误:
>
> “Success is not final, failure is not fatal: It is the courage to continue that counts.”
### 英文省略号使用三个点
同上,请使用三个点 `...`
正确:
>
> In the serene moonlit night, whispers of ancient tales lingered, echoing through the stillness of time...
错误:
>
> In the serene moonlit night, whispers of ancient tales lingered, echoing through the stillness of time…
## 全角和半角
### 使用全角中文标点
@ -143,8 +143,6 @@
>
> 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎!
例外:如果括号内为没有中文且难以多语言化,则可以使用半角括号。
### 数字和英文使用半角字符
正确:
> 这件蛋糕只卖 1000 元。

View file

@ -158,9 +158,9 @@ class MessageSession(MessageSessionT):
ftime_template.append(self.locale.t("time.time.nosec.format"))
if timezone:
if self._tz_offset == "+0":
ftime_template.append(f"(UTC)")
ftime_template.append(self.locale.t("message.brackets", msg="UTC"))
else:
ftime_template.append(f"(UTC{self._tz_offset})")
ftime_template.append(self.locale.t("message.brackets", msg=f"UTC{self._tz_offset}"))
return (datetime.utcfromtimestamp(timestamp) + self.timezone_offset).strftime(' '.join(ftime_template))

View file

@ -35,6 +35,7 @@
"game.message.stop.none": "This game is not in progress.",
"i18n.prompt.fallback.failed": "(If you're seeing this strange string, it means something we've messed up!\nPlease send the issue back to\n${url}\nso that we can fix it in time.)",
"language": "English",
"message.brackets": " (${msg})",
"message.collapse": "...show only the first ${amount} items.",
"message.cooldown": "${time} second(s) have passed since the last execution. The cooldown time of this command are ${cd_time} second(s).",
"message.delimiter": ", ",

View file

@ -35,13 +35,14 @@
"game.message.stop.none": "当前此游戏未在进行。",
"i18n.prompt.fallback.failed": "(如果你看到了这条奇怪的字符串,说明我们又搞错了什么东西!\n请将问题反馈至\n${url}\n以便我们快速解决此问题。",
"language": "简体中文",
"message.brackets": "${msg}",
"message.collapse": "……仅显示前 ${amount} 条内容。",
"message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 ${cd_time} 秒。",
"message.delimiter": "、",
"message.end": "。",
"message.reply.prompt": "(请使用指定的词语回复本条消息)",
"message.wait.confirm.prompt.type1": "(发送“是”或符合确认条件的词语来确认)",
"message.wait.confirm.prompt.type2": "(发送符合条件的词语来确认)",
"message.collapse": "……仅显示前 ${amount} 条内容。",
"no": "否",
"none": "无",
"parser.admin.module.permission.denied": "“${module}”模块下的命令仅能被该群组的管理员所使用,请联系管理员执行此命令。",
@ -59,8 +60,8 @@
"petal.message.lost.limit": "(本日失去花瓣已达到每日上限。)",
"petal.message.lost.success": "失去了 ${amount} 片花瓣。",
"success": "成功。",
"time.date.iso.format": "%Y-%m-%d",
"time.date.format": "%Y 年 %m 月 %d 日",
"time.date.iso.format": "%Y-%m-%d",
"time.time.format": "%H:%M:%S",
"time.time.nosec.format": "%H:%M",
"tos.reason": "具体原因:",
@ -75,4 +76,4 @@
"tos.warning.last": "这是最后一次警告。",
"unknown": "未知",
"yes": "是"
}
}

View file

@ -35,6 +35,7 @@
"game.message.stop.none": "目前此遊戲沒有在進行。",
"i18n.prompt.fallback.failed": "(如果你看到了這條奇怪的字串,說明我們又搞錯了什麼!\n請將問題回報至\n${url}\n以便我們快速解決此問題。",
"language": "繁體中文",
"message.brackets": "${msg}",
"message.collapse": "……僅顯示前 ${amount} 條內容。",
"message.cooldown": "距上次執行已過去 ${time} 秒,此指令的冷卻時間為 ${cd_time} 秒。",
"message.delimiter": "、",

View file

@ -22,7 +22,7 @@ async def get_info(msg: Bot.MessageSession, url, get_detail):
time = msg.ts2strftime(view['ctime'], timezone=False)
if len(view['pages']) > 1:
pages = f" ({len(view['pages'])}P)"
pages = msg.locale.t("message.brackets", msg=f"{len(view['pages'])}P")
else:
pages = ''