Counts read in the singular for one thing; parts build two-count messages (R2.11)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 03:07:13 -04:00
1 parent d4c5f90c87
commit 6f90a7dc53
22 files changed
+130 -49

No files matched your search

+2 -1
View File
@@ -95,9 +95,10 @@ impl Tree {
Ask::Force { repo, plan } => {
let lost = match plan.lost.len() {
0 => label("tree.force.nothing"),
n => text(
n => ely_ui::i18n::counted(
cx,
"tree.force.lost",
n as u64,
&[("n", &n.to_string()), ("commits", &plan.lost.join("\n"))],
),
};
+2 -2
View File
@@ -101,8 +101,8 @@ impl Tree {
};
let lines = (!shown.picked.is_empty() && self.partial(shown)).then(|| {
let this = this.clone();
let n = shown.picked.len().to_string();
Button::new("tree-lines", text(cx, key, &[("n", &n)]))
let n = shown.picked.len();
Button::new("tree-lines", ely_ui::i18n::counted(cx, key, n as u64, &[("n", &n.to_string())]))
.variant(ButtonVariant::Primary)
.size(ControlSize::Sm)
.on_click(move |_, _, cx| {
+2 -1
View File
@@ -205,9 +205,10 @@ impl Tree {
let short = |oid: &str| oid[..oid.len().min(7)].to_string();
let left = match plan.left.len() {
0 => label("tree.move.nothing"),
n => text(
n => ely_ui::i18n::counted(
cx,
"tree.move.left",
n as u64,
&[("n", &n.to_string()), ("commits", &plan.left.join("\n"))],
),
};
+1 -1
View File
@@ -213,7 +213,7 @@ impl Tree {
0 => (IconName::CircleCheck, text(cx, "tree.clean", &[])),
n => (
IconName::GitBranch,
text(cx, "tree.changed", &[("n", &n.to_string())]),
ely_ui::i18n::counted(cx, "tree.changed", n as u64, &[("n", &n.to_string())]),
),
};
EmptyState::new(("tree-summary", opened.id), icon, title).into_any_element()