Make golint happy
This commit is contained in:
12
po.go
12
po.go
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
type translation struct {
|
type translation struct {
|
||||||
id string
|
id string
|
||||||
pluralId string
|
pluralID string
|
||||||
trs map[int]string
|
trs map[int]string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ func (t *translation) getN(n int) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return unstranlated plural by default
|
// 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
|
// Check for plural form
|
||||||
if strings.HasPrefix(l, "msgid_plural") {
|
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
|
// Loop
|
||||||
continue
|
continue
|
||||||
@@ -340,9 +340,9 @@ func (po *Po) pluralForm(n int) int {
|
|||||||
if plural.Type().Name() == "bool" {
|
if plural.Type().Name() == "bool" {
|
||||||
if plural.Bool() {
|
if plural.Bool() {
|
||||||
return 1
|
return 1
|
||||||
} else {
|
}
|
||||||
return 0
|
// Else
|
||||||
}
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if int(plural.Int()) > po.nplurals {
|
if int(plural.Int()) > po.nplurals {
|
||||||
|
|||||||
Reference in New Issue
Block a user