aboutsummaryrefslogtreecommitdiffhomepage
path: root/errors
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-09-22 15:04:55 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-09-22 15:04:55 -0700
commitb1e8f534eff7569dc2e8dab4dee851d1b709f71b (patch)
treeec9d5cbebc78704727c9ce959f442b3df5cc7d76 /errors
parentaae9b4eb835c72c0b7ecd8fa6565eacce3963d00 (diff)
Simplify locale package usage (refactoring)
Diffstat (limited to 'errors')
-rw-r--r--errors/errors.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/errors/errors.go b/errors/errors.go
index b3c5530..e6a979a 100644
--- a/errors/errors.go
+++ b/errors/errors.go
@@ -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.