From d174b5aad6bbbee2aefb9195c0381b78a0767b74 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 2 Jan 2022 17:32:14 -0500 Subject: [PATCH] add disambiguating numbers in translated strings --- irc/accounts.go | 2 +- irc/handlers.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/accounts.go b/irc/accounts.go index 488af3fc..7f3d81da 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -1103,7 +1103,7 @@ func (am *AccountManager) NsSendpass(client *Client, accountName string) (err er subject := fmt.Sprintf(client.t("Reset your password on %s"), am.server.name) message := email.ComposeMail(config.Accounts.Registration.EmailVerification, account.Settings.Email, subject) - fmt.Fprintf(&message, client.t("We received a request to reset your password on %s for account: %s"), am.server.name, account.Name) + fmt.Fprintf(&message, client.t("We received a request to reset your password on %[1]s for account: %[2]s"), am.server.name, account.Name) message.WriteString("\r\n") fmt.Fprintf(&message, client.t("If you did not initiate this request, you can safely ignore this message.")) message.WriteString("\r\n") diff --git a/irc/handlers.go b/irc/handlers.go index 385605cd..35c3f514 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -3560,7 +3560,7 @@ func zncHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response func unknownCommandHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool { var message string if strings.HasPrefix(msg.Command, "/") { - message = fmt.Sprintf(client.t("Unknown command; if you are using /QUOTE, the correct syntax is /QUOTE %s, not /QUOTE %s"), + message = fmt.Sprintf(client.t("Unknown command; if you are using /QUOTE, the correct syntax is /QUOTE %[1]s, not /QUOTE %[2]s"), strings.TrimPrefix(msg.Command, "/"), msg.Command) } else { message = client.t("Unknown command")