Skip to content

Commit 4d3ebce

Browse files
committed
fine tune error message if os.Stat failed
1 parent 1b61adf commit 4d3ebce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/translation/i18n/i18n.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ func (l *locale) tryTr(trKey string, trArgs ...interface{}) (msg string, found b
157157
} else {
158158
log.Error("unable to live-reload the locale file %q, err: %v", l.sourceFileName, err)
159159
}
160+
} else if err != nil {
161+
log.Error("unable to stat the locale file %q, err: %v", l.sourceFileName, err)
160162
}
161163
l.store.reloadMu.Unlock() // release the write-lock
162164
l.store.reloadMu.RLock() // and re-acquire the read-lock, which was managed by outer Tr function

0 commit comments

Comments
 (0)