Make golint happy
This commit is contained in:
parent
520de6b223
commit
9a30bf7f45
1 changed files with 6 additions and 6 deletions
12
po.go
12
po.go
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
type translation struct {
|
||||
id string
|
||||
pluralId string
|
||||
pluralID string
|
||||
trs map[int]string
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ func (t *translation) getN(n int) string {
|
|||
}
|
||||
|
||||
// Return unstranlated plural by default
|
||||
return t.pluralId
|
||||
return t.pluralID
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -200,7 +200,7 @@ func (po *Po) Parse(str string) {
|
|||
|
||||
// Check for plural form
|
||||
if strings.HasPrefix(l, "msgid_plural") {
|
||||
tr.pluralId, _ = strconv.Unquote(strings.TrimSpace(strings.TrimPrefix(l, "msgid_plural")))
|
||||
tr.pluralID, _ = strconv.Unquote(strings.TrimSpace(strings.TrimPrefix(l, "msgid_plural")))
|
||||
|
||||
// Loop
|
||||
continue
|
||||
|
@ -340,9 +340,9 @@ func (po *Po) pluralForm(n int) int {
|
|||
if plural.Type().Name() == "bool" {
|
||||
if plural.Bool() {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
// Else
|
||||
return 0
|
||||
}
|
||||
|
||||
if int(plural.Int()) > po.nplurals {
|
||||
|
|
Loading…
Reference in a new issue