mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-08 00:14:26 +08:00
update for init i18n
This commit is contained in:
@@ -116,7 +116,7 @@ func NewBook() *Book {
|
||||
}
|
||||
|
||||
//添加一个项目
|
||||
func (book *Book) Insert() error {
|
||||
func (book *Book) Insert(lang string) error {
|
||||
o := orm.NewOrm()
|
||||
// o.Begin()
|
||||
book.BookName = utils.StripTags(book.BookName)
|
||||
@@ -142,7 +142,7 @@ func (book *Book) Insert() error {
|
||||
}
|
||||
document := NewDocument()
|
||||
document.BookId = book.BookId
|
||||
document.DocumentName = "空白文档"
|
||||
document.DocumentName = i18n.Tr(lang, "init.blank_doc") //"空白文档"
|
||||
document.MemberId = book.MemberId
|
||||
err = document.InsertOrUpdate()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user