Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:globe_with_meridians: Improve consistency of block type labels https://github.com/siyuan-note/siyuan/issues/19418

Danielbc23fab100c4
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index f2d1632a9a..b88f48c966 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "كتلة جدول",
+ "databaseBlock": "كتلة قاعدة بيانات",
+ "widgetBlock": "كتلة عنصر واجهة",
+ "videoBlock": "كتلة فيديو",
+ "audioBlock": "كتلة صوت",
+ "documentBlock": "كتلة مستند",
+ "htmlBlock": "كتلة HTML",
+ "iframeBlock": "كتلة IFrame",
"pinnedDocs": "المثبتة",
"pinDoc": "تثبيت",
"unpinDoc": "إلغاء التثبيت",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index abf38f169a..fc8421724c 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Tabellenblock",
+ "databaseBlock": "Datenbankblock",
+ "widgetBlock": "Widgetblock",
+ "videoBlock": "Videoblock",
+ "audioBlock": "Audioblock",
+ "documentBlock": "Dokumentblock",
+ "htmlBlock": "HTML-Block",
+ "iframeBlock": "IFrame-Block",
"pinnedDocs": "Angeheftet",
"pinDoc": "Anheften",
"unpinDoc": "Loslösen",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index 8fccac998f..63ee830bea 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Table block",
+ "databaseBlock": "Database block",
+ "widgetBlock": "Widget block",
+ "videoBlock": "Video block",
+ "audioBlock": "Audio block",
+ "documentBlock": "Document block",
+ "htmlBlock": "HTML block",
+ "iframeBlock": "IFrame block",
"pinnedDocs": "Pinned",
"pinDoc": "Pin",
"unpinDoc": "Unpin",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index ddd3e3ac1c..7c2bfbe3e6 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Bloque de tabla",
+ "databaseBlock": "Bloque de base de datos",
+ "widgetBlock": "Bloque de widget",
+ "videoBlock": "Bloque de vídeo",
+ "audioBlock": "Bloque de audio",
+ "documentBlock": "Bloque de documento",
+ "htmlBlock": "Bloque HTML",
+ "iframeBlock": "Bloque IFrame",
"pinnedDocs": "Fijados",
"pinDoc": "Fijar",
"unpinDoc": "Desfijar",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index ea5cbab42d..2cc6c94f14 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Bloc de tableau",
+ "databaseBlock": "Bloc de base de données",
+ "widgetBlock": "Bloc de widget",
+ "videoBlock": "Bloc vidéo",
+ "audioBlock": "Bloc audio",
+ "documentBlock": "Bloc de document",
+ "htmlBlock": "Bloc HTML",
+ "iframeBlock": "Bloc IFrame",
"pinnedDocs": "Épinglés",
"pinDoc": "Épingler",
"unpinDoc": "Détacher",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index 939d3f799e..6a897e46f1 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "בלוק טבלה",
+ "databaseBlock": "בלוק מסד נתונים",
+ "widgetBlock": "בלוק וידג׳ט",
+ "videoBlock": "בלוק וידאו",
+ "audioBlock": "בלוק שמע",
+ "documentBlock": "בלוק מסמך",
+ "htmlBlock": "בלוק HTML",
+ "iframeBlock": "בלוק IFrame",
"pinnedDocs": "מוצמדים",
"pinDoc": "הצמדה",
"unpinDoc": "ביטול הצמדה",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index c345f8ffc3..1706cf9b4a 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "तालिका ब्लॉक",
+ "databaseBlock": "डेटाबेस ब्लॉक",
+ "widgetBlock": "विजेट ब्लॉक",
+ "videoBlock": "वीडियो ब्लॉक",
+ "audioBlock": "ऑडियो ब्लॉक",
+ "documentBlock": "दस्तावेज़ ब्लॉक",
+ "htmlBlock": "HTML ब्लॉक",
+ "iframeBlock": "IFrame ब्लॉक",
"pinnedDocs": "पिन किए गए",
"pinDoc": "पिन करें",
"unpinDoc": "अनपिन करें",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index cb4cc061ac..d91dba1f85 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Blok tabel",
+ "databaseBlock": "Blok basis data",
+ "widgetBlock": "Blok widget",
+ "videoBlock": "Blok video",
+ "audioBlock": "Blok audio",
+ "documentBlock": "Blok dokumen",
+ "htmlBlock": "Blok HTML",
+ "iframeBlock": "Blok IFrame",
"pinnedDocs": "Disematkan",
"pinDoc": "Sematkan",
"unpinDoc": "Lepaskan",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index b38d05f9b9..fb0ee6198c 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Blocco tabella",
+ "databaseBlock": "Blocco database",
+ "widgetBlock": "Blocco widget",
+ "videoBlock": "Blocco video",
+ "audioBlock": "Blocco audio",
+ "documentBlock": "Blocco documento",
+ "htmlBlock": "Blocco HTML",
+ "iframeBlock": "Blocco IFrame",
"pinnedDocs": "Fissati",
"pinDoc": "Fissa",
"unpinDoc": "Rimuovi dai fissati",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index c7b7e58700..b33054bdbb 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "表ブロック",
+ "databaseBlock": "データベースブロック",
+ "widgetBlock": "ウィジェットブロック",
+ "videoBlock": "動画ブロック",
+ "audioBlock": "音声ブロック",
+ "documentBlock": "ドキュメントブロック",
+ "htmlBlock": "HTML ブロック",
+ "iframeBlock": "IFrame ブロック",
"pinnedDocs": "ピン留め",
"pinDoc": "ピン留め",
"unpinDoc": "ピン留めを解除",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index 2693300fbf..6844d80ec7 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "표 블록",
+ "databaseBlock": "데이터베이스 블록",
+ "widgetBlock": "위젯 블록",
+ "videoBlock": "동영상 블록",
+ "audioBlock": "오디오 블록",
+ "documentBlock": "문서 블록",
+ "htmlBlock": "HTML 블록",
+ "iframeBlock": "IFrame 블록",
"pinnedDocs": "고정됨",
"pinDoc": "고정",
"unpinDoc": "고정 해제",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index d079cace54..95dc21a18a 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Tabelblok",
+ "databaseBlock": "Databaseblok",
+ "widgetBlock": "Widgetblok",
+ "videoBlock": "Videoblok",
+ "audioBlock": "Audioblok",
+ "documentBlock": "Documentblok",
+ "htmlBlock": "HTML-blok",
+ "iframeBlock": "IFrame-blok",
"pinnedDocs": "Vastgemaakt",
"pinDoc": "Vastmaken",
"unpinDoc": "Losmaken",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index 2d80e43861..fd9b61f1c9 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Blok tabeli",
+ "databaseBlock": "Blok bazy danych",
+ "widgetBlock": "Blok widżetu",
+ "videoBlock": "Blok wideo",
+ "audioBlock": "Blok audio",
+ "documentBlock": "Blok dokumentu",
+ "htmlBlock": "Blok HTML",
+ "iframeBlock": "Blok IFrame",
"pinnedDocs": "Przypięte",
"pinDoc": "Przypnij",
"unpinDoc": "Odepnij",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 4fe0860f63..3eaf1fe9ca 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Bloco de tabela",
+ "databaseBlock": "Bloco de banco de dados",
+ "widgetBlock": "Bloco de widget",
+ "videoBlock": "Bloco de vídeo",
+ "audioBlock": "Bloco de áudio",
+ "documentBlock": "Bloco de documento",
+ "htmlBlock": "Bloco HTML",
+ "iframeBlock": "Bloco IFrame",
"pinnedDocs": "Fixados",
"pinDoc": "Fixar",
"unpinDoc": "Desafixar",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index f6506bddff..3a12147a78 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Блок таблицы",
+ "databaseBlock": "Блок базы данных",
+ "widgetBlock": "Блок виджета",
+ "videoBlock": "Блок видео",
+ "audioBlock": "Блок аудио",
+ "documentBlock": "Блок документа",
+ "htmlBlock": "Блок HTML",
+ "iframeBlock": "Блок IFrame",
"pinnedDocs": "Закреплённые",
"pinDoc": "Закрепить",
"unpinDoc": "Открепить",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index 9be1919094..6174f5fe0b 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Blok tabuľky",
+ "databaseBlock": "Blok databázy",
+ "widgetBlock": "Blok miniaplikácie",
+ "videoBlock": "Blok videa",
+ "audioBlock": "Blok zvuku",
+ "documentBlock": "Blok dokumentu",
+ "htmlBlock": "Blok HTML",
+ "iframeBlock": "Blok IFrame",
"pinnedDocs": "Pripnuté",
"pinDoc": "Pripnúť",
"unpinDoc": "Odopnúť",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index f9784e3782..2489617cb4 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "บล็อกตาราง",
+ "databaseBlock": "บล็อกฐานข้อมูล",
+ "widgetBlock": "บล็อกวิดเจ็ต",
+ "videoBlock": "บล็อกวิดีโอ",
+ "audioBlock": "บล็อกเสียง",
+ "documentBlock": "บล็อกเอกสาร",
+ "htmlBlock": "บล็อก HTML",
+ "iframeBlock": "บล็อก IFrame",
"pinnedDocs": "ปักหมุด",
"pinDoc": "ปักหมุด",
"unpinDoc": "เลิกปักหมุด",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index b73301e552..884e374181 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Tablo bloğu",
+ "databaseBlock": "Veritabanı bloğu",
+ "widgetBlock": "Widget bloğu",
+ "videoBlock": "Video bloğu",
+ "audioBlock": "Ses bloğu",
+ "documentBlock": "Belge bloğu",
+ "htmlBlock": "HTML bloğu",
+ "iframeBlock": "IFrame bloğu",
"pinnedDocs": "Sabitlenenler",
"pinDoc": "Sabitle",
"unpinDoc": "Sabitlemeyi kaldır",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index 30f33ec947..4164e64ced 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "Блок таблиці",
+ "databaseBlock": "Блок бази даних",
+ "widgetBlock": "Блок віджета",
+ "videoBlock": "Блок відео",
+ "audioBlock": "Блок аудіо",
+ "documentBlock": "Блок документа",
+ "htmlBlock": "Блок HTML",
+ "iframeBlock": "Блок IFrame",
"pinnedDocs": "Закріплені",
"pinDoc": "Закріпити",
"unpinDoc": "Відкріпити",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index 2200df3b1e..0484902ff0 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "表格块",
+ "databaseBlock": "数据库块",
+ "widgetBlock": "挂件块",
+ "videoBlock": "视频块",
+ "audioBlock": "音频块",
+ "documentBlock": "文档块",
+ "htmlBlock": "HTML 块",
+ "iframeBlock": "IFrame 块",
"pinnedDocs": "置顶",
"pinDoc": "置顶",
"unpinDoc": "取消置顶",
@@ -82,7 +90,7 @@
"headingBatchWithSubheadingsTip": "子标题按相同级差升降,超出 H1 至 H6 的级别按 H1 或 H6 处理",
"newSiblingDoc": "新建同级文档",
"tabs": "页签块",
- "tabItem": "页签项",
+ "tabItem": "页签项块",
"tabsPositionTop": "顶部页签",
"tabsPositionLeft": "左侧页签",
"tabsUnwrap": "取消页签布局",
@@ -906,7 +914,7 @@
"recentDocsMaxListCountTip": "最近的文档对话框中列出文档的最大数量",
"bazaarNeedVersion": "需升级到思源笔记 v${x} 或更高版本才能使用",
"downloadRollback": "下载并回滚",
- "callout": "提示",
+ "callout": "提示块",
"hasAttrName": "属性名 <b>${x}</b> 已存在",
"statusBarMsgPushTip": "通过状态栏消息可以即时地了解系统的运行情况,如果感到打扰可以将其关闭",
"useBackground": "按选项颜色填充列背景",
@@ -1881,9 +1889,9 @@
"lineWidth": "连线粗细",
"nodeSize": "节点大小",
"arrow": "箭头",
- "paragraph": "段落",
+ "paragraph": "段落块",
"math": "公式块",
- "listItem": "列表项",
+ "listItem": "列表项块",
"superBlock": "超级块",
"embedBlock": "嵌入块",
"expand": "展开",
@@ -1928,18 +1936,18 @@
"invalid": "无效",
"conflict": "冲突",
"checkToggle": "任务列表勾选切换",
- "heading1": "一级标题",
- "heading2": "二级标题",
- "heading3": "三级标题",
- "heading4": "四级标题",
- "heading5": "五级标题",
- "heading6": "六级标题",
- "unorderedList": "无序列表",
+ "heading1": "一级标题块",
+ "heading2": "二级标题块",
+ "heading3": "三级标题块",
+ "heading4": "四级标题块",
+ "heading5": "五级标题块",
+ "heading6": "六级标题块",
+ "unorderedList": "无序列表块",
"outlineExpandLevel": "展开层级",
"expandAll": "全部展开",
"outlineKeepCurrentExpand": "保持当前标题展开",
"general": "通用",
- "list1": "列表",
+ "list1": "列表块",
"element": "元素",
"closeTab": "关闭当前页签",
"keymap": "快捷键",
@@ -2253,7 +2261,7 @@
"alternateText": "替代文本",
"bold": "粗体",
"cardPreview": "预览",
- "check": "任务列表",
+ "check": "任务列表块",
"code": "代码块",
"column": "列",
"copied": "已复制",
@@ -2270,7 +2278,7 @@
"fileTypeError": "文件类型不允许上传",
"fullscreen": "全屏切换",
"generate": "生成中",
- "headings": "标题",
+ "headings": "标题块",
"imageURL": "图片地址",
"indent": "列表缩进",
"info": "关于",
@@ -2286,10 +2294,10 @@
"link": "链接",
"image": "图片",
"ref": "引用",
- "list": "无序列表",
+ "list": "无序列表块",
"more": "更多",
"nameEmpty": "文件名不能为空",
- "ordered-list": "有序列表",
+ "ordered-list": "有序列表块",
"outdent": "列表反向缩进",
"outlineOutdent": "列表大纲反向缩进",
"outlineOutdentTip": "启用后将使用列表大纲式逻辑反向缩进,即将列表项移动到父级下方",
@@ -2307,7 +2315,7 @@
"pasteToWechatMP": "已复制,可粘贴到微信公众号平台",
"pasteToZhihu": "已复制,可粘贴到知乎",
"pasteToYuque": "已复制,可粘贴到语雀",
- "quote": "引述",
+ "quote": "引述块",
"startRecord": "开始录音",
"endRecord": "结束录音",
"record-tip": "该设备不支持录音功能",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 975da2c823..5eedbe01b6 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -1,4 +1,12 @@
{
+ "tableBlock": "表格區塊",
+ "databaseBlock": "數據庫區塊",
+ "widgetBlock": "小工具區塊",
+ "videoBlock": "影片區塊",
+ "audioBlock": "音訊區塊",
+ "documentBlock": "文件區塊",
+ "htmlBlock": "HTML 區塊",
+ "iframeBlock": "IFrame 區塊",
"pinnedDocs": "置頂",
"pinDoc": "置頂",
"unpinDoc": "取消置頂",
@@ -82,7 +90,7 @@
"headingBatchWithSubheadingsTip": "子標題依相同層級差升降,超出 H1 至 H6 的層級以 H1 或 H6 處理",
"newSiblingDoc": "新增同級文件",
"tabs": "頁籤區塊",
- "tabItem": "頁籤項",
+ "tabItem": "頁籤項區塊",
"tabsPositionTop": "頂部頁籤",
"tabsPositionLeft": "左側頁籤",
"tabsUnwrap": "取消頁籤版面配置",
@@ -906,7 +914,7 @@
"recentDocsMaxListCountTip": "在最近的文件對話框中最多列出文件的數量",
"bazaarNeedVersion": "需升級到思源筆記 v${x} 或更高版本才能使用",
"downloadRollback": "下載並回滾",
- "callout": "提示",
+ "callout": "提示區塊",
"hasAttrName": "屬性名 ${x} 已存在",
"statusBarMsgPushTip": "透過狀態列訊息可以即時地了解系統的運作情況,如果感到打擾可以將其關閉",
"useBackground": "按選項顏色填充列背景",
@@ -1882,9 +1890,9 @@
"lineWidth": "連線粗細",
"nodeSize": "節點大小",
"arrow": "箭頭",
- "paragraph": "段落",
+ "paragraph": "段落區塊",
"math": "公式區塊",
- "listItem": "列表項",
+ "listItem": "列表項區塊",
"superBlock": "超級區塊",
"embedBlock": "嵌入區塊",
"expand": "展開",
@@ -1928,18 +1936,18 @@
"invalid": "無效",
"conflict": "衝突",
"checkToggle": "任務列表勾選切換",
- "heading1": "一級標題",
- "heading2": "二級標題",
- "heading3": "三級標題",
- "heading4": "四級標題",
- "heading5": "五級標題",
- "heading6": "六級標題",
- "unorderedList": "無序列表",
+ "heading1": "一級標題區塊",
+ "heading2": "二級標題區塊",
+ "heading3": "三級標題區塊",
+ "heading4": "四級標題區塊",
+ "heading5": "五級標題區塊",
+ "heading6": "六級標題區塊",
+ "unorderedList": "無序列表區塊",
"outlineExpandLevel": "展開層級",
"expandAll": "全部展開",
"outlineKeepCurrentExpand": "保持當前標題展開",
"general": "通用",
- "list1": "列表",
+ "list1": "列表區塊",
"element": "元素",
"closeTab": "關閉當前分頁",
"keymap": "快速鍵",
@@ -2253,7 +2261,7 @@
"alternateText": "替代文字",
"bold": "粗體",
"cardPreview": "預覽",
- "check": "任務列表",
+ "check": "任務列表區塊",
"code": "代碼區塊",
"column": "欄",
"copied": "已複製",
@@ -2270,7 +2278,7 @@
"fileTypeError": "檔案類型不允許上傳",
"fullscreen": "全螢幕切換",
"generate": "生成中",
- "headings": "標題",
+ "headings": "標題區塊",
"imageURL": "圖片位址",
"indent": "列表縮進",
"info": "關於",
@@ -2286,10 +2294,10 @@
"link": "連結",
"image": "圖片",
"ref": "引用",
- "list": "無序列表",
+ "list": "無序列表區塊",
"more": "更多",
"nameEmpty": "檔案名不能為空",
- "ordered-list": "有序列表",
+ "ordered-list": "有序列表區塊",
"outdent": "列表反向縮進",
"outlineOutdent": "列表大綱反向縮進",
"outlineOutdentTip": "啟用後將使用列表大綱式邏輯反向縮進,即將列表項移動到父級下方",
@@ -2307,7 +2315,7 @@
"pasteToWechatMP": "已複製,可貼到微信公眾號平臺",
"pasteToZhihu": "已複製,可貼到知乎",
"pasteToYuque": "已複製,可貼到語雀",
- "quote": "引述",
+ "quote": "引述區塊",
"startRecord": "開始錄音",
"endRecord": "結束錄音",
"record-tip": "該設備不支援錄音功能",
diff --git a/app/src/block/util.ts b/app/src/block/util.ts
index c5dcb13be0..26d1c4e1ff 100644
--- a/app/src/block/util.ts
+++ b/app/src/block/util.ts
@@ -508,23 +508,26 @@ export const genHeadingElement = (headElement: Element, getHTML = false, addWbr
export const getLangByType = (type: string) => {
let lang = type;
switch (type) {
+ case "NodeHTMLBlock":
+ lang = window.siyuan.languages.htmlBlock;
+ break;
case "NodeIFrame":
- lang = "IFrame";
+ lang = window.siyuan.languages.iframeBlock;
break;
case "NodeAttributeView":
- lang = window.siyuan.languages.database;
+ lang = window.siyuan.languages.databaseBlock;
break;
case "NodeThematicBreak":
lang = window.siyuan.languages.line;
break;
case "NodeWidget":
- lang = window.siyuan.languages.widget;
+ lang = window.siyuan.languages.widgetBlock;
break;
case "NodeVideo":
- lang = window.siyuan.languages.video;
+ lang = window.siyuan.languages.videoBlock;
break;
case "NodeAudio":
- lang = window.siyuan.languages.audio;
+ lang = window.siyuan.languages.audioBlock;
break;
case "NodeCustomBlock":
lang = window.siyuan.languages.custom;
diff --git a/app/src/config/entryVisibility/catalog.test.ts b/app/src/config/entryVisibility/catalog.test.ts
index 9acae41ee1..4be66eeacd 100644
--- a/app/src/config/entryVisibility/catalog.test.ts
+++ b/app/src/config/entryVisibility/catalog.test.ts
@@ -957,6 +957,9 @@ test("configuration labels distinguish block scopes and size controls", () => {
entryDock: "Dock",
height: "Height",
entryDocumentStatistics: "Document statistics",
+ tableBlock: "Table block",
+ databaseBlock: "Database block",
+ htmlBlock: "HTML block",
},
},
},
@@ -977,6 +980,11 @@ test("configuration labels distinguish block scopes and size controls", () => {
assert.equal(getEntryCatalogNode("inline.image.height.heightInput")?.label(), "Pixel height");
assert.equal(getEntryCatalogNode("inline.image.height.heightDrag")?.label(), "Percentage height");
assert.equal(getEntryCatalogNode("document.more.docInfo")?.label(), "Document statistics");
+ assert.equal(getEntryCatalogNode("gutter.single.table")?.label(), "Table block");
+ assert.equal(getEntryCatalogNode("gutter.single.database")?.label(), "Database block");
+ assert.equal(getEntryCatalogNode("gutter.single.html")?.label(), "HTML block");
+ assert.equal(getEntryCatalogNode("gutter.single.turnInto.table")?.label(), "Table block");
+ assert.equal(getEntryCatalogNode("gutter.multi.turnInto.table")?.label(), "Table block");
} finally {
if (windowDescriptor) {
Object.defineProperty(globalThis, "window", windowDescriptor);
diff --git a/app/src/config/entryVisibility/catalog.ts b/app/src/config/entryVisibility/catalog.ts
index 1f1f1264ec..ab93e0f9a3 100644
--- a/app/src/config/entryVisibility/catalog.ts
+++ b/app/src/config/entryVisibility/catalog.ts
@@ -228,7 +228,7 @@ const gutterTurnInto = (multi: boolean) => node("turnInto", lang("turnInto"), tr
node("heading6", lang("heading6")),
...(!multi ? [node("superBlock", lang("superBlock"))] : []),
node("code", lang("code")),
- node("table", lang("table")),
+ node("table", lang("tableBlock")),
node("line", lang("line")),
node("math", lang("math")),
node("includeSublists", lang("includeSublists"), true, [
@@ -295,7 +295,7 @@ const gutterHeight = () => node("height", lang("height"), true, [
node("default", lang("default")),
]);
-const gutterTable = () => node("table", lang("table"), true, [
+const gutterTable = () => node("table", lang("tableBlock"), true, [
node("useDefaultWidth", lang("useDefaultWidth")),
node("distributeAllColWidths", lang("distributeAllColWidths")),
node("useDefaultWidthForAllColumns", lang("useDefaultWidthForAllColumns")),
@@ -395,7 +395,7 @@ const gutterSingle = () => [
separator("separator_table"),
gutterTable(),
separator("separator_exportCSV"),
- node("database", lang("database"), true, [
+ node("database", lang("databaseBlock"), true, [
node("exportCSV", () => `${window.siyuan.languages.export} CSV`),
node("showDatabaseInFolder", lang("showInFolder")),
]),
@@ -423,7 +423,7 @@ const gutterSingle = () => [
node("openBy", lang("openBy")),
]),
separator("separator_html"),
- node("html", literal("HTML")),
+ node("html", lang("htmlBlock")),
separator("separator_blockEmbed"),
node("blockEmbed", lang("blockEmbed"), true, [
node("refresh", lang("refresh")),
diff --git a/app/src/config/tabs/searchTab.ts b/app/src/config/tabs/searchTab.ts
index 87a3c3c749..70c4376a8d 100644
--- a/app/src/config/tabs/searchTab.ts
+++ b/app/src/config/tabs/searchTab.ts
@@ -9,17 +9,17 @@ const registerSearchQueryGroup = (tab: SettingTabBuilder) => {
footer: `[1] ${window.siyuan.languages.containerBlockTip1}`,
items: [
{kind: "switch", id: "search.mathBlock", label: window.siyuan.languages.math, icon: "iconMath"},
- {kind: "switch", id: "search.table", label: window.siyuan.languages.table, icon: "iconTable"},
+ {kind: "switch", id: "search.table", label: window.siyuan.languages.tableBlock, icon: "iconTable"},
{kind: "switch", id: "search.paragraph", label: window.siyuan.languages.paragraph, icon: "iconParagraph"},
{kind: "switch", id: "search.heading", label: window.siyuan.languages.headings, icon: "iconHeadings"},
{kind: "switch", id: "search.codeBlock", label: window.siyuan.languages.code, icon: "iconCode"},
- {kind: "switch", id: "search.htmlBlock", label: "HTML", icon: "iconHTML5"},
- {kind: "switch", id: "search.databaseBlock", label: window.siyuan.languages.database, icon: "iconDatabase"},
+ {kind: "switch", id: "search.htmlBlock", label: window.siyuan.languages.htmlBlock, icon: "iconHTML5"},
+ {kind: "switch", id: "search.databaseBlock", label: window.siyuan.languages.databaseBlock, icon: "iconDatabase"},
{kind: "switch", id: "search.embedBlock", label: window.siyuan.languages.embedBlock, icon: "iconSQL"},
- {kind: "switch", id: "search.videoBlock", label: window.siyuan.languages.video, icon: "iconVideo"},
- {kind: "switch", id: "search.audioBlock", label: window.siyuan.languages.audio, icon: "iconRecord"},
- {kind: "switch", id: "search.iframeBlock", label: "IFrame", icon: "iconGlobe"},
- {kind: "switch", id: "search.widgetBlock", label: window.siyuan.languages.widget, icon: "iconBoth"},
+ {kind: "switch", id: "search.videoBlock", label: window.siyuan.languages.videoBlock, icon: "iconVideo"},
+ {kind: "switch", id: "search.audioBlock", label: window.siyuan.languages.audioBlock, icon: "iconRecord"},
+ {kind: "switch", id: "search.iframeBlock", label: window.siyuan.languages.iframeBlock, icon: "iconGlobe"},
+ {kind: "switch", id: "search.widgetBlock", label: window.siyuan.languages.widgetBlock, icon: "iconBoth"},
{kind: "switch", id: "search.blockquote", label: `${window.siyuan.languages.quote} <sup>[1]</sup>`, icon: "iconQuote"},
{kind: "switch", id: "search.tabs", label: `${window.siyuan.languages.tabs} <sup>[1]</sup>`, icon: "iconTabs"},
{kind: "switch", id: "search.tabItem", label: `${window.siyuan.languages.tabItem} <sup>[1]</sup>`, icon: "iconTabItem"},
@@ -27,7 +27,7 @@ const registerSearchQueryGroup = (tab: SettingTabBuilder) => {
{kind: "switch", id: "search.superBlock", label: `${window.siyuan.languages.superBlock} <sup>[1]</sup>`, icon: "iconSuper"},
{kind: "switch", id: "search.list", label: `${window.siyuan.languages.list1} <sup>[1]</sup>`, icon: "iconList"},
{kind: "switch", id: "search.listItem", label: `${window.siyuan.languages.listItem} <sup>[1]</sup>`, icon: "iconListItem"},
- {kind: "switch", id: "search.document", label: window.siyuan.languages.doc, icon: "iconFile"},
+ {kind: "switch", id: "search.document", label: window.siyuan.languages.documentBlock, icon: "iconFile"},
],
});
group.switchQuery({
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 11c98d7c9e..14c6e0ae9c 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -160,15 +160,17 @@ const BLOCK_TYPE_LANG_KEYS: { [key: string]: string } = {
NodeTabs: "tabs",
NodeTabItem: "tabItem",
NodeSuperBlock: "superBlock",
- NodeTable: "table",
+ NodeTable: "tableBlock",
+ NodeHTMLBlock: "htmlBlock",
+ NodeIFrame: "iframeBlock",
NodeCodeBlock: "code",
NodeMathBlock: "math",
NodeBlockQueryEmbed: "blockEmbed",
NodeThematicBreak: "line",
- NodeVideo: "video",
- NodeAudio: "audio",
- NodeWidget: "widget",
- NodeAttributeView: "database",
+ NodeVideo: "videoBlock",
+ NodeAudio: "audioBlock",
+ NodeWidget: "widgetBlock",
+ NodeAttributeView: "databaseBlock",
NodeCustomBlock: "custom",
};
@@ -1114,7 +1116,7 @@ export class Gutter {
}, {
id: "table",
icon: "iconTable",
- label: window.siyuan.languages.table,
+ label: window.siyuan.languages.tableBlock,
accelerator: window.siyuan.config.keymap.editor.insert.table.custom,
type: "table",
}, {
@@ -2447,7 +2449,7 @@ export class Gutter {
id: "table",
type: "submenu",
icon: "iconTable",
- label: window.siyuan.languages.table,
+ label: window.siyuan.languages.tableBlock,
submenu: tableMenu(protyle, nodeElement, cellElement as HTMLTableCellElement, range,
true).menus as IMenu[]
}).element);
@@ -2493,7 +2495,7 @@ export class Gutter {
id: "database",
type: "submenu",
icon: "iconDatabase",
- label: window.siyuan.languages.database,
+ label: window.siyuan.languages.databaseBlock,
submenu,
}).element);
}
@@ -2520,7 +2522,7 @@ export class Gutter {
window.siyuan.menus.menu.append(new MenuItem({
id: "html",
icon: "iconHTML5",
- label: "HTML",
+ label: window.siyuan.languages.htmlBlock,
click() {
protyle.toolbar.showRender(protyle, nodeElement);
}
diff --git a/app/src/search/menu.ts b/app/src/search/menu.ts
index abd55b3e47..bb4b185831 100644
--- a/app/src/search/menu.ts
+++ b/app/src/search/menu.ts
@@ -30,7 +30,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconTable"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.table}
+ ${window.siyuan.languages.tableBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="table" type="checkbox"${config.types.table ? " checked" : ""}>
@@ -79,7 +79,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconHTML5"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- HTML
+ ${window.siyuan.languages.htmlBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="htmlBlock" type="checkbox"${config.types.htmlBlock ? " checked" : ""}>
@@ -88,7 +88,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconDatabase"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.database}
+ ${window.siyuan.languages.databaseBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="databaseBlock" type="checkbox"${config.types.databaseBlock ? " checked" : ""}>
@@ -106,7 +106,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconVideo"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.video}
+ ${window.siyuan.languages.videoBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="videoBlock" type="checkbox"${config.types.videoBlock ? " checked" : ""}>
@@ -115,7 +115,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconRecord"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.audio}
+ ${window.siyuan.languages.audioBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="audioBlock" type="checkbox"${config.types.audioBlock ? " checked" : ""}>
@@ -124,7 +124,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconGlobe"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- IFrame
+ ${window.siyuan.languages.iframeBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="iframeBlock" type="checkbox"${config.types.iframeBlock ? " checked" : ""}>
@@ -133,7 +133,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconBoth"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.widget}
+ ${window.siyuan.languages.widgetBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="widgetBlock" type="checkbox"${config.types.widgetBlock ? " checked" : ""}>
@@ -191,7 +191,7 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconFile"></use></svg>
<span class="fn__space"></span>
<div class="fn__flex-1 fn__flex-center">
- ${window.siyuan.languages.doc}
+ ${window.siyuan.languages.documentBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="document" type="checkbox"${config.types.document ? " checked" : ""}>