mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-11 03:08:50 +01:00
🎨 Title localization when creating a document https://github.com/siyuan-note/siyuan/issues/10719
This commit is contained in:
parent
f5043a8c46
commit
2a8809bc7e
25 changed files with 72 additions and 61 deletions
|
|
@ -1568,7 +1568,7 @@ func RenameDoc(boxID, p, title string) (err error) {
|
|||
return
|
||||
}
|
||||
if "" == title {
|
||||
title = "Untitled"
|
||||
title = Conf.language(105)
|
||||
}
|
||||
title = strings.ReplaceAll(title, "/", "")
|
||||
|
||||
|
|
@ -1604,6 +1604,10 @@ func createDoc(boxID, p, title, dom string) (tree *parse.Tree, err error) {
|
|||
return
|
||||
}
|
||||
title = strings.ReplaceAll(title, "/", "")
|
||||
title = strings.TrimSpace(title)
|
||||
if "" == title {
|
||||
title = Conf.Language(105)
|
||||
}
|
||||
|
||||
baseName := strings.TrimSpace(path.Base(p))
|
||||
if "" == strings.TrimSuffix(baseName, ".sy") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue