Browse Source

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

Vanessa 2 years ago
parent
commit
d26bb04110

+ 0 - 0
app/changelogs/v0.1.0-v2.8.3.md → app/changelogs/v0.1.0-v2.8.3/v0.1.0-v2.8.3.md


+ 11 - 0
app/changelogs/v2.8.10/v2.8.10.md

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

+ 11 - 0
app/changelogs/v2.8.10/v2.8.10_zh_CHT.md

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

+ 11 - 0
app/changelogs/v2.8.10/v2.8.10_zh_CN.md

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

+ 0 - 0
app/changelogs/v2.8.4.md → app/changelogs/v2.8.4/v2.8.4.md


+ 0 - 0
app/changelogs/v2.8.4_zh_CN.md → app/changelogs/v2.8.4/v2.8.4_zh_CN.md


+ 0 - 0
app/changelogs/v2.8.5.md → app/changelogs/v2.8.5/v2.8.5.md


+ 0 - 0
app/changelogs/v2.8.5_zh_CN.md → app/changelogs/v2.8.5/v2.8.5_zh_CN.md


+ 0 - 0
app/changelogs/v2.8.6.md → app/changelogs/v2.8.6/v2.8.6.md


+ 0 - 0
app/changelogs/v2.8.6_zh_CN.md → app/changelogs/v2.8.6/v2.8.6_zh_CN.md


+ 0 - 0
app/changelogs/v2.8.7.md → app/changelogs/v2.8.7/v2.8.7.md


+ 0 - 0
app/changelogs/v2.8.7_zh_CN.md → app/changelogs/v2.8.7/v2.8.7_zh_CN.md


+ 0 - 0
app/changelogs/v2.8.8.md → app/changelogs/v2.8.8/v2.8.8.md


+ 0 - 0
app/changelogs/v2.8.8_zh_CN.md → app/changelogs/v2.8.8/v2.8.8_zh_CN.md


+ 0 - 0
app/changelogs/v2.8.9.md → app/changelogs/v2.8.9/v2.8.9.md


+ 0 - 0
app/changelogs/v2.8.9_zh_CN.md → app/changelogs/v2.8.9/v2.8.9_zh_CN.md


+ 1 - 1
app/src/boot/openChangelog.ts

@@ -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>`

+ 1 - 1
kernel/api/system.go

@@ -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) {

+ 12 - 0
kernel/bazaar/package.go

@@ -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

+ 4 - 0
kernel/model/plugin.go

@@ -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 {