Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
koko
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
koko
Commits
9f0f55b2
Commit
9f0f55b2
authored
Jun 12, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改翻译
parent
5bdb1e63
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
27 deletions
+34
-27
koko.po
cmd/locale/en_US/LC_MESSAGES/koko.po
+11
-11
koko.po
cmd/locale/zh_CN/LC_MESSAGES/koko.po
+17
-13
server.go
pkg/httpd/server.go
+3
-1
sessmanager.go
pkg/proxy/sessmanager.go
+1
-2
message.sh
tools/message.sh
+2
-0
No files found.
cmd/locale/en_US/LC_MESSAGES/koko.po
View file @
9f0f55b2
...
...
@@ -122,57 +122,57 @@ msgid ""
msgstr ""
#. i18n.T
#: pkg/handler/session.go:26
4
#: pkg/handler/session.go:26
7
msgid "No Assets"
msgstr ""
#. i18n.T
#: pkg/handler/session.go:28
6
#: pkg/handler/session.go:28
9
msgid "Node: [ ID.Name(Asset amount) ]"
msgstr ""
#. i18n.T
#: pkg/handler/session.go:2
87
#: pkg/handler/session.go:2
90
msgid "Tips: Enter g+NodeID to display the host under the node, such as g1"
msgstr ""
#. i18n.T
#: pkg/handler/session.go:30
1
#: pkg/handler/session.go:30
4
msgid "Refresh done"
msgstr ""
#. i18n.T
#: pkg/proxy/parser.go:1
18
#: pkg/proxy/parser.go:1
24
msgid "Command `%s` is forbidden"
msgstr ""
#. i18n.T
#: pkg/proxy/proxy.go:1
10
#: pkg/proxy/proxy.go:1
52
msgid "Connecting to %s@%s %.1f"
msgstr ""
#. i18n.T
#: pkg/proxy/proxy.go:1
28
#: pkg/proxy/proxy.go:1
71
msgid "System user <%s> and asset <%s> protocol are inconsistent."
msgstr ""
#. i18n.T
#: pkg/proxy/proxy.go:1
34
#: pkg/proxy/proxy.go:1
77
msgid ""
"Terminal only support protocol ssh/telnet, please use web terminal to access"
msgstr ""
#. i18n.T
#: pkg/proxy/
proxy.go:161
#: pkg/proxy/
sessmanager.go:63
msgid "Connect with api server failed"
msgstr ""
#. i18n.T
#: pkg/proxy/switch.go:1
36
#: pkg/proxy/switch.go:1
42
msgid "Connect idle more than %d minutes, disconnect"
msgstr ""
#. i18n.T
#: pkg/proxy/switch.go:14
2
#: pkg/proxy/switch.go:14
8
msgid "Terminated by administrator"
msgstr ""
cmd/locale/zh_CN/LC_MESSAGES/koko.po
View file @
9f0f55b2
...
...
@@ -112,67 +112,71 @@ msgstr "页码: %d, 数量: %d, 总页数: %d, 总数量: %d"
msgid ""
"\n"
"Tips: Enter the asset ID and log directly into the asset.\n"
msgstr "\n提示: 输入资产ID,直接登录资产.\n"
msgstr ""
"\n"
"提示: 输入资产ID,直接登录资产.\n"
#. i18n.T
#: pkg/handler/pagination.go:180
msgid ""
"\n"
"Page up: P/p\tPage down: Enter|N/n\tBACK: b.\n"
msgstr "\n上一页: P/p 下一页: Enter|N/n 返回: B/b\n"
msgstr ""
"\n"
"上一页: P/p 下一页: Enter|N/n 返回: B/b\n"
#. i18n.T
#: pkg/handler/session.go:26
4
#: pkg/handler/session.go:26
7
msgid "No Assets"
msgstr "没有资产"
#. i18n.T
#: pkg/handler/session.go:28
6
#: pkg/handler/session.go:28
9
msgid "Node: [ ID.Name(Asset amount) ]"
msgstr "节点: [ ID.名称(资产数量) ]"
#. i18n.T
#: pkg/handler/session.go:2
87
#: pkg/handler/session.go:2
90
msgid "Tips: Enter g+NodeID to display the host under the node, such as g1"
msgstr "提示: 输入 g+节点ID 显示节点下主机. 如: g1"
#. i18n.T
#: pkg/handler/session.go:30
1
#: pkg/handler/session.go:30
4
msgid "Refresh done"
msgstr "刷新完成"
#. i18n.T
#: pkg/proxy/parser.go:1
18
#: pkg/proxy/parser.go:1
24
msgid "Command `%s` is forbidden"
msgstr "命令 `%s` 是被禁止的 ..."
#. i18n.T
#: pkg/proxy/proxy.go:1
10
#: pkg/proxy/proxy.go:1
52
msgid "Connecting to %s@%s %.1f"
msgstr "开始连接到 %s@%s %.1f"
#. i18n.T
#: pkg/proxy/proxy.go:1
28
#: pkg/proxy/proxy.go:1
71
msgid "System user <%s> and asset <%s> protocol are inconsistent."
msgstr "系统用户<%s>和资产<%s>协议不一致"
#. i18n.T
#: pkg/proxy/proxy.go:1
34
#: pkg/proxy/proxy.go:1
77
msgid ""
"Terminal only support protocol ssh/telnet, please use web terminal to access"
msgstr "终端仅支持ssh/telnet协议,请使用web终端登录"
#. i18n.T
#: pkg/proxy/
proxy.go:161
#: pkg/proxy/
sessmanager.go:63
msgid "Connect with api server failed"
msgstr "连接API服务失败"
#. i18n.T
#: pkg/proxy/switch.go:1
36
#: pkg/proxy/switch.go:1
42
msgid "Connect idle more than %d minutes, disconnect"
msgstr "空闲时间超过%d分钟,断开连接"
#. i18n.T
#: pkg/proxy/switch.go:14
2
#: pkg/proxy/switch.go:14
8
msgid "Terminated by administrator"
msgstr "管理员中断连接"
pkg/httpd/server.go
View file @
9f0f55b2
...
...
@@ -5,7 +5,7 @@ import (
"net/http"
"path/filepath"
socketio
"github.com/googollee/go-socket.io"
"github.com/googollee/go-socket.io"
"github.com/gorilla/mux"
"github.com/jumpserver/koko/pkg/config"
...
...
@@ -33,7 +33,9 @@ func StartHTTPServer() {
server
.
OnConnect
(
"/elfinder"
,
OnELFinderConnect
)
server
.
OnDisconnect
(
"/elfinder"
,
OnELFinderDisconnect
)
server
.
OnError
(
"/elfiner"
,
OnErrorHandler
)
server
.
OnDisconnect
(
""
,
SocketDisconnect
)
server
.
OnError
(
""
,
OnErrorHandler
)
go
server
.
Serve
()
defer
server
.
Close
()
...
...
pkg/proxy/sessmanager.go
View file @
9f0f55b2
...
...
@@ -60,8 +60,8 @@ func CreateSession(p *ProxyServer) (sw *SwitchSession, err error) {
sw
=
NewSwitchSession
(
p
)
// Post到Api端
ok
:=
postSession
(
sw
)
msg
:=
i18n
.
T
(
"Connect with api server failed"
)
if
!
ok
{
msg
:=
i18n
.
T
(
"Connect with api server failed"
)
msg
=
utils
.
WrapperWarn
(
msg
)
utils
.
IgnoreErrWriteString
(
p
.
UserConn
,
msg
)
logger
.
Error
(
msg
)
...
...
@@ -70,7 +70,6 @@ func CreateSession(p *ProxyServer) (sw *SwitchSession, err error) {
// 获取系统用户的过滤规则,并设置
cmdRules
,
err
:=
service
.
GetSystemUserFilterRules
(
p
.
SystemUser
.
ID
)
if
err
!=
nil
{
msg
:=
i18n
.
T
(
"Connect with api server failed"
)
msg
=
utils
.
WrapperWarn
(
msg
)
utils
.
IgnoreErrWriteString
(
p
.
UserConn
,
msg
)
logger
.
Error
(
msg
+
err
.
Error
())
...
...
tools/message.sh
View file @
9f0f55b2
...
...
@@ -17,11 +17,13 @@ init_message() {
}
make_message
()
{
cd
${
PROJECT_DIR
}
go run
${
BIN
}
-domain
${
DOMAIN
}
-in
${
INPUT
}
-out
/tmp/
for
lang
in
$LANG
;
do
po_file
=
${
OUTPUT
}
/
${
lang
}
/LC_MESSAGES/
${
DOMAIN
}
.po
msgmerge
-U
${
po_file
}
/tmp/
${
DOMAIN
}
.po
done
cd
-
}
compile_message
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment