Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
c4ccea81
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c4ccea81
编写于
8月 21, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
i118 message
上级
67c07634
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
38 addition
and
18 deletion
+38
-18
res/messages_en.json
res/messages_en.json
+9
-5
res/messages_zh.json
res/messages_zh.json
+6
-1
src/ui/page/pageReportBug.go
src/ui/page/pageReportBug.go
+1
-1
src/ui/page/pageSettings.go
src/ui/page/pageSettings.go
+5
-2
src/ui/page/pageSwitch.go
src/ui/page/pageSwitch.go
+5
-2
src/ui/page/pageTestResult.go
src/ui/page/pageTestResult.go
+5
-2
src/ui/page/pageTesting.go
src/ui/page/pageTesting.go
+7
-5
未找到文件。
res/messages_en.json
浏览文件 @
c4ccea81
...
...
@@ -179,22 +179,27 @@
"translation"
:
"Test Suite"
},
{
"id"
:
"test_script
s
"
,
"message"
:
"Test Script
s
"
,
"translation"
:
"Test Script
s
"
"id"
:
"test_script"
,
"message"
:
"Test Script"
,
"translation"
:
"Test Script"
},
{
"id"
:
"content"
,
"message"
:
"Content"
,
"translation"
:
"Content"
},
{
"id"
:
"run"
,
"message"
:
"Run"
,
"translation"
:
"Run"
},
{
"id"
:
"results"
,
"message"
:
"Results"
,
"translation"
:
"Results"
},
{
"id"
:
"upload_
test_
result"
,
"id"
:
"upload_result"
,
"message"
:
"Upload Result"
,
"translation"
:
"Upload Result"
},
...
...
@@ -258,7 +263,6 @@
"message"
:
"Switch To"
,
"translation"
:
"Switch To"
},
d
{
"id"
:
"project_config"
,
"message"
:
""
,
...
...
res/messages_zh.json
浏览文件 @
c4ccea81
...
...
@@ -186,13 +186,18 @@
"message"
:
"Content"
,
"translation"
:
"内容"
},
{
"id"
:
"run"
,
"message"
:
"Run"
,
"translation"
:
"运行"
},
{
"id"
:
"results"
,
"message"
:
"Results"
,
"translation"
:
"结果"
},
{
"id"
:
"upload_
test_
result"
,
"id"
:
"upload_result"
,
"message"
:
"Upload Result"
,
"translation"
:
"上传结果"
},
...
...
src/ui/page/pageReportBug.go
浏览文件 @
c4ccea81
...
...
@@ -149,7 +149,7 @@ func reportBug(g *gocui.Gui, v *gocui.View) error {
if
title
==
""
{
v
,
_
:=
vari
.
Cui
.
View
(
"reportBugMsg"
)
color
.
New
(
color
.
FgMagenta
)
.
Fprintf
(
v
,
"Title cannot be empty"
)
color
.
New
(
color
.
FgMagenta
)
.
Fprintf
(
v
,
i118Utils
.
ReadI18nJson
(
"title_cannot_be_empty"
)
)
return
nil
}
...
...
src/ui/page/pageSettings.go
浏览文件 @
c4ccea81
...
...
@@ -3,6 +3,7 @@ package page
import
(
"github.com/easysoft/zentaoatf/src/ui"
"github.com/easysoft/zentaoatf/src/ui/widget"
i118Utils
"github.com/easysoft/zentaoatf/src/utils/i118"
"github.com/easysoft/zentaoatf/src/utils/vari"
"github.com/jroimartin/gocui"
)
...
...
@@ -11,10 +12,12 @@ var CurrSettingsButton string
var
settingsButtons
[]
string
func
InitSettingsPage
()
error
{
importLabel
:=
widget
.
NewLabelWidgetAutoWidth
(
"switch"
,
0
,
2
,
"Create/Change Project"
)
importLabel
:=
widget
.
NewLabelWidgetAutoWidth
(
"switch"
,
0
,
2
,
i118Utils
.
I118Prt
.
Sprintf
(
"switch_project"
))
ui
.
ViewMap
[
"settings"
]
=
append
(
ui
.
ViewMap
[
"settings"
],
importLabel
.
Name
())
switchLabel
:=
widget
.
NewLabelWidgetAutoWidth
(
"import"
,
0
,
3
,
"Import from Zentao"
)
switchLabel
:=
widget
.
NewLabelWidgetAutoWidth
(
"import"
,
0
,
3
,
i118Utils
.
I118Prt
.
Sprintf
(
"import_from_zentao"
))
ui
.
ViewMap
[
"settings"
]
=
append
(
ui
.
ViewMap
[
"settings"
],
switchLabel
.
Name
())
keybindingSettingsButton
()
...
...
src/ui/page/pageSwitch.go
浏览文件 @
c4ccea81
...
...
@@ -6,6 +6,7 @@ import (
"github.com/easysoft/zentaoatf/src/ui"
"github.com/easysoft/zentaoatf/src/ui/widget"
constant
"github.com/easysoft/zentaoatf/src/utils/const"
i118Utils
"github.com/easysoft/zentaoatf/src/utils/i118"
"github.com/easysoft/zentaoatf/src/utils/log"
"github.com/easysoft/zentaoatf/src/utils/vari"
"github.com/jroimartin/gocui"
...
...
@@ -21,7 +22,8 @@ func InitSwitchPage() error {
left
:=
slideX
+
2
right
:=
left
+
widget
.
LabelWidth
workDirLabel
:=
widget
.
NewLabelWidget
(
"workDirLabel"
,
left
,
1
,
"WorkDir"
)
workDirLabel
:=
widget
.
NewLabelWidget
(
"workDirLabel"
,
left
,
1
,
i118Utils
.
I118Prt
.
Sprintf
(
"Workdir"
))
ui
.
ViewMap
[
"switch"
]
=
append
(
ui
.
ViewMap
[
"switch"
],
workDirLabel
.
Name
())
left
=
right
+
ui
.
Space
...
...
@@ -33,7 +35,8 @@ func InitSwitchPage() error {
}
buttonX
:=
(
maxX
-
constant
.
LeftWidth
)
/
2
+
constant
.
LeftWidth
-
widget
.
ButtonWidth
submitInput
:=
widget
.
NewButtonWidgetAutoWidth
(
"submitInput"
,
buttonX
,
4
,
"Switch"
,
SwitchWorkDir
)
submitInput
:=
widget
.
NewButtonWidgetAutoWidth
(
"submitInput"
,
buttonX
,
4
,
i118Utils
.
I118Prt
.
Sprintf
(
"switch"
),
SwitchWorkDir
)
ui
.
ViewMap
[
"switch"
]
=
append
(
ui
.
ViewMap
[
"switch"
],
submitInput
.
Name
())
ui
.
AddEventForInputWidgets
(
ui
.
ViewMap
[
"switch"
])
...
...
src/ui/page/pageTestResult.go
浏览文件 @
c4ccea81
...
...
@@ -8,6 +8,7 @@ import (
"github.com/easysoft/zentaoatf/src/ui"
"github.com/easysoft/zentaoatf/src/ui/widget"
constant
"github.com/easysoft/zentaoatf/src/utils/const"
i118Utils
"github.com/easysoft/zentaoatf/src/utils/i118"
"github.com/easysoft/zentaoatf/src/utils/vari"
"github.com/jroimartin/gocui"
"strconv"
...
...
@@ -80,7 +81,8 @@ func selectResultEvent(g *gocui.Gui, v *gocui.View) error {
fmt
.
Fprintln
(
panelCaseList
,
strings
.
Join
(
content
,
"
\n
"
))
maxX
,
_
:=
g
.
Size
()
uploadButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"uploadButton"
,
maxX
-
35
,
0
,
"[Upload Result]"
,
toUploadResult
)
uploadButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"uploadButton"
,
maxX
-
35
,
0
,
"["
+
i118Utils
.
I118Prt
.
Sprintf
(
"upload_result"
)
+
"]"
,
toUploadResult
)
uploadButton
.
Frame
=
false
runViews
=
append
(
runViews
,
uploadButton
.
Name
())
...
...
@@ -112,7 +114,8 @@ func selectCaseEvent(g *gocui.Gui, v *gocui.View) error {
// show submit bug button
maxX
,
_
:=
g
.
Size
()
bugButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"bugButton"
,
maxX
-
18
,
0
,
"[Report Bug]"
,
toReportBug
)
bugButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"bugButton"
,
maxX
-
18
,
0
,
"["
+
i118Utils
.
I118Prt
.
Sprintf
(
"report_bug"
)
+
"]"
,
toReportBug
)
bugButton
.
Frame
=
false
runViews
=
append
(
runViews
,
bugButton
.
Name
())
...
...
src/ui/page/pageTesting.go
浏览文件 @
c4ccea81
...
...
@@ -8,6 +8,7 @@ import (
"github.com/easysoft/zentaoatf/src/ui/widget"
constant
"github.com/easysoft/zentaoatf/src/utils/const"
"github.com/easysoft/zentaoatf/src/utils/file"
i118Utils
"github.com/easysoft/zentaoatf/src/utils/i118"
"github.com/easysoft/zentaoatf/src/utils/log"
"github.com/easysoft/zentaoatf/src/utils/vari"
"github.com/jroimartin/gocui"
...
...
@@ -22,13 +23,13 @@ func InitTestingPage() error {
caseFiles
,
suitesFiles
:=
scriptService
.
LoadAssetFiles
()
dir
:=
constant
.
ScriptDir
content
:=
"Test Suite:"
+
"
\n
"
content
:=
i118Utils
.
I118Prt
.
Sprintf
(
"test_suite"
)
+
":
\n
"
for
_
,
suitePath
:=
range
suitesFiles
{
suiteName
:=
strings
.
Replace
(
suitePath
,
dir
,
""
,
-
1
)
content
+=
" "
+
suiteName
+
"
\n
"
}
content
+=
"Test Scripts:"
+
"
\n
"
content
+=
i118Utils
.
I118Prt
.
Sprintf
(
"test_script"
)
+
":
\n
"
for
_
,
casePath
:=
range
caseFiles
{
caseName
:=
strings
.
Replace
(
casePath
,
dir
,
""
,
-
1
)
content
+=
" "
+
caseName
+
"
\n
"
...
...
@@ -73,14 +74,14 @@ func selectScriptEvent(g *gocui.Gui, v *gocui.View) error {
func
showTab
()
error
{
g
:=
vari
.
Cui
x
:=
constant
.
LeftWidth
+
1
tabContentView
:=
widget
.
NewLabelWidgetAutoWidth
(
"tabContentView"
,
x
,
0
,
"Content"
)
tabContentView
:=
widget
.
NewLabelWidgetAutoWidth
(
"tabContentView"
,
x
,
0
,
i118Utils
.
I118Prt
.
Sprintf
(
"content"
)
)
ui
.
ViewMap
[
"testing"
]
=
append
(
ui
.
ViewMap
[
"testing"
],
tabContentView
.
Name
())
tabs
=
append
(
tabs
,
tabContentView
.
Name
())
if
err
:=
g
.
SetKeybinding
(
"tabContentView"
,
gocui
.
MouseLeft
,
gocui
.
ModNone
,
showContent
);
err
!=
nil
{
return
nil
}
tabResultView
:=
widget
.
NewLabelWidgetAutoWidth
(
"tabResultView"
,
x
+
12
,
0
,
"Results"
)
tabResultView
:=
widget
.
NewLabelWidgetAutoWidth
(
"tabResultView"
,
x
+
12
,
0
,
i118Utils
.
I118Prt
.
Sprintf
(
"results"
)
)
ui
.
ViewMap
[
"testing"
]
=
append
(
ui
.
ViewMap
[
"testing"
],
tabResultView
.
Name
())
tabs
=
append
(
tabs
,
tabResultView
.
Name
())
if
err
:=
g
.
SetKeybinding
(
"tabResultView"
,
gocui
.
MouseLeft
,
gocui
.
ModNone
,
showRun
);
err
!=
nil
{
...
...
@@ -105,7 +106,8 @@ func showContent(g *gocui.Gui, v *gocui.View) error {
contentViews
=
append
(
contentViews
,
panelFileContent
.
Name
())
ui
.
SupportScroll
(
panelFileContent
.
Name
())
runButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"runButton"
,
maxX
-
10
,
0
,
"[Run]"
,
run
)
runButton
:=
widget
.
NewButtonWidgetAutoWidth
(
"runButton"
,
maxX
-
10
,
0
,
"["
+
i118Utils
.
I118Prt
.
Sprintf
(
"run"
)
+
"]"
,
run
)
runButton
.
Frame
=
false
contentViews
=
append
(
contentViews
,
runButton
.
Name
())
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录