fix(i18n): 连接/订阅动作按钮改用动词键,英文界面不再显示复数名词
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
"common.retry": "Retry"
|
||||
"common.save": "Save"
|
||||
"common.send": "Send"
|
||||
"common.subscribe": "Subscribe"
|
||||
"common.text": "Text"
|
||||
"common.update": "Update"
|
||||
"connview.logs": "Logs"
|
||||
@@ -285,6 +286,7 @@
|
||||
"settings.theme_preset": "Theme preset"
|
||||
"settings.version_line": "Version {v} (update source: {src})"
|
||||
"sidebar.collapse": "Collapse sidebar (Ctrl+B)"
|
||||
"sidebar.connect": "Connect"
|
||||
"sidebar.connections": "Connections"
|
||||
"sidebar.delete": "Delete Connection"
|
||||
"sidebar.delete_confirm": "Delete \"{name}\"? This also deletes {sub_count} subscriptions and disconnects. This cannot be undone."
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
"common.retry": "重试"
|
||||
"common.save": "保存"
|
||||
"common.send": "发送"
|
||||
"common.subscribe": "订阅"
|
||||
"common.text": "文本"
|
||||
"common.update": "更新"
|
||||
"connview.logs": "日志"
|
||||
@@ -285,6 +286,7 @@
|
||||
"settings.theme_preset": "主题预设"
|
||||
"settings.version_line": "版本 {v}(更新源 {src})"
|
||||
"sidebar.collapse": "收起侧栏(Ctrl+B)"
|
||||
"sidebar.connect": "连接"
|
||||
"sidebar.connections": "连接"
|
||||
"sidebar.delete": "删除连接"
|
||||
"sidebar.delete_confirm": "确定删除「{name}」?将同时删除 {sub_count} 个订阅,并断开当前连接,此操作不可撤销。"
|
||||
|
||||
@@ -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 })
|
||||
.ghost()
|
||||
.xsmall()
|
||||
.tooltip(if connected { i18n::t("sidebar.disconnect") } else { i18n::t("sidebar.connections") })
|
||||
.accessibility_label(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.connect") })
|
||||
.on_click(cx.listener(move |this, _, _, _| {
|
||||
this.toggle_connection(&cfg);
|
||||
}))
|
||||
|
||||
@@ -96,7 +96,7 @@ pub(super) fn render_top_bar(&self, cx: &mut Context<Self>) -> impl IntoElement
|
||||
} else if connecting {
|
||||
i18n::t("status.connecting")
|
||||
} else {
|
||||
i18n::t("sidebar.connections")
|
||||
i18n::t("sidebar.connect")
|
||||
})
|
||||
.when(connected, |b| b.danger().ghost())
|
||||
.when(!connected, |b| b.primary().ghost())
|
||||
|
||||
@@ -418,7 +418,7 @@ pub(super) fn render_subscribe_bar(&mut self, cx: &mut Context<Self>) -> impl In
|
||||
.child(
|
||||
Button::new(SharedString::from(format!("subscribe-{}", self.conn_id)))
|
||||
.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 区分
|
||||
.when(editing, |b| b.warning())
|
||||
.when(!editing, |b| b.primary())
|
||||
|
||||
Reference in New Issue
Block a user