浏览代码

:art: Improve text

* 语言

动词 引用块 → 名词 块引用

* app/src/protyle/wysiwyg/transaction.ts

* app/src/protyle/hint/extend.ts

* Update API_zh_CN.md

* Update 20200813004551-gm0pbn1.sy

* Update README_zh_CN.md

* Update transaction.go

* Update 20200813131152-0wk5akh.sy

* Update 20210127202655-2334vvv.sy

* Update 20200813004551-gm0pbn1.sy

* Update 20200813004551-gm0pbn1.sy

* Update 20211226122549-jktxego.sy

* Update 20211226122943-st7fpcj.sy

* Update 20211226120349-rbkmozu.sy
Jeffrey Chen 1 年之前
父节点
当前提交
391c9d41e8

+ 1 - 1
API_zh_CN.md

@@ -900,7 +900,7 @@
 
 
     * `fromID`:定义块 ID
     * `fromID`:定义块 ID
     * `toID`:目标块 ID
     * `toID`:目标块 ID
-    * `refIDs`:指向定义块 ID 的引用所在块 ID,可选,如果不指定,所有指向定义块 ID 的引用 ID 都会被转移
+    * `refIDs`:指向定义块 ID 的引用所在块 ID,可选,如果不指定,所有指向定义块 ID 的引用 ID 都会被转移
 * 返回值
 * 返回值
 
 
   ```json
   ```json

+ 1 - 1
README_zh_CN.md

@@ -58,7 +58,7 @@
   * 网页剪藏
   * 网页剪藏
   * PDF 标注双链
   * PDF 标注双链
 * 导出
 * 导出
-  * 引用和嵌入块 
+  * 引用和嵌入块 
   * 带 assets 文件夹的标准 Markdown
   * 带 assets 文件夹的标准 Markdown
   * PDF、Word 和 HTML
   * PDF、Word 和 HTML
   * 复制到微信公众号、知乎和语雀
   * 复制到微信公众号、知乎和语雀

+ 3 - 3
app/appearance/langs/zh_CHT.json

@@ -917,7 +917,7 @@
   "missingAssets": "丟失的資料文件",
   "missingAssets": "丟失的資料文件",
   "unreferencedAssets": "未引用的資料文件",
   "unreferencedAssets": "未引用的資料文件",
   "paste": "貼上",
   "paste": "貼上",
-  "pasteRef": "貼上引用",
+  "pasteRef": "貼上引用",
   "pasteEmbed": "貼上塊嵌入",
   "pasteEmbed": "貼上塊嵌入",
   "cut": "剪下",
   "cut": "剪下",
   "mentions": "提及",
   "mentions": "提及",
@@ -1018,7 +1018,7 @@
   "fileTree20": "使用單行保存",
   "fileTree20": "使用單行保存",
   "fileTree21": "啟用後儲存 .sy 文件和資料庫 .json 時將使用單行 JSON 格式,大約能減少 30% 檔案大小並提升 50% 讀寫效率",
   "fileTree21": "啟用後儲存 .sy 文件和資料庫 .json 時將使用單行 JSON 格式,大約能減少 30% 檔案大小並提升 50% 讀寫效率",
   "export10": "例如 <code class='fn__code'>&lt;span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\"&gt;SiYuan&lt;/span&gt;</code> ,為空時使用水印文字或浮水印檔案路徑。",
   "export10": "例如 <code class='fn__code'>&lt;span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\"&gt;SiYuan&lt;/span&gt;</code> ,為空時使用水印文字或浮水印檔案路徑。",
-  "export11": "匯出時關於引用內容的處理方式",
+  "export11": "匯出時關於引用內容的處理方式",
   "export12": "匯出時關於嵌入塊內容的處理方式",
   "export12": "匯出時關於嵌入塊內容的處理方式",
   "export13": "錨文字包裹符號",
   "export13": "錨文字包裹符號",
   "export14": "請依次在輸入框中填寫錨文字左側符號和錨文字右側符號",
   "export14": "請依次在輸入框中填寫錨文字左側符號和錨文字右側符號",
@@ -1065,7 +1065,7 @@
   "closeRight": "關閉右側分頁",
   "closeRight": "關閉右側分頁",
   "closeUnmodified": "關閉未修改的分頁",
   "closeUnmodified": "關閉未修改的分頁",
   "newFileTip": "請先打開一個筆記本",
   "newFileTip": "請先打開一個筆記本",
-  "copyBlockRef": "複製為引用",
+  "copyBlockRef": "複製為引用",
   "copyBlockEmbed": "複製為嵌入塊",
   "copyBlockEmbed": "複製為嵌入塊",
   "linkLevel": "層級",
   "linkLevel": "層級",
   "mark": "標記",
   "mark": "標記",

+ 3 - 3
app/appearance/langs/zh_CN.json

@@ -917,7 +917,7 @@
   "missingAssets": "丢失的资源文件",
   "missingAssets": "丢失的资源文件",
   "unreferencedAssets": "未引用的资源文件",
   "unreferencedAssets": "未引用的资源文件",
   "paste": "粘贴",
   "paste": "粘贴",
-  "pasteRef": "粘贴引用",
+  "pasteRef": "粘贴引用",
   "pasteEmbed": "粘贴块嵌入",
   "pasteEmbed": "粘贴块嵌入",
   "cut": "剪切",
   "cut": "剪切",
   "mentions": "提及",
   "mentions": "提及",
@@ -1018,7 +1018,7 @@
   "fileTree20": "使用单行保存",
   "fileTree20": "使用单行保存",
   "fileTree21": "启用后保存 .sy 文档和数据库 .json 时将使用单行 JSON 格式,大约能减少 30% 文件大小并提升 50% 读写效率",
   "fileTree21": "启用后保存 .sy 文档和数据库 .json 时将使用单行 JSON 格式,大约能减少 30% 文件大小并提升 50% 读写效率",
   "export10": "例如 <code class='fn__code'>&lt;span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\"&gt;SiYuan&lt;/span&gt;</code> ,为空时使用水印文本或水印文件路径。",
   "export10": "例如 <code class='fn__code'>&lt;span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\"&gt;SiYuan&lt;/span&gt;</code> ,为空时使用水印文本或水印文件路径。",
-  "export11": "导出时关于引用内容的处理方式",
+  "export11": "导出时关于引用内容的处理方式",
   "export12": "导出时关于嵌入块内容的处理方式",
   "export12": "导出时关于嵌入块内容的处理方式",
   "export13": "锚文本包裹符号",
   "export13": "锚文本包裹符号",
   "export14": "请依次在输入框中填写锚文本左侧符号和锚文本右侧符号",
   "export14": "请依次在输入框中填写锚文本左侧符号和锚文本右侧符号",
@@ -1065,7 +1065,7 @@
   "closeRight": "关闭右侧页签",
   "closeRight": "关闭右侧页签",
   "closeUnmodified": "关闭未修改的页签",
   "closeUnmodified": "关闭未修改的页签",
   "newFileTip": "请先打开一个笔记本",
   "newFileTip": "请先打开一个笔记本",
-  "copyBlockRef": "复制为引用",
+  "copyBlockRef": "复制为引用",
   "copyBlockEmbed": "复制为嵌入块",
   "copyBlockEmbed": "复制为嵌入块",
   "linkLevel": "层级",
   "linkLevel": "层级",
   "mark": "标记",
   "mark": "标记",

+ 2 - 2
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200813131152-0wk5akh.sy

@@ -371,7 +371,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "鼠标悬浮引用前面的标识会弹出预览浮窗"
+									"Data": "鼠标悬浮引用前面的标识会弹出预览浮窗"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -403,7 +403,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "单击反链列表中的引用进行跳转"
+									"Data": "单击反链列表中的引用进行跳转"
 								}
 								}
 							]
 							]
 						}
 						}

+ 1 - 1
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy

@@ -3445,7 +3445,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "复制该块为引用"
+									"Data": "复制该块为引用"
 								}
 								}
 							]
 							]
 						},
 						},

+ 1 - 1
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210127202655-2334vvv.sy

@@ -180,7 +180,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "在 PDF 中鼠标悬浮标注可预览引用块"
+									"Data": "在 PDF 中鼠标悬浮标注可预览引用标注的块"
 								}
 								}
 							]
 							]
 						}
 						}

+ 2 - 2
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120349-rbkmozu.sy

@@ -326,7 +326,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "滑鼠懸浮引用前面的標識會彈出預覽浮窗"
+									"Data": "滑鼠懸浮引用前面的標識會彈出預覽浮窗"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -354,7 +354,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "單擊反連列表中的引用進行跳轉"
+									"Data": "單擊反連列表中的引用進行跳轉"
 								}
 								}
 							]
 							]
 						}
 						}

+ 3 - 3
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy

@@ -3441,7 +3441,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "複製該塊為引用"
+									"Data": "複製該塊為引用"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -6665,7 +6665,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "在下側打開引用"
+									"Data": "在下側打開引用"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -7444,7 +7444,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "引用"
+									"Data": "引用"
 								}
 								}
 							]
 							]
 						},
 						},

+ 1 - 1
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122943-st7fpcj.sy

@@ -181,7 +181,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "在 PDF 中滑鼠懸浮標注可預覽引用塊"
+									"Data": "在 PDF 中滑鼠懸浮標注可預覽引用標注的塊"
 								}
 								}
 							]
 							]
 						}
 						}

+ 1 - 1
app/src/protyle/hint/extend.ts

@@ -35,7 +35,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
         value: Constants.ZWSP + 2,
         value: Constants.ZWSP + 2,
         html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconImage"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.assets}</span></div>`,
         html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconImage"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.assets}</span></div>`,
     }, {
     }, {
-        filter: ["引用", "yinyong", "yy", "block reference"],
+        filter: ["引用", "yinyong", "yy", "block reference"],
         value: "((",
         value: "((",
         html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconRef"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.ref}</span><span class="b3-list-item__meta">((</span></div>`,
         html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconRef"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.ref}</span><span class="b3-list-item__meta">((</span></div>`,
     }, {
     }, {

+ 6 - 6
app/src/protyle/wysiwyg/transaction.ts

@@ -49,7 +49,7 @@ const removeTopElement = (updateElement: Element, protyle: IProtyle) => {
     }
     }
 };
 };
 
 
-// 用于执行操作,外加处理当前编辑器中引用、嵌入块的更新
+// 用于执行操作,外加处理当前编辑器中引用、嵌入块的更新
 const promiseTransaction = () => {
 const promiseTransaction = () => {
     if (window.siyuan.transactions.length === 0) {
     if (window.siyuan.transactions.length === 0) {
         return;
         return;
@@ -172,7 +172,7 @@ const promiseTransaction = () => {
                 }
                 }
                 // 当前编辑器中更新嵌入块
                 // 当前编辑器中更新嵌入块
                 updateEmbed(protyle, operation);
                 updateEmbed(protyle, operation);
-                // 更新引用
+                // 更新引用
                 updateRef(protyle, operation.id);
                 updateRef(protyle, operation.id);
                 return;
                 return;
             }
             }
@@ -293,7 +293,7 @@ const promiseTransaction = () => {
                 //         blockRender(protyle, item);
                 //         blockRender(protyle, item);
                 //     }
                 //     }
                 // });
                 // });
-                // 更新引用
+                // 更新引用
                 updateRef(protyle, operation.id);
                 updateRef(protyle, operation.id);
             }
             }
         });
         });
@@ -371,7 +371,7 @@ const updateBlock = (updateElements: Element[], protyle: IProtyle, operation: IO
     blockRender(protyle, updateElements.length === 1 ? updateElements[0] : protyle.wysiwyg.element);
     blockRender(protyle, updateElements.length === 1 ? updateElements[0] : protyle.wysiwyg.element);
     // 更新 ws 嵌入块
     // 更新 ws 嵌入块
     updateEmbed(protyle, operation);
     updateEmbed(protyle, operation);
-    // 更新 ws 引用
+    // 更新 ws 引用
     updateRef(protyle, operation.id);
     updateRef(protyle, operation.id);
 };
 };
 
 
@@ -476,7 +476,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
         } else { // updateElements 没有包含嵌入块,在悬浮层编辑嵌入块时,嵌入块也需要更新
         } else { // updateElements 没有包含嵌入块,在悬浮层编辑嵌入块时,嵌入块也需要更新
             // 更新 ws 嵌入块
             // 更新 ws 嵌入块
             updateEmbed(protyle, operation);
             updateEmbed(protyle, operation);
-            // 更新 ws 引用
+            // 更新 ws 引用
             updateRef(protyle, operation.id);
             updateRef(protyle, operation.id);
         }
         }
         return;
         return;
@@ -733,7 +733,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
                 wbrElement.remove();
                 wbrElement.remove();
             }
             }
         });
         });
-        // 更新 ws 引用
+        // 更新 ws 引用
         updateRef(protyle, operation.id);
         updateRef(protyle, operation.id);
         return;
         return;
     }
     }

+ 2 - 2
kernel/model/transaction.go

@@ -1378,7 +1378,7 @@ func (tx *Transaction) writeTree(tree *parse.Tree) (err error) {
 	return
 	return
 }
 }
 
 
-// refreshDynamicRefText 用于刷新引用的动态锚文本。
+// refreshDynamicRefText 用于刷新引用的动态锚文本。
 // 该实现依赖了数据库缓存,导致外部调用时可能需要阻塞等待数据库写入后才能获取到 refs
 // 该实现依赖了数据库缓存,导致外部调用时可能需要阻塞等待数据库写入后才能获取到 refs
 func refreshDynamicRefText(updatedDefNode *ast.Node, updatedTree *parse.Tree) {
 func refreshDynamicRefText(updatedDefNode *ast.Node, updatedTree *parse.Tree) {
 	changedDefs := map[string]*ast.Node{updatedDefNode.ID: updatedDefNode}
 	changedDefs := map[string]*ast.Node{updatedDefNode.ID: updatedDefNode}
@@ -1386,7 +1386,7 @@ func refreshDynamicRefText(updatedDefNode *ast.Node, updatedTree *parse.Tree) {
 	refreshDynamicRefTexts(changedDefs, changedTrees)
 	refreshDynamicRefTexts(changedDefs, changedTrees)
 }
 }
 
 
-// refreshDynamicRefTexts 用于批量刷新引用的动态锚文本。
+// refreshDynamicRefTexts 用于批量刷新引用的动态锚文本。
 // 该实现依赖了数据库缓存,导致外部调用时可能需要阻塞等待数据库写入后才能获取到 refs
 // 该实现依赖了数据库缓存,导致外部调用时可能需要阻塞等待数据库写入后才能获取到 refs
 func refreshDynamicRefTexts(updatedDefNodes map[string]*ast.Node, updatedTrees map[string]*parse.Tree) {
 func refreshDynamicRefTexts(updatedDefNodes map[string]*ast.Node, updatedTrees map[string]*parse.Tree) {
 	// 1. 更新引用的动态锚文本
 	// 1. 更新引用的动态锚文本