Fix: Remove plural default in Po Gets #8

This commit is contained in:
Leonel Quinteros
2017-07-05 18:40:45 -03:00
parent b8456329aa
commit cabefc2786
2 changed files with 16 additions and 2 deletions

8
po.go
View File

@@ -432,7 +432,9 @@ func (po *Po) GetN(str, plural string, n int, vars ...interface{}) string {
}
}
// Return the plural string we received by default
if n == 1 {
return fmt.Sprintf(str, vars...)
}
return fmt.Sprintf(plural, vars...)
}
@@ -474,6 +476,8 @@ func (po *Po) GetNC(str, plural string, n int, ctx string, vars ...interface{})
}
}
// Return the plural string we received by default
if n == 1 {
return fmt.Sprintf(str, vars...)
}
return fmt.Sprintf(plural, vars...)
}