mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
test(locale): increase test coverage to 100%
This commit is contained in:
parent
e7b98afdbe
commit
f860daef7f
4 changed files with 699 additions and 62 deletions
|
@ -10,6 +10,11 @@ type Printer struct {
|
|||
language string
|
||||
}
|
||||
|
||||
// NewPrinter creates a new Printer instance for the given language.
|
||||
func NewPrinter(language string) *Printer {
|
||||
return &Printer{language}
|
||||
}
|
||||
|
||||
func (p *Printer) Print(key string) string {
|
||||
if dict, err := getTranslationDict(p.language); err == nil {
|
||||
if str, ok := dict[key]; ok {
|
||||
|
@ -65,8 +70,3 @@ func (p *Printer) Plural(key string, n int, args ...interface{}) string {
|
|||
|
||||
return key
|
||||
}
|
||||
|
||||
// NewPrinter creates a new Printer.
|
||||
func NewPrinter(language string) *Printer {
|
||||
return &Printer{language}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue