This repository has been archived on 2025-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
chkbit/cmd/chkbit/util/lang.go
Christian Zangl b3c7aeed4c
refactor
2024-08-16 23:10:58 +02:00

20 lines
292 B
Go

package util
import "fmt"
func LangNum1MutateSuffix(num int, u string) string {
s := ""
if num != 1 {
s = "s"
}
return fmt.Sprintf("%d %s%s", num, u, s)
}
func LangNum1Choice(num int, u1, u2 string) string {
u := u1
if num != 1 {
u = u2
}
return fmt.Sprintf("%d %s", num, u)
}