Skip to content

Commit ef63571

Browse files
committed
style: remove warning log when translation not exist
1 parent 26158da commit ef63571

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

contrib/i18n/localizer.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import (
77
"path/filepath"
88
"strings"
99

10-
"github.com/segmentfault/pacman/i18n"
11-
"github.com/segmentfault/pacman/log"
12-
1310
goI18n "github.com/nicksnyder/go-i18n/v2/i18n"
11+
"github.com/segmentfault/pacman/i18n"
1412
"golang.org/x/text/language"
1513
"gopkg.in/yaml.v3"
1614
)
@@ -49,7 +47,6 @@ func (tr *Translator) Tr(la i18n.Language, key string) string {
4947

5048
translation, err := l.Localize(&goI18n.LocalizeConfig{MessageID: key})
5149
if err != nil {
52-
log.Warn(err)
5350
return key
5451
}
5552

0 commit comments

Comments
 (0)