Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
6fcc6c9a
Z
zendata
项目概览
易企天创
/
zendata
10 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6fcc6c9a
编写于
12月 31, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upgrade
上级
f01acf54
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
99 addition
and
3 deletion
+99
-3
.zd.conf
.zd.conf
+1
-1
res/en/messages.json
res/en/messages.json
+46
-0
res/zh/messages.json
res/zh/messages.json
+46
-0
src/utils/config/config.go
src/utils/config/config.go
+4
-1
src/utils/const/const.go
src/utils/const/const.go
+1
-1
src/zd.go
src/zd.go
+1
-0
未找到文件。
.zd.conf
浏览文件 @
6fcc6c9a
Version
=
1
Version
=
1
.
6
Language
=
zh
res/en/messages.json
浏览文件 @
6fcc6c9a
...
...
@@ -164,6 +164,52 @@
{
"id"
:
"fail_to_exec_cmd"
,
"translation"
:
"Fail to exec command '%s', error is '%s'."
},
{
"id"
:
"find_new_ver"
,
"translation"
:
"Find new version %s"
},
{
"id"
:
"success_upgrade"
,
"translation"
:
"Successfully upgrade from version %.1f to %s."
},
{
"id"
:
"fail_upgrade"
,
"translation"
:
"Fail to upgrade from version %.1f to %s., err: %s."
},
{
"id"
:
"download_fail"
,
"translation"
:
"Download %s fail, error: %s."
},
{
"id"
:
"download_read_fail"
,
"translation"
:
"Read download file %s fail, error: %s."
},
{
"id"
:
"download_write_fail"
,
"translation"
:
"Write download file %s fail, error: %s."
},
{
"id"
:
"download_success"
,
"translation"
:
"Successfully download %s to %s."
},
{
"id"
:
"success_update_config"
,
"translation"
:
"Successfully update config file %s."
},
{
"id"
:
"perm_deny"
,
"translation"
:
"Permission denied to file %s, please change work dir."
},
{
"id"
:
"fail_unzip"
,
"translation"
:
"Fail to unzip file %s."
},
{
"id"
:
"fail_md5_check"
,
"translation"
:
"Check file %s MD5 failed."
}
]
}
res/zh/messages.json
浏览文件 @
6fcc6c9a
...
...
@@ -155,6 +155,52 @@
{
"id"
:
"fail_to_exec_cmd"
,
"translation"
:
"执行命令'%s'失败,错误消息为'%s'。"
},
{
"id"
:
"find_new_ver"
,
"translation"
:
"发现新版本%s。"
},
{
"id"
:
"success_upgrade"
,
"translation"
:
"成功从版本%.1f升级到%s。"
},
{
"id"
:
"fail_upgrade"
,
"translation"
:
"失败升级版本从%.1f到%s,错误 %s。"
},
{
"id"
:
"download_fail"
,
"translation"
:
"下载文件失败 %s,错误 %s。"
},
{
"id"
:
"download_read_fail"
,
"translation"
:
"读取下载文件%s失败,错误 %s。"
},
{
"id"
:
"download_write_fail"
,
"translation"
:
"写入下载文件%s失败,错误 %s。"
},
{
"id"
:
"download_success"
,
"translation"
:
"成功下载文件%s到%s。"
},
{
"id"
:
"success_update_config"
,
"translation"
:
"成功更新配置文件%s。"
},
{
"id"
:
"perm_deny"
,
"translation"
:
"文件%s权限不足,建议切换工作目录。"
},
{
"id"
:
"fail_unzip"
,
"translation"
:
"解压文件%s失败。"
},
{
"id"
:
"fail_md5_check"
,
"translation"
:
"验证文件%s的MD5失败。"
}
]
}
src/utils/config/config.go
浏览文件 @
6fcc6c9a
...
...
@@ -57,7 +57,9 @@ func InitConfig() {
func
SaveConfig
(
conf
model
.
Config
)
error
{
fileUtils
.
MkDirIfNeeded
(
filepath
.
Dir
(
vari
.
ConfigFile
))
if
conf
.
Version
==
0
{
conf
.
Version
=
constant
.
ConfigVer
}
cfg
:=
ini
.
Empty
()
cfg
.
ReflectFrom
(
&
conf
)
...
...
@@ -131,6 +133,7 @@ func CheckConfigPermission() {
func
CheckConfigReady
()
{
if
!
fileUtils
.
FileExist
(
vari
.
ConfigFile
)
{
logUtils
.
PrintTo
(
vari
.
ConfigFile
+
"no exist"
)
if
vari
.
RunMode
==
constant
.
RunModeServer
{
conf
:=
model
.
Config
{
Language
:
"zh"
,
Version
:
1
}
SaveConfig
(
conf
)
...
...
src/utils/const/const.go
浏览文件 @
6fcc6c9a
...
...
@@ -7,7 +7,7 @@ import (
)
const
(
AppName
=
"z
tf
"
AppName
=
"z
endata
"
)
var
(
...
...
src/zd.go
浏览文件 @
6fcc6c9a
...
...
@@ -342,6 +342,7 @@ func InitServer() (err error) {
upgradeService
:=
serverService
.
NewUpgradeService
()
cronService
:=
serverService
.
NewCronService
(
upgradeService
)
cronService
.
Init
()
server
:=
NewServer
(
config
,
defService
,
fieldService
,
sectionService
,
referService
,
rangesService
,
instancesService
,
textService
,
excelService
,
configService
,
resService
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录