Skip to content

Commit

Permalink
feat(votebox): shorten voted
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Oct 13, 2024
1 parent 3646b33 commit 02b6be2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Widgets/VoteBox.vala
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,17 @@ public class Tuba.Widgets.VoteBox : Gtk.Box {
row_number++;
}

string voted_string = Tuba.Units.shorten (poll.votes_count);
if (poll.expires_at != null) {
info_label.label = "%s · %s".printf (
// translators: the variable is the amount of people that voted
_("%lld voted").printf (poll.votes_count),
_("%s voted").printf (voted_string),
poll.expired
? DateTime.humanize_ago (poll.expires_at)
: DateTime.humanize_left (poll.expires_at)
);
} else {
info_label.label = _("%lld voted").printf (poll.votes_count);
info_label.label = _("%s voted").printf (voted_string);
}

update_aria ();
Expand Down

0 comments on commit 02b6be2

Please sign in to comment.