An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 查找替换中使用正则表达式后替换不正确 https://github.com/siyuan-note/siyuan/issues/6722
Liang Ding8fa0a2088d74
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex ce1ae764e2..4c179bf5a6 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -1,4 +1,5 @@{+ "keyword": "Keyword","searchMethod": "Search Method","regex": "Regex","groupBy": "Group By",@@ -960,7 +961,7 @@"129": "Cloud data has been corrupted, please refer to <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">here</a> to resolve the issue","130": "Starting new version installer...","131": "This operation is not supported, please go to the cloud storage provider management console to operate",- "132": "The current search method does not support the replace operation, please use the [Text] or [Regex] search method",+ "132": "The current search method does not support the replace operation, please use the [Keyword] or [Regex] search method","133": "TODO","134": "In order to prevent the newly restored data from being overwritten by synchronization, the data synchronization function has been automatically suspended","135": "Unable to decrypt data. Make sure to use the same key on multiple devices, then create a new cloud directory to sync",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 1dd576df14..fd414d6355 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -1,4 +1,5 @@{+ "keyword": "Palabra clave","searchMethod": "método de búsqueda","regex": "Regex","groupBy": "Agrupar por",@@ -960,7 +961,7 @@"129": "Los datos de la nube se han dañado, consulte <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">aquí</a> para resolver el problema","130": "Iniciando instalador de nueva versión...","131": "Esta solicitud no es compatible, vaya a la consola de administración del proveedor de almacenamiento en la nube para operar",- "132": "El método de búsqueda actual no admite la operación de reemplazo, utilice el método de búsqueda [Texto] o [Regex]",+ "132": "El método de búsqueda actual no admite la operación de reemplazo, utilice el método de búsqueda [Palabra clave] o [Regex]","133": "TODO","134": "Para evitar que los datos recién restaurados sean sobrescritos por la sincronización, se ha suspendido automáticamente la función de sincronización de datos","135": "No se pueden descifrar los datos. Asegúrese de usar la misma clave en varios dispositivos, luego cree un nuevo directorio en la nube para sincronizar",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 640a0574b0..e27cdde7ec 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -1,4 +1,5 @@{+ "keyword": "Mot-clé","searchMethod": "méthode de recherche","regex": "Regex","groupBy": "Regrouper par",@@ -960,7 +961,7 @@"129": "Les données cloud ont été corrompues, veuillez vous référer à <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">ici</a> pour résoudre le problème","130": "Démarrage du programme d'installation de la nouvelle version...","131": "Cette opération n'est pas prise en charge, veuillez vous rendre sur la console de gestion du fournisseur de stockage cloud pour opérer",- "132": "La méthode de recherche actuelle ne prend pas en charge l'opération de remplacement, veuillez utiliser la méthode de recherche [Texte] ou [Regex]",+ "132": "La méthode de recherche actuelle ne prend pas en charge l'opération de remplacement, veuillez utiliser la méthode de recherche [Mot-clé] ou [Regex]","133": "TODO","134": "Afin d'éviter que les données nouvellement restaurées ne soient écrasées par la synchronisation, la fonction de synchronisation des données a été automatiquement suspendue","135": "Impossible de déchiffrer les données. Assurez-vous d'utiliser la même clé sur plusieurs appareils, puis créez un nouveau répertoire cloud à synchroniser",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex b7a872ff9a..188a9cac7a 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -1,4 +1,5 @@{+ "keyword": "關鍵字","searchMethod":"搜索方式","regex":"正則表達式","groupBy": "分組",@@ -960,7 +961,7 @@"129": "雲端數據已經損壞,請參考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">這裡</a>解決該問題","130": "正在啟動新版本安裝程序...","131": "不支持該操作,請到雲端存儲提供商管理控制台進行操作",- "132": "當前搜索方式下不支持替換操作,請使用 [文本] 或 [正則表達式] 搜索方式",+ "132": "當前搜索方式下不支持替換操作,請使用 [關鍵字] 或 [正則表達式] 搜索方式","133": "TODO","134": "為避免剛恢復的數據被同步覆蓋,數據同步功能已被自動暫停","135": "無法解密數據。請確保多個設備上使用相同的密鑰,然後創建新的雲端目錄進行同步",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 99025eaf94..5a6acd72e1 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -1,4 +1,5 @@{+ "keyword": "关键字","searchMethod":"搜索方式","regex":"正则表达式","groupBy": "分组",@@ -960,7 +961,7 @@"129": "云端数据已经损坏,请参考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">这里</a>解决该问题","130": "正在启动新版本安装程序...","131": "不支持该操作,请到云端存储提供商管理控制台进行操作",- "132": "当前搜索方式下不支持替换操作,请使用 [文本] 或 [正则表达式] 搜索方式",+ "132": "当前搜索方式下不支持替换操作,请使用 [关键字] 或 [正则表达式] 搜索方式","133": "TODO","134": "为避免刚恢复的数据被同步覆盖,数据同步功能已被自动暂停","135": "无法解密数据。请确保多个设备上使用相同的密钥,然后创建新的云端目录进行同步",diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex 1c7b71d7ae..afa6444d58 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -77,7 +77,7 @@ export const openGlobalSearch = (text: string, replace: boolean) => {};export const genSearch = (config: ISearchOption, element: Element, closeCB?: () => void) => {- let methodText = window.siyuan.languages.text;+ let methodText = window.siyuan.languages.keyword;if (config.method === 1) {methodText = window.siyuan.languages.querySyntax}else if (config.method === 2) {@@ -526,11 +526,11 @@ const addConfigMenu = (config: ISearchOption, lang: string, key: "mathBlock" | "const addQueryMenu = (config: ISearchOption, edit: Protyle, element: Element) => {const searchSyntaxCheckElement = element.querySelector("#searchSyntaxCheck")window.siyuan.menus.menu.append(new MenuItem({- label: window.siyuan.languages.text,+ label: window.siyuan.languages.keyword,current: config.method === 0,click() {config.method = 0;- searchSyntaxCheckElement.setAttribute("aria-label", `${window.siyuan.languages.searchMethod} ${window.siyuan.languages.text}`);+ searchSyntaxCheckElement.setAttribute("aria-label", `${window.siyuan.languages.searchMethod} ${window.siyuan.languages.keyword}`);inputEvent(element, config, undefined, edit);}}).element);