Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-05-24 09:20:02 +08:00
commit d26bb04110
20 changed files with 51 additions and 2 deletions

View file

@ -0,0 +1,11 @@
## Overview
TODO
## Changelogs
Below are the detailed changes in this version.
### Enhancement

View file

@ -0,0 +1,11 @@
## 概述
TODO
## 變更記錄
以下是此版本中的詳細變更。
### 改進功能

View file

@ -0,0 +1,11 @@
## 概述
TODO
## 变更记录
以下是此版本中的详细变更。
### 改进功能

View file

@ -9,7 +9,7 @@ export const openChangelog = () => {
return;
}
const dialog = new Dialog({
title: `${window.siyuan.languages.whatsNewInSiYuan}`,
title: `${window.siyuan.languages.whatsNewInSiYuan} v${window.siyuan.config.system.kernelVersion}`,
width: isMobile() ? "92vw" : "768px",
height: isMobile() ? "80vh" : "70vh",
content: `<div style="overflow:auto;" class="b3-dialog__content b3-typography b3-typography--default">${response.data.html}</div>`

View file

@ -49,7 +49,7 @@ func getChangelog(c *gin.Context) {
return
}
changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+"_"+model.Conf.Lang+".md")
changelogPath := filepath.Join(changelogsDir, "v"+util.Ver, "v"+util.Ver+"_"+model.Conf.Lang+".md")
if !gulu.File.IsExist(changelogPath) {
changelogPath = filepath.Join(changelogsDir, "v"+util.Ver+".md")
if !gulu.File.IsExist(changelogPath) {

View file

@ -135,6 +135,10 @@ func getPreferredReadme(readme *Readme) string {
if "" != readme.ZhCN {
ret = readme.ZhCN
}
case "zh_CHT":
if "" != readme.ZhCN {
ret = readme.ZhCN
}
case "en_US":
if "" != readme.EnUS {
ret = readme.EnUS
@ -158,6 +162,10 @@ func getPreferredName(pkg *Package) string {
if "" != pkg.DisplayName.ZhCN {
ret = pkg.DisplayName.ZhCN
}
case "zh_CHT":
if "" != pkg.DisplayName.ZhCN {
ret = pkg.DisplayName.ZhCN
}
case "en_US":
if "" != pkg.DisplayName.EnUS {
ret = pkg.DisplayName.EnUS
@ -181,6 +189,10 @@ func getPreferredDesc(desc *Description) string {
if "" != desc.ZhCN {
ret = desc.ZhCN
}
case "zh_CHT":
if "" != desc.ZhCN {
ret = desc.ZhCN
}
case "en_US":
if "" != desc.EnUS {
ret = desc.EnUS

View file

@ -136,6 +136,10 @@ func loadCode(petal *Petal) {
if !foundPreferredLang {
if foundEnUS {
preferredLang = "en_US.json"
if "zh_CHT" == Conf.Lang && foundZhCN {
// Improve marketplace package for traditional Chinese https://github.com/siyuan-note/siyuan/issues/8342
preferredLang = "zh_CN.json"
}
} else if foundZhCN {
preferredLang = "zh_CN.json"
} else {