Translate finished messages by template and the world clock, Dropbox and scoped titles at display

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 22:07:19 -04:00
1 parent 2b2302a279
commit f63ecb6697
13 files changed
+139 -28

No files matched your search

+4
View File
@@ -13,4 +13,8 @@ QtObject {
function trMatch(text, templates) {
return Tr.trMatch(text, templates)
}
function trMessage(text) {
return Tr.trMessage(text)
}
}
+78 -1
View File
@@ -97,6 +97,15 @@ var table = {
"Limits paused": "额度已暂停",
"Sign-in expired": "登录已过期",
"Waiting for auth": "等待认证",
"Anthropic's usage endpoint is rate limiting checks right now (retry after %1s). Local Claude Code stats are still shown.": "Anthropic 用量接口正在限制查询频率(%1 秒后重试)。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint returned status %1. Local Claude Code stats are still shown.": "Anthropic 用量接口返回状态 %1。仍显示本地 Claude Code 统计。",
"Claude Code's access token has lapsed — showing the last known limits. Start Claude Code to refresh it; signing in again is not needed.": "Claude Code 的访问令牌已过期,显示上次的额度。启动 Claude Code 即可刷新,不需要重新登录。",
"Claude Code's access token has lapsed. Start Claude Code to refresh it; signing in again is not needed.": "Claude Code 的访问令牌已过期。启动 Claude Code 即可刷新,不需要重新登录。",
"Claude Code's saved sign-in expired — showing the last known limits. Start Claude Code, or run `claude auth login`, to refresh it.": "Claude Code 保存的登录已过期,显示上次的额度。启动 Claude Code 或运行 `claude auth login` 刷新。",
"Claude Code's saved sign-in expired. Start Claude Code, or run `claude auth login`, to refresh it.": "Claude Code 保存的登录已过期。启动 Claude Code 或运行 `claude auth login` 刷新。",
"Couldn't reach Anthropic's usage endpoint. Retrying shortly. Local Claude Code stats are still shown.": "无法连接 Anthropic 用量接口,稍后重试。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint returned no limits. Local Claude Code stats are still shown.": "Anthropic 用量接口没有返回额度。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint is rate limiting checks right now. Local Claude Code stats are still shown.": "Anthropic 用量接口正在限制查询频率。仍显示本地 Claude Code 统计。",
// Network panel
"Wiring bits": "接线中",
"Handling packets": "处理数据包",
@@ -317,6 +326,21 @@ var table = {
"Start the authentication flow": "开始认证",
"Install Dropbox from the service menu": "从服务菜单安装 Dropbox",
"Untitled": "未命名",
"%1 of %2": "%1 / %2",
"Just now": "刚刚",
"Unknown time": "时间未知",
"%1mo ago": "%1个月前",
"%1m ago": "%1分钟前",
"%1h ago": "%1小时前",
"%1d ago": "%1天前",
"%1y ago": "%1年前",
"Starting Dropbox login…": "正在开始 Dropbox 登录…",
"Opened Dropbox login": "已打开 Dropbox 登录",
"Failed to read Dropbox status": "无法读取 Dropbox 状态",
"Could not read Dropbox status": "无法读取 Dropbox 状态",
"Dropbox login failed": "Dropbox 登录失败",
"Dropbox command failed": "Dropbox 命令失败",
"Failed to parse Dropbox status": "无法解析 Dropbox 状态",
// Weather panel
"Search city": "搜索城市",
"FEELS": "体感",
@@ -451,6 +475,23 @@ var table = {
"Voxtype Dictation Ready": "Voxtype 语音输入就绪",
"Web app removed": "网页应用已移除",
"Windows VM": "Windows 虚拟机",
"Battery is down to %1%": "电量降到 %1%",
"Could not send to %1": "无法发送给 %1",
"Couldn't add the %1 account": "无法添加 %1 账户",
"Mirroring enabled (%1)": "已开启镜像(%1)",
"New %1 sessions now use %2": "新的 %1 会话现在使用 %2",
"No plugin to %1": "没有插件可以%1",
"No saved width found for %1 on workspace %2": "工作区 %2 没有为 %1 保存的宽度",
"Saved width for %1 on workspace %2": "已为工作区 %2 的 %1 保存宽度",
"Screen recording directory does not exist: %1": "录屏目录不存在:%1",
"Sent to %1": "已发送给 %1",
"Timezone is now set to %1": "时区已设为 %1",
"Transcoded to %1 %2": "已转码为 %1 %2",
"Workspace layout set to %1": "工作区布局已设为 %1",
"%1 is now the default browser": "%1 现在是默认浏览器",
"%1 is now the default editor": "%1 现在是默认编辑器",
"%1 is now the default terminal": "%1 现在是默认终端",
"%1 installed": "%1 已安装",
// Clock
"Right-click to toggle format": "右键切换格式",
"Back to today": "回到今天",
@@ -483,7 +524,43 @@ var table = {
"Jump to a city": "跳到一个城市",
"Add a city": "添加城市",
"Loading zones…": "正在加载时区…",
"Tomorrow": "明天",
"Yesterday": "昨天",
" in %1": "(%1)",
"Loading cities…": "正在加载城市…",
// Media
"Pause": "暂停",
"Play": "播放"
"Play": "播放",
"Next": "下一首",
"Previous": "上一首"
}
// Parameterized messages that arrive finished; trMessage matches them, so each needs a table entry above.
var templates = [
"Battery is down to %1%",
"Could not send to %1",
"Couldn't add the %1 account",
"Mirroring enabled (%1)",
"New %1 sessions now use %2",
"No plugin to %1",
"No saved width found for %1 on workspace %2",
"Saved width for %1 on workspace %2",
"Screen recording directory does not exist: %1",
"Sent to %1",
"Timezone is now set to %1",
"Transcoded to %1 %2",
"Workspace layout set to %1",
"%1 is now the default browser",
"%1 is now the default editor",
"%1 is now the default terminal",
"%1 installed",
"Anthropic's usage endpoint is rate limiting checks right now (retry after %1s). Local Claude Code stats are still shown.",
"Anthropic's usage endpoint returned status %1. Local Claude Code stats are still shown.",
"Installing the %1 CLI…",
"Sign in to %1 again in the browser window that opens.",
"Sign in to %1 in the browser window that opens.",
"Signed in to %1 again.",
"Signed in to %1.",
"The %1 sign-in didn't finish.",
"Added %1."
]
+5
View File
@@ -22,3 +22,8 @@ function trMatch(text, templates) {
}
return tr(text)
}
// Finished messages from other programs (notifications, collectors) that carry a name or number.
function trMessage(text) {
return trMatch(text, Zh.templates)
}