From bd822853bc657013b7f41e45837067a563d4edb2 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 30 Dec 2019 12:44:07 -0500 Subject: [PATCH] fix some translation warnings --- irc/chanserv.go | 2 +- irc/modes.go | 8 ++++---- irc/nickserv.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/irc/chanserv.go b/irc/chanserv.go index 106e92b5..6fb748e5 100644 --- a/irc/chanserv.go +++ b/irc/chanserv.go @@ -462,7 +462,7 @@ func sendTransferPendingNotice(server *Server, account, chname string) { break // prefer the login where the nick is the account } } - client.Send(nil, chanservMask, "NOTICE", client.Nick(), fmt.Sprintf(client.t("You have been offered ownership of channel %s. To accept, /CS TRANSFER ACCEPT %s"), chname, chname)) + client.Send(nil, chanservMask, "NOTICE", client.Nick(), fmt.Sprintf(client.t("You have been offered ownership of channel %[1]s. To accept, /CS TRANSFER ACCEPT %[1]s"), chname)) } func processTransferAccept(client *Client, chname string, rb *ResponseBuffer) { diff --git a/irc/modes.go b/irc/modes.go index 4b14869b..f10454b3 100644 --- a/irc/modes.go +++ b/irc/modes.go @@ -179,9 +179,9 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c appliedChange.Arg = maskAdded applied = append(applied, appliedChange) } else if err != nil { - rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %s parameter: %s"), string(change.Mode), mask)) + rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %[1]s parameter: %[2]s"), string(change.Mode), mask)) } else { - rb.Add(nil, client.server.name, ERR_LISTMODEALREADYSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %s list already contains %s"), chname, mask)) + rb.Add(nil, client.server.name, ERR_LISTMODEALREADYSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %[1]s list already contains %[2]s"), chname, mask)) } case modes.Remove: @@ -191,9 +191,9 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c appliedChange.Arg = maskRemoved applied = append(applied, appliedChange) } else if err != nil { - rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %s parameter: %s"), string(change.Mode), mask)) + rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %[1]s parameter: %[2]s"), string(change.Mode), mask)) } else { - rb.Add(nil, client.server.name, ERR_LISTMODENOTSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %s list does not contain %s"), chname, mask)) + rb.Add(nil, client.server.name, ERR_LISTMODENOTSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %[1]s list does not contain %[2]s"), chname, mask)) } } diff --git a/irc/nickserv.go b/irc/nickserv.go index 905e5ef2..ea18ad41 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -43,7 +43,7 @@ const ( nsTimeoutNotice = `This nickname is reserved. Please login within %v (using $b/msg NickServ IDENTIFY $b or SASL), or switch to a different nickname.` ) -const nickservHelp = `NickServ lets you register and log into an account.` +const nickservHelp = `NickServ lets you register, log in to, and manage an account.` var ( nickservCommands = map[string]*serviceCommand{ @@ -927,7 +927,7 @@ func nsCertHandler(server *Server, client *Client, command string, params []stri return } certfps := accountData.Credentials.Certfps - nsNotice(rb, fmt.Sprintf(client.t("There are %d certificate fingerprint(s) authorized for account %s."), len(certfps), accountData.Name)) + nsNotice(rb, fmt.Sprintf(client.t("There are %[1]d certificate fingerprint(s) authorized for account %[2]s."), len(certfps), accountData.Name)) for i, certfp := range certfps { nsNotice(rb, fmt.Sprintf("%d: %s", i+1, certfp)) }