From 6ee33414bc5b4a3692ae17ea3604a9a4350bbd93 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 20 Oct 2014 15:35:15 +0800 Subject: [PATCH] #15 i18n --- conf/wide.json | 11 +++++++++-- i18n/zh_CN.json | 7 ++++++- main.go | 3 ++- view/start.html | 16 ++++++++-------- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/conf/wide.json b/conf/wide.json index 66248d9..7f41e87 100644 --- a/conf/wide.json +++ b/conf/wide.json @@ -16,8 +16,15 @@ "Password": "admin", "Workspace": "{pwd}/data/user_workspaces/admin", "LatestSessionContent": { - "FileTree": [], - "Files": [], + "FileTree": [ + "D:\\GoGoGo\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest", + "D:\\GoGoGo\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello", + "D:\\GoGoGo\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\time" + ], + "Files": [ + "D:\\GoGoGo\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello\\main.go", + "D:\\GoGoGo\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\time\\main.go" + ], "CurrentFile": "" } } diff --git a/i18n/zh_CN.json b/i18n/zh_CN.json index 4119425..8de28a9 100644 --- a/i18n/zh_CN.json +++ b/i18n/zh_CN.json @@ -47,5 +47,10 @@ "restore_bottom": "底部窗口还原", "file_format": "文件后缀", "keyword": "关键字", - "initialise": "初始化" + "initialise": "初始化", + "user_guide": "用户指南", + "dev_guide": "开发指南", + "ver": "版本", + "dev_team": "开发团队", + "donate": "捐赠" } diff --git a/main.go b/main.go index 0cc1408..4d89340 100644 --- a/main.go +++ b/main.go @@ -187,7 +187,8 @@ func startHandler(w http.ResponseWriter, r *http.Request) { username := httpSession.Values["username"].(string) - model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), "username": username} + model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), + "username": username, "ver": Ver} t, err := template.ParseFiles("view/start.html") diff --git a/view/start.html b/view/start.html index daaefba..85bddcd 100644 --- a/view/start.html +++ b/view/start.html @@ -1,24 +1,24 @@
- +
aaa