From cceb9b73432e47284a6a3ec84b104b465d8c8f88 Mon Sep 17 00:00:00 2001 From: shiqstone Date: Fri, 2 Apr 2021 14:37:35 +0800 Subject: [PATCH] refactor and update i18n, to be continue --- conf/lang/en-us.ini | 1 + conf/lang/zh-cn.ini | 1 + go.sum | 4 ++++ views/book/setting.tpl | 12 ++++++------ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/conf/lang/en-us.ini b/conf/lang/en-us.ini index a0573e8e..07baa819 100644 --- a/conf/lang/en-us.ini +++ b/conf/lang/en-us.ini @@ -186,6 +186,7 @@ change_cover = Change Cover preview = Preview choose = Choose upload = Upload +recipient_account = Recipient [page] first = first diff --git a/conf/lang/zh-cn.ini b/conf/lang/zh-cn.ini index 13d22092..446bf2df 100644 --- a/conf/lang/zh-cn.ini +++ b/conf/lang/zh-cn.ini @@ -186,6 +186,7 @@ change_cover = 修改封面 preview = 预览 choose = 选择 upload = 上传 +recipient_account = 接收者账号 [page] first = 首页 diff --git a/go.sum b/go.sum index 53e76be0..4568cf4f 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/PuerkitoBio/goquery v1.4.1 h1:smcIRGdYm/w7JSbcdeLHEMzxmsBQvl8lhf0dSw2nzMI= github.com/PuerkitoBio/goquery v1.4.1/go.mod h1:T9ezsOHcCrDCgA8aF1Cqr3sSYbO/xgdy8/R/XiIMAhA= +github.com/Unknwon/goconfig v0.0.0-20200908083735-df7de6a44db8 h1:1TrMV1HmBApBbM+Hy7RCKZD6UlYWYIPPfoeXomG7+zE= +github.com/Unknwon/goconfig v0.0.0-20200908083735-df7de6a44db8/go.mod h1:wngxua9XCNjvHjDiTiV26DaKDT+0c63QR6H5hjVUUxw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -13,6 +15,8 @@ github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxB github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ= github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA= github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= +github.com/beego/i18n v0.0.0-20161101132742-e9308947f407 h1:WtJfx5HqASTQp7HfiZldnin8KQV2futplF3duGp5PGc= +github.com/beego/i18n v0.0.0-20161101132742-e9308947f407/go.mod h1:KLeFCpAMq2+50NkXC8iiJxLLiiTfTqrGtKEVm+2fk7s= github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= diff --git a/views/book/setting.tpl b/views/book/setting.tpl index d50ef7c5..006e0d15 100644 --- a/views/book/setting.tpl +++ b/views/book/setting.tpl @@ -274,21 +274,21 @@ @@ -424,7 +424,7 @@ } }); $('.js-data-example-ajax').select2({ - language: "zh-CN", + language: "{{i18n $.Lang "common.js_lang"}}", minimumInputLength : 1, minimumResultsForSearch: Infinity, maximumSelectionLength:1,