Translate every Omarchy notification and the remaining prompts, matching templates longest first

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 22:16:55 -04:00
1 parent f63ecb6697
commit 619979a716
6 files changed
+89 -25

No files matched your search

+84 -20
View File
@@ -492,6 +492,45 @@ var table = {
"%1 is now the default editor": "%1 现在是默认编辑器",
"%1 is now the default terminal": "%1 现在是默认终端",
"%1 installed": "%1 已安装",
"Screen recording saved": "录屏已保存",
"Open with Super + Alt + , (or click this)": "用 Super + Alt + , 打开(或点击这里)",
"Download complete": "下载完成",
"Restart Foot to apply the new terminal font size": "重启 Foot 以应用新的终端字号",
"You must restart Ghostty to see font change": "需要重启 Ghostty 才能看到字体变化",
"You must restart Foot to see font change": "需要重启 Foot 才能看到字体变化",
"Pending Omarchy Migrations": "有待运行的 Omarchy 迁移",
"Click to run 1 pending migration.": "点击运行 1 个待运行的迁移。",
"Editing Cloned Plugin": "正在编辑克隆的插件",
"Original plugin has been replace by clone.": "原插件已被克隆替换。",
"Click to diagnose with AI": "点击用 AI 诊断",
"Screen did not lock before suspend": "挂起前屏幕没有锁定",
"Taildrop transfer failed": "Taildrop 传输失败",
"Setup Fingerprint Reader": "设置指纹识别器",
"Enable sudo and unlocking with your fingerprint.": "用指纹进行 sudo 和解锁。",
"Set your default agent": "设置默认 AI 代理",
"Let your favorite agent help with Omarchy.": "让你喜欢的 AI 代理帮你使用 Omarchy。",
"Install Dictation with Voxtype": "安装 Voxtype 语音输入",
"Click to install voice dictation for Omarchy.": "点击为 Omarchy 安装语音输入。",
"All %1 accounts are over %2%": "所有 %1 账户都超过 %2%",
"Staying on %1. %2 resets in %3.": "继续使用 %1。%2 将在 %3 后重置。",
"Staying on %1.": "继续使用 %1。",
"%1 is at %2% of a %3 limit": "%1 已用到 %3 额度的 %2%",
"New %1 sessions now use %2 (%3%). Running sessions stay on %4.": "新的 %1 会话现在使用 %2(%3%)。正在运行的会话仍使用 %4。",
"%1 is at %2%. Click to switch new sessions to it.": "%1 已用到 %2%。点击把新会话切换到它。",
"Running sessions stay on %1.": "正在运行的会话仍使用 %1。",
"Click to run %1 pending migrations.": "点击运行 %1 个待运行的迁移。",
"Process crashed: %1": "进程崩溃:%1",
"You'll be reminded at %1": "将在 %1 提醒你",
"Reminder set for %1 minutes": "已设置 %1 分钟后的提醒",
"%1 in %2 minutes": "%2 分钟后:%1",
"Received %1": "已收到 %1",
"Saved to %1": "已保存到 %1",
"The session was left unlocked (%1).": "会话没有锁定(%1)。",
"%1 to %2 (%3)": "%1 转为 %2(%3)",
"Battery %1% · Holding at %2 · %3W / %4Wh": "电池 %1% · 保持在 %2 · %3W / %4Wh",
"Battery %1% · %2 to full · %3W / %4Wh": "电池 %1% · %2 后充满 · %3W / %4Wh",
"Battery %1% · %2 left · %3W / %4Wh": "电池 %1% · 剩余 %2 · %3W / %4Wh",
"%1 · %2 · Week %3": "%1 · %2 · 第 %3 周",
// Clock
"Right-click to toggle format": "右键切换格式",
"Back to today": "回到今天",
@@ -501,6 +540,7 @@ var table = {
"Start weeks on %1": "每周从%1开始",
"Previous month": "上个月",
"Next month": "下个月",
"year": "年份",
// Menu
"Go": "前往",
"Input": "输入",
@@ -528,6 +568,10 @@ var table = {
"Yesterday": "昨天",
" in %1": "(%1)",
"Loading cities…": "正在加载城市…",
"Search clipboard…": "搜索剪贴板…",
"Search emojis…": "搜索表情…",
"+%1 days": "%1 天后",
"%1 days": "%1 天",
// Media
"Pause": "暂停",
"Play": "播放",
@@ -537,30 +581,50 @@ var table = {
// 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…",
"New %1 sessions now use %2 (%3%). Running sessions stay on %4.",
"Sign in to %1 again in the browser window that opens.",
"%1 is at %2%. Click to switch new sessions to it.",
"Sign in to %1 in the browser window that opens.",
"Signed in to %1 again.",
"Signed in to %1.",
"Screen recording directory does not exist: %1",
"Battery %1% · Holding at %2 · %3W / %4Wh",
"No saved width found for %1 on workspace %2",
"Battery %1% · %2 to full · %3W / %4Wh",
"Battery %1% · %2 left · %3W / %4Wh",
"Click to run %1 pending migrations.",
"The session was left unlocked (%1).",
"Saved width for %1 on workspace %2",
"Staying on %1. %2 resets in %3.",
"%1 is now the default terminal",
"%1 is now the default browser",
"The %1 sign-in didn't finish.",
"%1 is now the default editor",
"All %1 accounts are over %2%",
"Running sessions stay on %1.",
"Couldn't add the %1 account",
"Reminder set for %1 minutes",
"New %1 sessions now use %2",
"Workspace layout set to %1",
"%1 is at %2% of a %3 limit",
"Timezone is now set to %1",
"You'll be reminded at %1",
"Battery is down to %1%",
"Mirroring enabled (%1)",
"Installing the %1 CLI…",
"Signed in to %1 again.",
"%1 · %2 · Week %3",
"Could not send to %1",
"Transcoded to %1 %2",
"Process crashed: %1",
"Signed in to %1.",
"%1 in %2 minutes",
"No plugin to %1",
"Staying on %1.",
"%1 to %2 (%3)",
"%1 installed",
"Received %1",
"Saved to %1",
"Sent to %1",
"Added %1."
]
+1 -1
View File
@@ -16,7 +16,7 @@ function tr(text) {
// Text built elsewhere around a name: the first English template that matches is translated with what %1.. captured.
function trMatch(text, templates) {
for (var i = 0; i < templates.length; i++) {
var pattern = "^" + templates[i].replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%\d/g, "(.+?)") + "$"
var pattern = "^" + templates[i].replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%\d/g, "(.+)") + "$"
var match = String(text).match(new RegExp(pattern))
if (match) return tr.apply(null, [templates[i]].concat(match.slice(1)))
}
+1 -1
View File
@@ -431,7 +431,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: root.filterText || "Search clipboard…"
text: root.filterText || I18n.tr("Search clipboard…")
color: root.foreground
opacity: root.filterText ? 1 : 0.58
font.family: root.fontFamily
+1 -1
View File
@@ -246,7 +246,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: root.filterText || "Search emojis…"
text: root.filterText || I18n.tr("Search emojis…")
color: root.foreground
opacity: root.filterText ? 1 : 0.58
font.family: root.fontFamily
+1 -1
View File
@@ -381,7 +381,7 @@ Panel {
id: bornField
width: Style.space(70)
anchors.verticalCenter: parent.verticalCenter
placeholderText: "year"
placeholderText: I18n.tr("year")
foreground: root.contentForeground
font.family: root.contentFontFamily
inputMethodHints: Qt.ImhDigitsOnly
+1 -1
View File
@@ -243,7 +243,7 @@ Rectangle {
}
Caption {
text: row.ready ? I18n.tr(row.rowData.dayLabel) : ""
text: row.ready ? I18n.trMatch(row.rowData.dayLabel, ["Tomorrow", "Yesterday", "+%1 days", "%1 days"]) : ""
visible: text !== ""
}
}