From 738c7917384632e8b9cd91ea15584c4067a3239c Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Fri, 14 Jul 2023 22:41:15 +0800
Subject: [PATCH 1/2] :art: Update text
---
app/appearance/langs/en_US.json | 6 +++---
app/appearance/langs/es_ES.json | 6 +++---
app/appearance/langs/fr_FR.json | 6 +++---
app/appearance/langs/zh_CHT.json | 6 +++---
app/appearance/langs/zh_CN.json | 6 +++---
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index be125f44b..a7d01db74 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -169,8 +169,8 @@
"workspaceList": "Workspaces",
"removeWorkspaceTip": "Remove from Workspaces",
"new": "New",
- "share2LiandiConfirmTip": "Are you sure to share this document to Liandi?",
- "share2Liandi": "Share to Liandi",
+ "share2LiandiConfirmTip": "Are you sure to share this document to community?",
+ "share2Liandi": "Share to community",
"noDueCard": "Great job! There are no more review tasks at the moment, check back later!",
"createDeck": "Create Deck",
"addDeck": "Add to deck",
@@ -1186,7 +1186,7 @@
"178": "Access Authorization - SiYuan",
"179": "The disk space may be insufficient. It is recommended to keep the free space of the disk where the workspace is located at more than twice the size of data",
"180": "Search content block does not exist",
- "181": "The document has been shared to Liandi, click to view",
+ "181": "The document has been shared to community, click to view",
"182": "Sharing document, please wait...",
"183": "Validating index document tree [%d/%d %s]",
"184": "Powered by SiYuan",
diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json
index 313073e80..3e492b62f 100644
--- a/app/appearance/langs/es_ES.json
+++ b/app/appearance/langs/es_ES.json
@@ -169,8 +169,8 @@
"workspaceList": "Áreas de trabajo",
"removeWorkspaceTip": "Quitar de los espacios de trabajo",
"new": "Nuevo",
- "share2LiandiConfirmTip": "¿Estás seguro de compartir este documento con Liandi?",
- "share2Liandi": "Compartir con Liandi",
+ "share2LiandiConfirmTip": "¿Estás seguro de compartir este documento con comunidad?",
+ "share2Liandi": "Compartir con comunidad",
"noDueCard": "¡Buen trabajo! No hay más tareas de revisión en este momento, ¡vuelve a comprobar más tarde!",
"createDeck": "Crear mazo",
"addDeck": "Añadir al mazo",
@@ -1186,7 +1186,7 @@
"178": "Autorización de acceso - SiYuan",
"179": "El espacio en disco puede ser insuficiente. Se recomienda mantener el espacio libre del disco donde se encuentra el espacio de trabajo en más del doble del tamaño de los datos",
"180": "El bloque de contenido de búsqueda no existe",
- "181": "El documento ha sido compartido con Liandi, haga clic para ver",
+ "181": "El documento ha sido compartido con comunidad, haga clic para ver",
"182": "Compartiendo documento, por favor espere...",
"183": "Validando el árbol del documento de índice [%d/%d %s]",
"184": "Con la tecnología de SiYuan",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index e4720e3fa..7a355e04d 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -169,8 +169,8 @@
"workspaceList": "Espaces de travail",
"removeWorkspaceTip": "Supprimer des espaces de travail",
"new": "Nouveau",
- "share2LiandiConfirmTip": "Êtes-vous sûr de partager ce document avec Liandi ?",
- "share2Liandi": "Partager avec Liandi",
+ "share2LiandiConfirmTip": "Êtes-vous sûr de partager ce document avec communauté ?",
+ "share2Liandi": "Partager avec communauté",
"noDueCard": "Excellent travail ! Il n'y a plus de tâches de révision pour le moment, revenez plus tard !",
"createDeck": "Créer un deck",
"addDeck": "Ajouter au deck",
@@ -1186,7 +1186,7 @@
"178": "Autorisation d'accès - SiYuan",
"179": "L'espace disque peut être insuffisant. Il est recommandé de conserver l'espace libre du disque où se trouve l'espace de travail à plus de deux fois la taille des données",
"180": "Le bloc de contenu de recherche n'existe pas",
- "181": "Le document a été partagé avec Liandi, cliquez pour afficher",
+ "181": "Le document a été partagé avec communauté, cliquez pour afficher",
"182": "Partage du document, veuillez patienter...",
"183": "Validation de l'arborescence du document d'index [%d/%d %s]",
"184": "Propulsé par SiYuan",
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index 6ca815c6d..2074b21df 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -169,8 +169,8 @@
"workspaceList": "工作空間",
"removeWorkspaceTip": "從工作空間列表中移除",
"new": "新建",
- "share2LiandiConfirmTip": "確定將該文檔分享到鏈滴嗎?",
- "share2Liandi": "分享到鏈滴",
+ "share2LiandiConfirmTip": "確定將該文檔分享到社區嗎?",
+ "share2Liandi": "分享到社區",
"noDueCard": "幹得漂亮!目前已經沒有更多複習任務,過一會再來看看吧!",
"createDeck": "建立卡包",
"addDeck": "加入卡包",
@@ -1186,7 +1186,7 @@
"178": "訪問授權 - 思源筆記",
"179": "磁碟空間可能不足,建議保持工作空間所在磁碟可用空間為 data 大小的 2 倍以上",
"180": "不存在符合條件的內容塊",
- "181": "已分享文檔到鏈滴,點擊查看",
+ "181": "已分享文檔到社區,點擊查看",
"182": "正在分享文檔,請稍等...",
"183": "正在校驗索引文檔樹 [%d/%d %s]",
"184": "由思源筆記強力驅動",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index 763bc1b34..990e9c9f9 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -169,8 +169,8 @@
"workspaceList": "工作空间",
"removeWorkspaceTip": "从工作空间列表中移除",
"new": "新建",
- "share2LiandiConfirmTip": "确定将该文档分享到链滴吗?",
- "share2Liandi": "分享到链滴",
+ "share2LiandiConfirmTip": "确定将该文档分享到社区吗?",
+ "share2Liandi": "分享到社区",
"noDueCard": "干得漂亮!目前已经没有更多复习任务,过一会再来看看吧!",
"createDeck": "创建卡包",
"addDeck": "加入卡包",
@@ -1186,7 +1186,7 @@
"178": "访问授权 - 思源笔记",
"179": "磁盘空间可能不足,建议保持工作空间所在磁盘可用空间为 data 大小的 2 倍以上",
"180": "不存在符合条件的内容块",
- "181": "已分享文档到链滴,点击查看",
+ "181": "已分享文档到社区,点击查看",
"182": "正在分享文档,请稍等...",
"183": "正在校验索引文档树 [%d/%d %s]",
"184": "由思源笔记强力驱动",
From d9c253d9e76bb594f404a770338d4786a5e8f0ca Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Fri, 14 Jul 2023 22:41:35 +0800
Subject: [PATCH 2/2] :bug: `Share to community` asset URL is incorrect on
LiuYun Fix https://github.com/siyuan-note/siyuan/issues/8758
---
kernel/model/export.go | 2 +-
kernel/util/cloud.go | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/kernel/model/export.go b/kernel/model/export.go
index a2c7d4153..f050113af 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -112,7 +112,7 @@ func Export2Liandi(id string) (err error) {
title := path.Base(tree.HPath)
tags := tree.Root.IALAttr("tags")
- content := exportMarkdownContent0(tree, "https://b3logfile.com/file/"+time.Now().Format("2006/01")+"/siyuan/"+Conf.User.UserId+"/", true,
+ content := exportMarkdownContent0(tree, util.GetCloudForumAssetsServer()+time.Now().Format("2006/01")+"/siyuan/"+Conf.User.UserId+"/", true,
4, 1, 0,
"#", "#",
"", "",
diff --git a/kernel/util/cloud.go b/kernel/util/cloud.go
index 9ebedb609..eb01867f8 100644
--- a/kernel/util/cloud.go
+++ b/kernel/util/cloud.go
@@ -53,18 +53,27 @@ func GetCloudAccountServer() string {
return northAmericaAccountServer
}
+func GetCloudForumAssetsServer() string {
+ if 0 == CurrentCloudRegion {
+ return chinaForumAssetsServer
+ }
+ return northAmericaForumAssetsServer
+}
+
const (
chinaServer = "https://siyuan-sync.b3logfile.com" // 中国大陆云端服务地址,阿里云负载均衡,用于接口,数据同步文件上传、下载会走七牛云 OSS ChinaSyncServer
chinaWebSocketServer = "wss://siyuan-sync.b3logfile.com" // 中国大陆云端服务地址,阿里云负载均衡,用于接口,数据同步文件上传、下载会走七牛云 OSS ChinaSyncServer
chinaSyncServer = "https://siyuan-data.b3logfile.com/" // 中国大陆云端数据同步服务地址,七牛云 OSS,用于数据同步文件上传、下载
chinaCloudAssetsServer = "https://assets.b3logfile.com/siyuan/" // 中国大陆云端图床服务地址,用于导出预览模式下订阅会员渲染图床
chinaAccountServer = "https://ld246.com" // 中国大陆链滴服务地址,用于账号登录、分享发布帖子
+ chinaForumAssetsServer = "https://b3logfile.com/file/" // 中国大陆链滴图床服务地址,用于发布文章到社区
northAmericaServer = "https://siyuan-cloud.liuyun.io" // 北美云端服务地址,Cloudflare
northAmericaWebSocketServer = "wss://siyuan-cloud.liuyun.io" // 北美云端服务地址,Cloudflare,用于接口,数据同步文件上传、下载会走七牛云 OSS ChinaSyncServer
northAmericaSyncServer = "https://siyuan-data.liuyun.io/" // 北美云端数据同步服务地址,七牛云 OSS,用于数据同步文件上传、下载
northAmericaCloudAssetsServer = "https://assets.liuyun.io/siyuan/" // 北美云端图床服务地址,用于导出预览模式下订阅会员渲染图床
northAmericaAccountServer = "https://liuyun.io" // 流云服务地址,用于账号登录、分享发布帖子
+ northAmericaForumAssetsServer = "https://assets.liuyun.io/file/" // 北美云端图床服务地址,用于发布文章到社区
BazaarStatServer = "http://bazaar.b3logfile.com" // 集市包统计服务地址,直接对接 Bucket 没有 CDN
BazaarOSSServer = "https://oss.b3logfile.com" // 云端对象存储地址,七牛云,仅用于读取集市包,全球 CDN