From 3d2d1161007bae45d30dc31e18faac35b67eff82 Mon Sep 17 00:00:00 2001 From: naiba Date: Thu, 28 Apr 2022 10:17:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20i18n=20config=20file=20[skip=20c?= =?UTF-8?q?i]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/playground/main.go | 1 + resource/template/common/footer.html | 2 +- resource/template/dashboard/setting.html | 2 +- resource/template/theme-daynight/home.html | 4 ++-- resource/template/theme-daynight/service.html | 2 +- resource/template/theme-daynight/viewpassword.html | 2 +- resource/template/theme-hotaru/home.html | 2 +- resource/template/theme-mdui/footer.html | 2 +- service/singleton/l10n.go | 11 +++++++++-- service/singleton/singleton.go | 2 +- 10 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cmd/playground/main.go b/cmd/playground/main.go index a989b7f..246a667 100644 --- a/cmd/playground/main.go +++ b/cmd/playground/main.go @@ -17,6 +17,7 @@ func htmlTemplateTranslateFn(id string, data interface{}, count interface{}) str } func main() { + singleton.InitConfigFromPath("data/config.yaml") singleton.InitLocalizer() fmt.Println(singleton.Localizer.MustLocalize(&i18n.LocalizeConfig{ MessageID: "nezhaMonitor", diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html index 4c6a8e8..b52fd65 100644 --- a/resource/template/common/footer.html +++ b/resource/template/common/footer.html @@ -2,7 +2,7 @@ diff --git a/resource/template/dashboard/setting.html b/resource/template/dashboard/setting.html index 3c5f157..77aa0b2 100644 --- a/resource/template/dashboard/setting.html +++ b/resource/template/dashboard/setting.html @@ -6,7 +6,7 @@
- +
diff --git a/resource/template/theme-daynight/home.html b/resource/template/theme-daynight/home.html index 8e3d73c..8056095 100644 --- a/resource/template/theme-daynight/home.html +++ b/resource/template/theme-daynight/home.html @@ -23,7 +23,7 @@