From 52063fe05f82ac6bbedd9c31e4b32cec261e1e29 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 25 Nov 2025 00:32:32 +0000 Subject: [PATCH] Fix some messages that should use plural forms. --- language/anope.en_US.po | 16 ++++++++++------ modules/nickserv/ns_ajoin.cpp | 6 ++++-- modules/nickserv/ns_cert.cpp | 5 +++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/language/anope.en_US.po b/language/anope.en_US.po index 19971f761..d13d8a325 100644 --- a/language/anope.en_US.po +++ b/language/anope.en_US.po @@ -16,8 +16,8 @@ msgid "" msgstr "" "Project-Id-Version: Anope\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-25 00:05+0000\n" -"PO-Revision-Date: 2025-11-25 00:05+0000\n" +"POT-Creation-Date: 2025-11-25 00:31+0000\n" +"PO-Revision-Date: 2025-11-25 00:32+0000\n" "Last-Translator: Sadie Powell \n" "Language-Team: English\n" "Language: en_US\n" @@ -5468,12 +5468,16 @@ msgid "The mask must contain at least one non wildcard character." msgstr "" #, c-format -msgid "The maximum of %d auto join entries has been reached." -msgstr "" +msgid "The maximum of %u auto join entry has been reached." +msgid_plural "The maximum of %u auto join entries has been reached." +msgstr[0] "" +msgstr[1] "" #, c-format -msgid "The maximum of %d certificate entries has been reached." -msgstr "" +msgid "The maximum of %u certificate entry has been reached." +msgid_plural "The maximum of %u certificate entries has been reached." +msgstr[0] "" +msgstr[1] "" #, c-format msgid "The memo ignore list for %s is full." diff --git a/modules/nickserv/ns_ajoin.cpp b/modules/nickserv/ns_ajoin.cpp index dcfdfb814..3836235a6 100644 --- a/modules/nickserv/ns_ajoin.cpp +++ b/modules/nickserv/ns_ajoin.cpp @@ -140,6 +140,7 @@ class CommandNSAJoin final void DoAdd(CommandSource &source, NickCore *nc, const Anope::string &chans, const Anope::string &keys) { + const auto ajoinmax = Config->GetModule(this->owner).Get("ajoinmax"); AJoinList *channels = nc->Require("ajoinlist"); Anope::string addedchans; @@ -156,9 +157,10 @@ class CommandNSAJoin final if ((*channels)->at(i)->channel.equals_ci(chan)) break; - if ((*channels)->size() >= Config->GetModule(this->owner).Get("ajoinmax")) + if ((*channels)->size() >= ajoinmax) { - source.Reply(_("The maximum of %d auto join entries has been reached."), Config->GetModule(this->owner).Get("ajoinmax")); + source.Reply(ajoinmax, N_("The maximum of %u auto join entry has been reached.", "The maximum of %u auto join entries has been reached."), + ajoinmax); return; } else if (i != (*channels)->size()) diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index ff85469f5..4f6feaa61 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -210,11 +210,12 @@ private: void DoAdd(CommandSource &source, NickCore *nc, Anope::string certfp) { auto *cl = nc->Require(NICKSERV_CERT_EXT); - unsigned max = Config->GetModule(this->owner).Get("max", "5"); + const auto max = Config->GetModule(this->owner).Get("max", "5"); if (cl->GetCertCount() >= max) { - source.Reply(_("The maximum of %d certificate entries has been reached."), max); + source.Reply(max, N_("The maximum of %u certificate entry has been reached.", "The maximum of %u certificate entries has been reached."), + max); return; }