mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
refactor: remove tr_strip_positional_args() (#2881)
* refactor: use fmt in gtk/SystemIconTray * refactor: use fmt in gtk/MakeDialog * refactor: remove unused tr_strip_positional_args() Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
This commit is contained in:
@@ -413,7 +413,7 @@ void updateBlocklistText(Gtk::Label* w, Glib::RefPtr<Session> const& core)
|
||||
{
|
||||
int const n = tr_blocklistGetRuleCount(core->get_session());
|
||||
auto const msg = fmt::format(
|
||||
ngettext("Blocklist has {count} entry", "Blocklist has {count} entries", n),
|
||||
ngettext("Blocklist has {count:L} entry", "Blocklist has {count:L} entries", n),
|
||||
fmt::arg("count", n));
|
||||
w->set_markup(fmt::format(FMT_STRING("<i>{:s}</i>"), msg));
|
||||
}
|
||||
@@ -441,7 +441,7 @@ void onBlocklistUpdated(Glib::RefPtr<Session> const& core, int n, blocklist_data
|
||||
bool const success = n >= 0;
|
||||
int const count = n >= 0 ? n : tr_blocklistGetRuleCount(core->get_session());
|
||||
auto const msg = fmt::format(
|
||||
ngettext("Blocklist has {count} entry", "Blocklist has {count} entries", count),
|
||||
ngettext("Blocklist has {count:L} entry", "Blocklist has {count:L} entries", count),
|
||||
fmt::arg("count", count));
|
||||
data->updateBlocklistButton->set_sensitive(true);
|
||||
data->updateBlocklistDialog->set_message(
|
||||
|
||||
Reference in New Issue
Block a user