mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-05 14:43:47 +08:00
Lang (#989)
* [lang] fix tiny language * [lang] fix lang * [lang] update document lang --------- Co-authored-by: admin <you@example.com>
This commit is contained in:
parent
0000931a88
commit
7f25bc7533
@ -272,7 +272,7 @@ team_name = Team name
|
|||||||
member_amount = Number of members
|
member_amount = Number of members
|
||||||
join_time = Join Time
|
join_time = Join Time
|
||||||
project_setting = Project setting
|
project_setting = Project setting
|
||||||
handover_project = Hanover
|
handover_project = Handover
|
||||||
make_public = Into Public
|
make_public = Into Public
|
||||||
make_private = Into Privete
|
make_private = Into Privete
|
||||||
history_record_amount = Number of history records
|
history_record_amount = Number of history records
|
||||||
@ -443,6 +443,8 @@ ft_create_time = Create time:
|
|||||||
ft_update_time = Update time:
|
ft_update_time = Update time:
|
||||||
view_count = Number of views
|
view_count = Number of views
|
||||||
changetheme = Switch themes
|
changetheme = Switch themes
|
||||||
|
prev = prev
|
||||||
|
next = next
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
prj_space_list = Project Space List
|
prj_space_list = Project Space List
|
||||||
|
@ -443,6 +443,8 @@ ft_create_time = 创建时间:
|
|||||||
ft_update_time = 更新时间:
|
ft_update_time = 更新时间:
|
||||||
view_count = 阅读次数
|
view_count = 阅读次数
|
||||||
changetheme = 切换主题
|
changetheme = 切换主题
|
||||||
|
prev = 上一篇
|
||||||
|
next = 下一篇
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
prj_space_list = 项目空间列表
|
prj_space_list = 项目空间列表
|
||||||
|
@ -214,8 +214,8 @@ func (c *DocumentController) Read() {
|
|||||||
}
|
}
|
||||||
var PrevName, PrevPath, NextName, NextPath string
|
var PrevName, PrevPath, NextName, NextPath string
|
||||||
if index == 0 {
|
if index == 0 {
|
||||||
c.Data["PrevName"] = "没有了"
|
c.Data["PrevName"] = ""
|
||||||
PrevName = "没有了"
|
PrevName = ""
|
||||||
} else {
|
} else {
|
||||||
c.Data["PrevPath"] = identify + "/" + flat[index-1].Identify
|
c.Data["PrevPath"] = identify + "/" + flat[index-1].Identify
|
||||||
c.Data["PrevName"] = flat[index-1].DocumentName
|
c.Data["PrevName"] = flat[index-1].DocumentName
|
||||||
@ -223,8 +223,8 @@ func (c *DocumentController) Read() {
|
|||||||
PrevName = flat[index-1].DocumentName
|
PrevName = flat[index-1].DocumentName
|
||||||
}
|
}
|
||||||
if index == len(flat)-1 {
|
if index == len(flat)-1 {
|
||||||
c.Data["NextName"] = "没有了"
|
c.Data["NextName"] = ""
|
||||||
NextName = "没有了"
|
NextName = ""
|
||||||
} else {
|
} else {
|
||||||
c.Data["NextPath"] = identify + "/" + flat[index+1].Identify
|
c.Data["NextPath"] = identify + "/" + flat[index+1].Identify
|
||||||
c.Data["NextName"] = flat[index+1].DocumentName
|
c.Data["NextName"] = flat[index+1].DocumentName
|
||||||
@ -251,7 +251,7 @@ func (c *DocumentController) Read() {
|
|||||||
data.DocId = doc.DocumentId
|
data.DocId = doc.DocumentId
|
||||||
data.DocIdentify = doc.Identify
|
data.DocIdentify = doc.Identify
|
||||||
data.DocTitle = doc.DocumentName
|
data.DocTitle = doc.DocumentName
|
||||||
data.Body = doc.Release + "<div class='wiki-bottom-left'>上一篇: <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />下一篇: <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>"
|
data.Body = doc.Release + "<div class='wiki-bottom-left'>"+ i18n.Tr(c.Lang, "doc.prev") + ": <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />" + i18n.Tr(c.Lang, "doc.next") + ": <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>"
|
||||||
data.Title = doc.DocumentName + " - Powered by MinDoc"
|
data.Title = doc.DocumentName + " - Powered by MinDoc"
|
||||||
data.Version = doc.Version
|
data.Version = doc.Version
|
||||||
data.ViewCount = doc.ViewCount
|
data.ViewCount = doc.ViewCount
|
||||||
@ -283,7 +283,7 @@ func (c *DocumentController) Read() {
|
|||||||
c.Data["Model"] = bookResult
|
c.Data["Model"] = bookResult
|
||||||
c.Data["Result"] = template.HTML(tree)
|
c.Data["Result"] = template.HTML(tree)
|
||||||
c.Data["Title"] = doc.DocumentName
|
c.Data["Title"] = doc.DocumentName
|
||||||
c.Data["Content"] = template.HTML(doc.Release + "<div class='wiki-bottom-left'>上一篇: <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />下一篇: <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>")
|
c.Data["Content"] = template.HTML(doc.Release + "<div class='wiki-bottom-left'>"+ i18n.Tr(c.Lang, "doc.prev") + ": <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />" + i18n.Tr(c.Lang, "doc.next") + ": <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>")
|
||||||
c.Data["ViewCount"] = doc.ViewCount
|
c.Data["ViewCount"] = doc.ViewCount
|
||||||
c.Data["FoldSetting"] = "closed"
|
c.Data["FoldSetting"] = "closed"
|
||||||
if bookResult.Editor == EditorCherryMarkdown {
|
if bookResult.Editor == EditorCherryMarkdown {
|
||||||
|
@ -1017,15 +1017,14 @@ func (c *ManagerController) TeamChangeMemberRole() {
|
|||||||
if memberId <= 0 || roleId <= 0 || teamId <= 0 || roleId > int(conf.BookObserver) {
|
if memberId <= 0 || roleId <= 0 || teamId <= 0 || roleId > int(conf.BookObserver) {
|
||||||
c.JsonResult(5001, i18n.Tr(c.Lang, "message.param_error"))
|
c.JsonResult(5001, i18n.Tr(c.Lang, "message.param_error"))
|
||||||
}
|
}
|
||||||
|
|
||||||
teamMember, err := models.NewTeamMember().ChangeRoleId(teamId, memberId, conf.BookRole(roleId))
|
teamMember, err := models.NewTeamMember().ChangeRoleId(teamId, memberId, conf.BookRole(roleId))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JsonResult(5002, err.Error())
|
c.JsonResult(5002, err.Error())
|
||||||
} else {
|
} else {
|
||||||
|
teamMember.SetLang(c.Lang).Include()
|
||||||
c.JsonResult(0, "OK", teamMember)
|
c.JsonResult(0, "OK", teamMember)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 团队项目列表.
|
// 团队项目列表.
|
||||||
|
Loading…
Reference in New Issue
Block a user