1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Simplify locale package usage (refactoring)

This commit is contained in:
Frédéric Guillot 2018-09-22 15:04:55 -07:00
parent aae9b4eb83
commit b1e8f534ef
26 changed files with 443 additions and 299 deletions

View file

@ -22,8 +22,8 @@ func (l LocalizedError) Error() string {
}
// Localize returns the translated error message.
func (l LocalizedError) Localize(translation *locale.Language) string {
return translation.Get(l.message, l.args...)
func (l LocalizedError) Localize(printer *locale.Printer) string {
return printer.Printf(l.message, l.args...)
}
// NewLocalizedError returns a new LocalizedError.