Fix translation assistance message

This commit is contained in:
Trevor Slocum 2024-08-21 10:58:58 -07:00
parent 6ee19cf45d
commit 591a96d2e5

View file

@ -202,16 +202,21 @@ func (s *server) handleFirstCommand(cmd serverCommand, keyword string, params []
s.sendMOTD(cmd.client)
// Request translation assistance from international users.
var found bool
for _, language := range translatedLanguages {
if language == cmd.client.language {
found = true
break
if strings.HasPrefix(cmd.client.language, "bgammon-") {
clientLanguage := cmd.client.language[8:]
if clientLanguage != "" {
var found bool
for _, language := range translatedLanguages {
if language == clientLanguage {
found = true
break
}
}
if !found {
cmd.client.sendNotice("Help translate this application into your preferred language at bgammon.org/translate")
}
}
}
if !found {
cmd.client.sendNotice("Help translate this application into your preferred language at bgammon.org/translate")
}
c := cmd.client
if c.accountID != 0 {