fix(i18n): 连接/订阅动作按钮改用动词键,英文界面不再显示复数名词

This commit is contained in:
2026-10-14 18:43:07 +08:00
parent 60501b6465
commit 6d63b93f20
5 changed files with 8 additions and 4 deletions
+2
View File
@@ -53,6 +53,7 @@
"common.retry": "Retry" "common.retry": "Retry"
"common.save": "Save" "common.save": "Save"
"common.send": "Send" "common.send": "Send"
"common.subscribe": "Subscribe"
"common.text": "Text" "common.text": "Text"
"common.update": "Update" "common.update": "Update"
"connview.logs": "Logs" "connview.logs": "Logs"
@@ -285,6 +286,7 @@
"settings.theme_preset": "Theme preset" "settings.theme_preset": "Theme preset"
"settings.version_line": "Version {v} (update source: {src})" "settings.version_line": "Version {v} (update source: {src})"
"sidebar.collapse": "Collapse sidebar (Ctrl+B)" "sidebar.collapse": "Collapse sidebar (Ctrl+B)"
"sidebar.connect": "Connect"
"sidebar.connections": "Connections" "sidebar.connections": "Connections"
"sidebar.delete": "Delete Connection" "sidebar.delete": "Delete Connection"
"sidebar.delete_confirm": "Delete \"{name}\"? This also deletes {sub_count} subscriptions and disconnects. This cannot be undone." "sidebar.delete_confirm": "Delete \"{name}\"? This also deletes {sub_count} subscriptions and disconnects. This cannot be undone."
+2
View File
@@ -53,6 +53,7 @@
"common.retry": "重试" "common.retry": "重试"
"common.save": "保存" "common.save": "保存"
"common.send": "发送" "common.send": "发送"
"common.subscribe": "订阅"
"common.text": "文本" "common.text": "文本"
"common.update": "更新" "common.update": "更新"
"connview.logs": "日志" "connview.logs": "日志"
@@ -285,6 +286,7 @@
"settings.theme_preset": "主题预设" "settings.theme_preset": "主题预设"
"settings.version_line": "版本 {v}(更新源 {src})" "settings.version_line": "版本 {v}(更新源 {src})"
"sidebar.collapse": "收起侧栏(Ctrl+B)" "sidebar.collapse": "收起侧栏(Ctrl+B)"
"sidebar.connect": "连接"
"sidebar.connections": "连接" "sidebar.connections": "连接"
"sidebar.delete": "删除连接" "sidebar.delete": "删除连接"
"sidebar.delete_confirm": "确定删除「{name}」?将同时删除 {sub_count} 个订阅,并断开当前连接,此操作不可撤销。" "sidebar.delete_confirm": "确定删除「{name}」?将同时删除 {sub_count} 个订阅,并断开当前连接,此操作不可撤销。"
+2 -2
View File
@@ -347,8 +347,8 @@ pub(super) fn render_sidebar(&mut self, _window: &mut Window, cx: &mut Context<S
.icon(if connected { IconName::Square } else { IconName::PlugZap }) .icon(if connected { IconName::Square } else { IconName::PlugZap })
.ghost() .ghost()
.xsmall() .xsmall()
.tooltip(if connected { i18n::t("sidebar.disconnect") } else { i18n::t("sidebar.connections") }) .tooltip(if connected { i18n::t("sidebar.disconnect") } else { i18n::t("sidebar.connect") })
.accessibility_label(if connected { i18n::t("sidebar.disconnect") } else { i18n::t("sidebar.connections") }) .accessibility_label(if connected { i18n::t("sidebar.disconnect") } else { i18n::t("sidebar.connect") })
.on_click(cx.listener(move |this, _, _, _| { .on_click(cx.listener(move |this, _, _, _| {
this.toggle_connection(&cfg); this.toggle_connection(&cfg);
})) }))
+1 -1
View File
@@ -96,7 +96,7 @@ pub(super) fn render_top_bar(&self, cx: &mut Context<Self>) -> impl IntoElement
} else if connecting { } else if connecting {
i18n::t("status.connecting") i18n::t("status.connecting")
} else { } else {
i18n::t("sidebar.connections") i18n::t("sidebar.connect")
}) })
.when(connected, |b| b.danger().ghost()) .when(connected, |b| b.danger().ghost())
.when(!connected, |b| b.primary().ghost()) .when(!connected, |b| b.primary().ghost())
+1 -1
View File
@@ -418,7 +418,7 @@ pub(super) fn render_subscribe_bar(&mut self, cx: &mut Context<Self>) -> impl In
.child( .child(
Button::new(SharedString::from(format!("subscribe-{}", self.conn_id))) Button::new(SharedString::from(format!("subscribe-{}", self.conn_id)))
.icon(if editing { IconName::Check } else { IconName::Plus }) .icon(if editing { IconName::Check } else { IconName::Plus })
.label(if editing { i18n::t("common.update") } else { i18n::t("connview.subscriptions") }) .label(if editing { i18n::t("common.update") } else { i18n::t("common.subscribe") })
// 编辑用 warning 色与新增的 primary 区分 // 编辑用 warning 色与新增的 primary 区分
.when(editing, |b| b.warning()) .when(editing, |b| b.warning())
.when(!editing, |b| b.primary()) .when(!editing, |b| b.primary())