Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/i18n
diff options
context:
space:
mode:
Diffstat (limited to 'i18n')
-rw-r--r--i18n/i18n.go2
-rw-r--r--i18n/translationProvider.go2
2 files changed, 1 insertions, 3 deletions
diff --git a/i18n/i18n.go b/i18n/i18n.go
index 6cc3d0b33..73417fb32 100644
--- a/i18n/i18n.go
+++ b/i18n/i18n.go
@@ -68,9 +68,7 @@ func (t Translator) initFuncs(bndl *bundle.Bundle) {
currentLang := lang
t.translateFuncs[currentLang] = func(translationID string, args ...interface{}) string {
- tpMu.RLock()
tFunc, err := bndl.Tfunc(currentLang)
- tpMu.RUnlock()
if err != nil {
jww.WARN.Printf("could not load translations for language %q (%s), will use default content language.\n", lang, err)
}
diff --git a/i18n/translationProvider.go b/i18n/translationProvider.go
index 556ee7a92..663a8dd5e 100644
--- a/i18n/translationProvider.go
+++ b/i18n/translationProvider.go
@@ -25,7 +25,7 @@ import (
// Unfortunately this needs to be global, see
// https://github.com/nicksnyder/go-i18n/issues/82
-var tpMu sync.RWMutex
+var tpMu sync.Mutex
// TranslationProvider provides translation handling, i.e. loading
// of bundles etc.