This commit is contained in:
Van 2015-03-08 11:00:56 +08:00
parent 168ee7c5ee
commit a31f71c838
6 changed files with 13 additions and 3 deletions

View File

@ -105,6 +105,8 @@
"start-get": "START [go get]",
"get-succ": "[go get] SUCCESS",
"get-error": "[go get] ERROR",
"start-git_clone": "START [git clone]",
"git_clone-done": "[git clone] DONE",
"check_version": "Checking update",
"new_version_available": "new version available",
"go_env": "Go",

View File

@ -105,6 +105,8 @@
"start-get": "[go get] 開始",
"get-succ": "[go get] 成功",
"get-error": "[go get] 失敗",
"start-git_clone": "[git clone] 開始",
"git_clone-done": "[git clone] 終わった",
"check_version": "更新をチェック中",
"new_version_available": "新しいバージョンがあります",
"go_env": "Go",

View File

@ -105,6 +105,8 @@
"start-get": "开始 [go get]",
"get-succ": "[go get] 成功",
"get-error": "[go get] 失败",
"start-git_clone": "开始 [git clone]",
"git_clone-done": "[git clone] 完成",
"check_version": "正在检查更新",
"new_version_available": "新版本可用",
"go_env": "Go 环境",

View File

@ -105,6 +105,8 @@
"start-get": "開始 [go get]",
"get-succ": "[go get] 成功",
"get-error": "[go get] 失败",
"start-git_clone": "開始 [git clone]",
"git_clone-done": "[git clone] 完成",
"check_version": "正在檢查更新",
"new_version_available": "可用新版本",
"go_env": "Go 環境",

View File

@ -45,7 +45,6 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) {
locale := conf.GetUser(username).Locale
var args map[string]interface{}
if err := json.NewDecoder(r.Body).Decode(&args); err != nil {
logger.Error(err)
data["succ"] = false

View File

@ -23,6 +23,8 @@ import (
"net/http"
"os"
"os/exec"
"outline/wide/conf"
"outline/wide/i18n"
"github.com/b3log/wide/log"
"github.com/b3log/wide/session"
@ -44,6 +46,7 @@ func CloneHandler(w http.ResponseWriter, r *http.Request) {
return
}
username := httpSession.Values["username"].(string)
locale := conf.GetUser(username).Locale
var args map[string]interface{}
if err := json.NewDecoder(r.Body).Decode(&args); err != nil {
@ -85,7 +88,7 @@ func CloneHandler(w http.ResponseWriter, r *http.Request) {
if nil != session.OutputWS[sid] {
// display "START [git clone]" in front-end browser
channelRet["output"] = "<span class='start-get'>git clone</span>\n"
channelRet["output"] = "<span class='start-get'>" + i18n.Get(locale, "start-git_clone").(string) + "</span>\n"
channelRet["cmd"] = "start-git_clone"
wsChannel := session.OutputWS[sid]
@ -122,7 +125,7 @@ func CloneHandler(w http.ResponseWriter, r *http.Request) {
logger.Debugf("User [%s, %s] 's running [git clone] [runningId=%d] has done: %s", username, sid, runningId, string(buf))
channelRet["output"] = "<span class='get-succ'>git clone succ</span>\n"
channelRet["output"] = "<span class='get-succ'>" + i18n.Get(locale, "git_clone-done").(string) + "</span>\n"
if nil != session.OutputWS[sid] {
wsChannel := session.OutputWS[sid]