An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve startup prompt after workspace loss https://github.com/siyuan-note/siyuan/issues/14748
Daniel1d1b7448107c
diff --git a/app/electron/missing-workspace.html b/app/electron/missing-workspace.htmlindex 81db29bb5b..03a2abe2dc 100644--- a/app/electron/missing-workspace.html+++ b/app/electron/missing-workspace.html@@ -416,36 +416,36 @@</style></head><body>-<div id="zhCN" class="layout">+<div id="layout" class="layout"><div class="wsPanel">- <div class="wsTitle">工作空间</div>+ <div class="wsTitle" data-i18n="wsTitle"></div><div class="wsList"></div></div><div class="fn__flex-column right"><div class="fn__flex-1"></div><img class="icon">- <h2>思源笔记</h2>+ <h2 data-i18n="title"></h2><div class="fn__flex-1"></div><div class="missing-tip">- <div>⚠️ 找不到上次打开的工作空间路径</div>+ <div data-i18n="missingTip"></div><div class="missing-path"><code class="missing"></code></div></div><div class="fn__flex-1"></div><div class="notice fn__none emptyHint">- <span>当前没有可用的工作空间,请选择新的工作空间路径</span>+ <span data-i18n="emptyHint"></span></div><label class="b3-label"><div>- 🗂️ 选择新的工作空间路径- <div class="b3-label__text">工作空间用于存放数据,后续可以在顶栏左上角的主菜单中进行切换</div>+ <span data-i18n="selectPath"></span>+ <div class="b3-label__text" data-i18n="selectPathDesc"></div></div><div class="fn__flex-1"></div>- <button class="b3-button fn__flex-center choosePath">选择</button>+ <button class="b3-button fn__flex-center choosePath" data-i18n="selectBtn"></button></label><label class="b3-label"><div>- 🌐 外观语言- <div class="b3-label__text">用户界面语言,后续可以在 <kbd>设置</kbd> - <kbd>外观</kbd> 中进行切换</div>+ <span data-i18n="lang"></span>+ <div class="b3-label__text" data-i18n-html="langDesc"></div></div><div class="fn__flex-1"></div><select class="b3-select lang">@@ -474,78 +474,9 @@</label><div class="fn__flex-1"></div><div class="feedback">- <span>❤️ <a href="https://ld246.com/article/1649901726096" target="_blank">求助反馈建议</a></span>- <span>🏘️ <a href="https://ld246.com/article/1640266171309" target="_blank">用户社区汇总</a></span>- <span>🔖 <a href="https://b3log.org/siyuan/download.html" target="_blank" class="version"></a></span>- </div>- <div class="fn__flex-1"></div>- </div>-</div>-<div class="fn__none layout" id="enUS">- <div class="wsPanel">- <div class="wsTitle">Workspaces</div>- <div class="wsList"></div>- </div>- <div class="fn__flex-column right">- <div class="fn__flex-1"></div>- <img class="icon">- <h2>SiYuan</h2>- <div class="fn__flex-1"></div>- <div class="missing-tip">- <div>⚠️ The last opened workspace path could not be found</div>- <div class="missing-path"><code class="missing"></code></div>- </div>- <div class="fn__flex-1"></div>- <div class="notice fn__none emptyHint">- <span>No available workspaces, please select a new workspace path</span>- </div>- <label class="b3-label">- <div>- 🗂️ Select a new workspace path- <div class="b3-label__text">The workspace is used to store data, which can be switched later in the top bar- menu later- </div>- </div>- <div class="fn__flex-1"></div>- <button class="b3-button fn__flex-center choosePath">Select</button>- </label>- <label class="b3-label">- <div>- 🌐 Language- <div class="b3-label__text">User interface language, which can be switched later in <kbd>Settings</kbd> -- <kbd>Appearance</kbd>- </div>- </div>- <div class="fn__flex-1"></div>- <select class="b3-select lang">- <option value="ar">العربية</option>- <option value="de">Deutsch</option>- <option value="en">English</option>- <option value="es">Español</option>- <option value="fr">Français</option>- <option value="he">עברית</option>- <option value="hi">हिन्दी</option>- <option value="id">Bahasa Indonesia</option>- <option value="it">Italiano</option>- <option value="ja">日本語</option>- <option value="ko">한국어</option>- <option value="nl">Nederlands</option>- <option value="pl">Polski</option>- <option value="pt-BR">Português (Brasil)</option>- <option value="ru">Русский</option>- <option value="sk">Slovenčina</option>- <option value="th">ไทย</option>- <option value="tr">Türkçe</option>- <option value="uk">Українська</option>- <option value="zh-TW">繁體中文</option>- <option value="zh-CN">简体中文</option>- </select>- </label>- <div class="fn__flex-1"></div>- <div class="feedback">- <span>❤️ <a href="https://liuyun.io/article/1686530886208" target="_blank">Support and Feedback</a></span>- <span>🏘️ <a href="https://liuyun.io/article/1687779743723" target="_blank">User community summary</a></span>- <span>🔖 <a href="https://b3log.org/siyuan/en/download.html" target="_blank" class="version"></a></span>+ <span>❤️ <a data-i18n-href="feedbackUrl" target="_blank" data-i18n="feedback"></a></span>+ <span>🏘️ <a data-i18n-href="communityUrl" target="_blank" data-i18n="community"></a></span>+ <span>🔖 <a data-i18n-href="downloadUrl" target="_blank" class="version"></a></span></div><div class="fn__flex-1"></div></div>@@ -558,10 +489,6 @@</svg><div class="drag"></div><script>- const isChinese = (lang) => {- return 'zh-CN' === lang || 'zh-TW' === lang- }-const getSearch = (key) => {if (window.location.search.indexOf('?') === -1) {return ''@@ -578,41 +505,429 @@return value}- let currentLang = decodeURIComponent(getSearch('lang'))- const setLang = (lang) => {- if (isChinese(lang)) {- document.title = `思源笔记 v${getSearch('v')}`- document.getElementById('zhCN').classList.remove('fn__none')- document.getElementById('enUS').classList.add('fn__none')- } else {- document.title = `SiYuan v${getSearch('v')}`- document.getElementById('zhCN').classList.add('fn__none')- document.getElementById('enUS').classList.remove('fn__none')- }- currentLang = lang+ // 多语言文案,直接写死在 HTML 中,支持 21 种语言+ // 中文用 ld246.com,其他语言用 liuyun.io https://github.com/siyuan-note/siyuan/issues/14748+ const I18N = {+ "zh-CN": {+ title: "思源笔记", wsTitle: "工作空间",+ missingTip: "⚠️ 找不到上次打开的工作空间路径",+ emptyHint: "当前没有可用的工作空间,请选择新的工作空间路径",+ selectPath: "🗂️ 选择新的工作空间路径",+ selectPathDesc: "工作空间用于存放数据,后续可以在顶栏左上角的主菜单中进行切换",+ selectBtn: "选择", lang: "🌐 外观语言",+ langDesc: "用户界面语言,后续可以在 <kbd>设置</kbd> - <kbd>外观</kbd> 中进行切换",+ open: "打开", feedback: "求助反馈建议", community: "用户社区汇总", download: "下载最新版",+ feedbackUrl: "https://ld246.com/article/1649901726096",+ communityUrl: "https://ld246.com/article/1640266171309",+ downloadUrl: "https://b3log.org/siyuan/download.html",+ msgPartitionRoot: "⚠️ 请勿在分区根路径上创建工作空间,请新建一个文件夹作为工作空间",+ msgNotEmpty: "⚠️ 该文件夹包含了其他文件,请新建一个文件夹作为工作空间",+ msgICloud: "⚠️ 该文件夹位于 iCloud 同步路径下,请更换其他路径",+ msgCloudDrive: "⚠️ 文件夹路径不能包含 onedrive、dropbox、google drive、pcloud、nutstore、baidunetdisk、weiyun、坚果云、百度网盘和腾讯微云等字样,请更换其他路径",+ msgConfirm: "⚠️ 请确认没有将工作空间设置在第三方同步盘路径下,否则会造成数据损坏(iCloud/OneDrive/Dropbox/Google Drive/坚果云/百度网盘/腾讯微云等),是否继续?",+ },+ "zh-TW": {+ title: "思源筆記", wsTitle: "工作空間",+ missingTip: "⚠️ 找不到上次開啟的工作空間路徑",+ emptyHint: "目前沒有可用的工作空間,請選擇新的工作空間路徑",+ selectPath: "🗂️ 選擇新的工作空間路徑",+ selectPathDesc: "工作空間用於存放資料,後續可以在頂欄左上角的主選單中進行切換",+ selectBtn: "選擇", lang: "🌐 外觀語言",+ langDesc: "使用者介面語言,後續可以在 <kbd>設定</kbd> - <kbd>外觀</kbd> 中進行切換",+ open: "開啟", feedback: "求助回饋建議", community: "使用者社群匯總", download: "下載最新版",+ feedbackUrl: "https://ld246.com/article/1649901726096",+ communityUrl: "https://ld246.com/article/1640266171309",+ downloadUrl: "https://b3log.org/siyuan/download.html",+ msgPartitionRoot: "⚠️ 請勿在分區根路徑上建立工作空間,請新增一個資料夾作為工作空間",+ msgNotEmpty: "⚠️ 該資料夾包含了其他檔案,請新增一個資料夾作為工作空間",+ msgICloud: "⚠️ 該資料夾位於 iCloud 同步路徑下,請更換其他路徑",+ msgCloudDrive: "⚠️ 資料夾路徑不能包含 onedrive、dropbox、google drive、pcloud、nutstore、baidunetdisk、weiyun、堅果雲、百度網盤和騰訊微雲等字樣,請更換其他路徑",+ msgConfirm: "⚠️ 請確認沒有將工作空間設定在第三方同步盤路徑下,否則會造成資料損壞(iCloud/OneDrive/Dropbox/Google Drive/堅果雲/百度網盤/騰訊微雲等),是否繼續?",+ },+ "en": {+ title: "SiYuan", wsTitle: "Workspaces",+ missingTip: "⚠️ The last opened workspace path could not be found",+ emptyHint: "No available workspaces, please select a new workspace path",+ selectPath: "🗂️ Select a new workspace path",+ selectPathDesc: "The workspace is used to store data, which can be switched later in the top bar menu later",+ selectBtn: "Select", lang: "🌐 Language",+ langDesc: "User interface language, which can be switched later in <kbd>Settings</kbd> - <kbd>Appearance</kbd>",+ open: "Open", feedback: "Support and Feedback", community: "User community summary", download: "Download",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Do not create the workspace in the partition root path, please create a new folder as the workspace",+ msgNotEmpty: "⚠️ This folder contains other files, please create a new folder as the workspace",+ msgICloud: "⚠️ This folder is under the iCloud sync path, please change another path",+ msgCloudDrive: "⚠️ The folder path can not contain onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, etc., please change another path",+ msgConfirm: "⚠️ Please confirm that the workspace is not set under the path of a third-party sync disk, otherwise it will cause data damage (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), continue?",+ },+ "ar": {+ title: "SiYuan", wsTitle: "مساحات العمل",+ missingTip: "⚠️ تعذر العثور على مسار مساحة العمل المفتوحة آخر مرة",+ emptyHint: "لا توجد مساحات عمل متاحة، يرجى تحديد مسار مساحة عمل جديد",+ selectPath: "🗂️ تحديد مسار مساحة عمل جديد",+ selectPathDesc: "تُستخدم مساحة العمل لتخزين البيانات، ويمكن تبديلها لاحقًا من القائمة الرئيسية في الزاوية العلوية اليسرى",+ selectBtn: "تحديد", lang: "🌐 اللغة",+ langDesc: "لغة واجهة المستخدم، يمكن تبديلها لاحقًا في <kbd>الإعدادات</kbd> - <kbd>المظهر</kbd>",+ open: "فتح", feedback: "الدعم والملاحظات", community: "ملخص مجتمع المستخدمين", download: "تحميل",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ لا تنشئ مساحة العمل في المسار الجذري للقسم، يرجى إنشاء مجلد جديد كمساحة عمل",+ msgNotEmpty: "⚠️ يحتوي هذا المجلد على ملفات أخرى، يرجى إنشاء مجلد جديد كمساحة عمل",+ msgICloud: "⚠️ هذا المجلد ضمن مسار مزامنة iCloud، يرجى تغيير مسار آخر",+ msgCloudDrive: "⚠️ لا يمكن أن يحتوي مسار المجلد على onedrive أو dropbox أو google drive أو pcloud أو nutstore أو baidunetdisk أو weiyun وغيرها، يرجى تغيير مسار آخر",+ msgConfirm: "⚠️ يرجى تأكيد عدم تعيين مساحة العمل ضمن مسار قرص مزامنة تابع لجهة خارجية، وإلا فقد يتسبب ذلك في تلف البيانات (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun وغيرها)، هل تريد المتابعة؟",+ },+ "de": {+ title: "SiYuan", wsTitle: "Arbeitsbereiche",+ missingTip: "⚠️ Der zuletzt geöffnete Arbeitsbereich-Pfad konnte nicht gefunden werden",+ emptyHint: "Keine verfügbaren Arbeitsbereiche, bitte einen neuen Arbeitsbereich-Pfad auswählen",+ selectPath: "🗂️ Neuen Arbeitsbereich-Pfad auswählen",+ selectPathDesc: "Der Arbeitsbereich dient zum Speichern von Daten und kann später im Hauptmenü der oberen Leiste gewechselt werden",+ selectBtn: "Auswählen", lang: "🌐 Sprache",+ langDesc: "Sprache der Benutzeroberfläche, die später in <kbd>Einstellungen</kbd> - <kbd>Erscheinungsbild</kbd> gewechselt werden kann",+ open: "Öffnen", feedback: "Support und Feedback", community: "Zusammenfassung der Benutzergemeinschaft", download: "Herunterladen",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Erstellen Sie den Arbeitsbereich nicht im Stammverzeichnis der Partition, erstellen Sie bitte einen neuen Ordner als Arbeitsbereich",+ msgNotEmpty: "⚠️ Dieser Ordner enthält andere Dateien, erstellen Sie bitte einen neuen Ordner als Arbeitsbereich",+ msgICloud: "⚠️ Dieser Ordner befindet sich unter dem iCloud-Synchronisierungspfad, bitte einen anderen Pfad wählen",+ msgCloudDrive: "⚠️ Der Ordnerpfad darf nicht onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun usw. enthalten, bitte einen anderen Pfad wählen",+ msgConfirm: "⚠️ Bitte bestätigen Sie, dass der Arbeitsbereich nicht unter dem Pfad einer Sync-Festplatte eines Drittanbieters eingerichtet ist, da dies zu Datenbeschädigung führen kann (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun usw.), fortfahren?",+ },+ "es": {+ title: "SiYuan", wsTitle: "Espacios de trabajo",+ missingTip: "⚠️ No se pudo encontrar la ruta del último espacio de trabajo abierto",+ emptyHint: "No hay espacios de trabajo disponibles, seleccione una nueva ruta de espacio de trabajo",+ selectPath: "🗂️ Seleccionar una nueva ruta de espacio de trabajo",+ selectPathDesc: "El espacio de trabajo se utiliza para almacenar datos, que se pueden cambiar más tarde en el menú principal de la barra superior",+ selectBtn: "Seleccionar", lang: "🌐 Idioma",+ langDesc: "Idioma de la interfaz de usuario, que se puede cambiar más tarde en <kbd>Ajustes</kbd> - <kbd>Apariencia</kbd>",+ open: "Abrir", feedback: "Soporte y comentarios", community: "Resumen de la comunidad de usuarios", download: "Descargar",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ No cree el espacio de trabajo en la ruta raíz de la partición, cree una nueva carpeta como espacio de trabajo",+ msgNotEmpty: "⚠️ Esta carpeta contiene otros archivos, cree una nueva carpeta como espacio de trabajo",+ msgICloud: "⚠️ Esta carpeta está bajo la ruta de sincronización de iCloud, cambie a otra ruta",+ msgCloudDrive: "⚠️ La ruta de la carpeta no puede contener onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, etc., cambie a otra ruta",+ msgConfirm: "⚠️ Confirme que el espacio de trabajo no está configurado bajo la ruta de un disco de sincronización de terceros, de lo contrario causará daños en los datos (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), ¿continuar?",+ },+ "fr": {+ title: "SiYuan", wsTitle: "Espaces de travail",+ missingTip: "⚠️ Le chemin du dernier espace de travail ouvert est introuvable",+ emptyHint: "Aucun espace de travail disponible, veuillez sélectionner un nouveau chemin d'espace de travail",+ selectPath: "🗂️ Sélectionner un nouveau chemin d'espace de travail",+ selectPathDesc: "L'espace de travail est utilisé pour stocker des données, il peut être changé plus tard dans le menu principal de la barre supérieure",+ selectBtn: "Sélectionner", lang: "🌐 Langue",+ langDesc: "Langue de l'interface utilisateur, pouvant être modifiée ultérieurement dans <kbd>Paramètres</kbd> - <kbd>Apparence</kbd>",+ open: "Ouvrir", feedback: "Assistance et commentaires", community: "Résumé de la communauté d'utilisateurs", download: "Télécharger",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Ne créez pas l'espace de travail dans le chemin racine de la partition, veuillez créer un nouveau dossier comme espace de travail",+ msgNotEmpty: "⚠️ Ce dossier contient d'autres fichiers, veuillez créer un nouveau dossier comme espace de travail",+ msgICloud: "⚠️ Ce dossier se trouve sous le chemin de synchronisation iCloud, veuillez changer de chemin",+ msgCloudDrive: "⚠️ Le chemin du dossier ne peut pas contenir onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, etc., veuillez changer de chemin",+ msgConfirm: "⚠️ Veuillez confirmer que l'espace de travail n'est pas défini sous le chemin d'un disque de synchronisation tiers, sinon cela causera des dommages aux données (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), continuer ?",+ },+ "he": {+ title: "SiYuan", wsTitle: "סביבות עבודה",+ missingTip: "⚠️ לא ניתן היה למצוא את הנתיב של סביבת העבודה האחרונה שנפתחה",+ emptyHint: "אין סביבות עבודה זמינות, נא לבחור נתיב סביבת עבודה חדש",+ selectPath: "🗂️ בחירת נתיב סביבת עבודה חדש",+ selectPathDesc: "סביבת העבודה משמשת לאחסון נתונים, ניתן להחליף אותה מאוחר יותר בתפריט הראשי בסרגל העליון",+ selectBtn: "בחירה", lang: "🌐 שפה",+ langDesc: "שפת ממשק המשתמש, ניתן להחליף מאוחר יותר ב-<kbd>הגדרות</kbd> - <kbd>מראה</kbd>",+ open: "פתיחה", feedback: "תמיכה ומשוב", community: "סיכום קהילת המשתמשים", download: "הורדה",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ אל תיצור את סביבת העבודה בנתיב השורש של המחיצה, נא ליצור תיקייה חדשה כסביבת עבודה",+ msgNotEmpty: "⚠️ תיקייה זו מכילה קבצים אחרים, נא ליצור תיקייה חדשה כסביבת עבודה",+ msgICloud: "⚠️ תיקייה זו נמצאת תחת נתיב סנכרון iCloud, נא לשנות נתיב אחר",+ msgCloudDrive: "⚠️ נתיב התיקייה אינו יכול להכיל onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun וכו', נא לשנות נתיב אחר",+ msgConfirm: "⚠️ נא לאשר שסביבת העבודה אינה מוגדרת תחת נתיב של דיסק סנכרון של צד שלישי, אחרת זה יגרום לנזק לנתונים (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun וכו'), להמשיך?",+ },+ "hi": {+ title: "SiYuan", wsTitle: "वर्कस्पेस",+ missingTip: "⚠️ अंतिम बार खोला गया वर्कस्पेस पथ नहीं मिल सका",+ emptyHint: "कोई उपलब्ध वर्कस्पेस नहीं, कृपया एक नया वर्कस्पेस पथ चुनें",+ selectPath: "🗂️ एक नया वर्कस्पेस पथ चुनें",+ selectPathDesc: "वर्कस्पेस का उपयोग डेटा संग्रहीत करने के लिए किया जाता है, जिसे बाद में शीर्ष बार मेन्यू में बदला जा सकता है",+ selectBtn: "चुनें", lang: "🌐 भाषा",+ langDesc: "उपयोगकर्ता इंटरफ़ेस भाषा, जिसे बाद में <kbd>सेटिंग्स</kbd> - <kbd>रूप</kbd> में बदला जा सकता है",+ open: "खोलें", feedback: "सहायता और प्रतिक्रिया", community: "उपयोगकर्ता समुदाय सारांश", download: "डाउनलोड",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ वर्कस्पेस को पार्टीशन रूट पथ में न बनाएं, कृपया वर्कस्पेस के रूप में एक नया फ़ोल्डर बनाएं",+ msgNotEmpty: "⚠️ इस फ़ोल्डर में अन्य फ़ाइलें हैं, कृपया वर्कस्पेस के रूप में एक नया फ़ोल्डर बनाएं",+ msgICloud: "⚠️ यह फ़ोल्डर iCloud सिंक पथ के अंतर्गत है, कृपया कोई अन्य पथ बदलें",+ msgCloudDrive: "⚠️ फ़ोल्डर पथ में onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun आदि नहीं हो सकते, कृपया कोई अन्य पथ बदलें",+ msgConfirm: "⚠️ कृपया पुष्टि करें कि वर्कस्पेस किसी तृतीय-पक्ष सिंक डिस्क के पथ के अंतर्गत सेट नहीं है, अन्यथा यह डेटा क्षति का कारण बनेगा (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun आदि), जारी रखें?",+ },+ "id": {+ title: "SiYuan", wsTitle: "Ruang Kerja",+ missingTip: "⚠️ Jalur ruang kerja yang terakhir dibuka tidak dapat ditemukan",+ emptyHint: "Tidak ada ruang kerja yang tersedia, silakan pilih jalur ruang kerja baru",+ selectPath: "🗂️ Pilih jalur ruang kerja baru",+ selectPathDesc: "Ruang kerja digunakan untuk menyimpan data, yang dapat dialihkan nanti di menu bilah atas",+ selectBtn: "Pilih", lang: "🌐 Bahasa",+ langDesc: "Bahasa antarmuka pengguna, yang dapat dialihkan nanti di <kbd>Pengaturan</kbd> - <kbd>Tampilan</kbd>",+ open: "Buka", feedback: "Dukungan dan Umpan Balik", community: "Ringkasan komunitas pengguna", download: "Unduh",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Jangan membuat ruang kerja di jalur root partisi, silakan buat folder baru sebagai ruang kerja",+ msgNotEmpty: "⚠️ Folder ini berisi file lain, silakan buat folder baru sebagai ruang kerja",+ msgICloud: "⚠️ Folder ini berada di bawah jalur sinkronisasi iCloud, silakan ganti jalur lain",+ msgCloudDrive: "⚠️ Jalur folder tidak boleh berisi onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, dll., silakan ganti jalur lain",+ msgConfirm: "⚠️ Harap konfirmasi bahwa ruang kerja tidak diatur di bawah jalur disk sinkronisasi pihak ketiga, jika tidak itu akan menyebabkan kerusakan data (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, dll.), lanjutkan?",+ },+ "it": {+ title: "SiYuan", wsTitle: "Spazi di lavoro",+ missingTip: "⚠️ Impossibile trovare il percorso dell'ultimo spazio di lavoro aperto",+ emptyHint: "Nessuno spazio di lavoro disponibile, selezionare un nuovo percorso dello spazio di lavoro",+ selectPath: "🗂️ Seleziona un nuovo percorso dello spazio di lavoro",+ selectPathDesc: "Lo spazio di lavoro viene utilizzato per memorizzare i dati, che può essere cambiato successivamente nel menu principale della barra superiore",+ selectBtn: "Seleziona", lang: "🌐 Lingua",+ langDesc: "Lingua dell'interfaccia utente, che può essere cambiata successivamente in <kbd>Impostazioni</kbd> - <kbd>Aspetto</kbd>",+ open: "Apri", feedback: "Supporto e feedback", community: "Riepilogo della community degli utenti", download: "Scarica",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Non creare lo spazio di lavoro nel percorso root della partizione, crea una nuova cartella come spazio di lavoro",+ msgNotEmpty: "⚠️ Questa cartella contiene altri file, crea una nuova cartella come spazio di lavoro",+ msgICloud: "⚠️ Questa cartella si trova nel percorso di sincronizzazione iCloud, si prega di cambiare un altro percorso",+ msgCloudDrive: "⚠️ Il percorso della cartella non può contenere onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, ecc., si prega di cambiare un altro percorso",+ msgConfirm: "⚠️ Si prega di confermare che lo spazio di lavoro non è impostato nel percorso di un disco di sincronizzazione di terze parti, altrimenti causerà danni ai dati (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, ecc.), continuare?",+ },+ "ja": {+ title: "SiYuan", wsTitle: "ワークスペース",+ missingTip: "⚠️ 最後に開いたワークスペースのパスが見つかりませんでした",+ emptyHint: "利用可能なワークスペースがありません。新しいワークスペースのパスを選択してください",+ selectPath: "🗂️ 新しいワークスペースのパスを選択",+ selectPathDesc: "ワークスペースはデータの保存に使用されます。後でトップバーのメインメニューで切り替えることができます",+ selectBtn: "選択", lang: "🌐 言語",+ langDesc: "ユーザーインターフェースの言語です。後で<kbd>設定</kbd> - <kbd>外観</kbd>で切り替えることができます",+ open: "開く", feedback: "サポートとフィードバック", community: "ユーザーコミュニティの概要", download: "ダウンロード",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ パーティションのルートパスにワークスペースを作成しないでください。ワークスペースとして新しいフォルダを作成してください",+ msgNotEmpty: "⚠️ このフォルダには他のファイルが含まれています。ワークスペースとして新しいフォルダを作成してください",+ msgICloud: "⚠️ このフォルダはiCloud同期パスの下にあります。別のパスに変更してください",+ msgCloudDrive: "⚠️ フォルダパスにonedrive、dropbox、google drive、pcloud、nutstore、baidunetdisk、weiyunなどは含められません。別のパスに変更してください",+ msgConfirm: "⚠️ ワークスペースがサードパーティの同期ディスクのパスの下に設定されていないことを確認してください。そうでないとデータの破損が発生する可能性があります(iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyunなど)。続行しますか?",+ },+ "ko": {+ title: "SiYuan", wsTitle: "워크스페이스",+ missingTip: "⚠️ 마지막으로 열린 워크스페이스 경로를 찾을 수 없습니다",+ emptyHint: "사용 가능한 워크스페이스가 없습니다. 새 워크스페이스 경로를 선택하세요",+ selectPath: "🗂️ 새 워크스페이스 경로 선택",+ selectPathDesc: "워크스페이스는 데이터를 저장하는 데 사용되며, 나중에 상단 표시줄 메뉴에서 전환할 수 있습니다",+ selectBtn: "선택", lang: "🌐 언어",+ langDesc: "사용자 인터페이스 언어이며, 나중에 <kbd>설정</kbd> - <kbd>외관</kbd>에서 전환할 수 있습니다",+ open: "열기", feedback: "지원 및 피드백", community: "사용자 커뮤니티 요약", download: "다운로드",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ 파티션 루트 경로에 워크스페이스를 만들지 마세요. 워크스페이스로 새 폴더를 만드세요",+ msgNotEmpty: "⚠️ 이 폴더에는 다른 파일이 포함되어 있습니다. 워크스페이스로 새 폴더를 만드세요",+ msgICloud: "⚠️ 이 폴더는 iCloud 동기화 경로 아래에 있습니다. 다른 경로로 변경하세요",+ msgCloudDrive: "⚠️ 폴더 경로에 onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun 등이 포함될 수 없습니다. 다른 경로로 변경하세요",+ msgConfirm: "⚠️ 워크스페이스가 타사 동기화 디스크 경로 아래에 설정되지 않았는지 확인하세요. 그렇지 않으면 데이터 손상이 발생합니다(iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun 등). 계속하시겠습니까?",+ },+ "nl": {+ title: "SiYuan", wsTitle: "Werkruimten",+ missingTip: "⚠️ Het laatst geopende werkruimtepad kon niet worden gevonden",+ emptyHint: "Geen beschikbare werkruimten, selecteer een nieuw werkruimtepad",+ selectPath: "🗂️ Selecteer een nieuw werkruimtepad",+ selectPathDesc: "De werkruimte wordt gebruikt om gegevens op te slaan, die later kan worden gewisseld in het hoofdmenu van de bovenste balk",+ selectBtn: "Selecteren", lang: "🌐 Taal",+ langDesc: "Taal van de gebruikersinterface, die later kan worden gewisseld in <kbd>Instellingen</kbd> - <kbd>Weergave</kbd>",+ open: "Openen", feedback: "Ondersteuning en feedback", community: "Overzicht van gebruikersgemeenschap", download: "Downloaden",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Maak de werkruimte niet in het hoofdpad van de partitie, maak een nieuwe map als werkruimte",+ msgNotEmpty: "⚠️ Deze map bevat andere bestanden, maak een nieuwe map als werkruimte",+ msgICloud: "⚠️ Deze map bevindt zich onder het iCloud-synchronisatiepad, wijzig een ander pad",+ msgCloudDrive: "⚠️ Het mappad kan geen onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, etc. bevatten, wijzig een ander pad",+ msgConfirm: "⚠️ Bevestig dat de werkruimte niet is ingesteld onder het pad van een synchronisatieschijf van derden, anders veroorzaakt dit gegevensbeschadiging (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), doorgaan?",+ },+ "pl": {+ title: "SiYuan", wsTitle: "Obszary robocze",+ missingTip: "⚠️ Nie można znaleźć ścieżki ostatnio otwartego obszaru roboczego",+ emptyHint: "Brak dostępnych obszarów roboczych, wybierz nową ścieżkę obszaru roboczego",+ selectPath: "🗂️ Wybierz nową ścieżkę obszaru roboczego",+ selectPathDesc: "Obszar roboczy służy do przechowywania danych, które można później przełączyć w głównym menu górnego paska",+ selectBtn: "Wybierz", lang: "🌐 Język",+ langDesc: "Język interfejsu użytkownika, który można później przełączyć w <kbd>Ustawieniach</kbd> - <kbd>Wygląd</kbd>",+ open: "Otwórz", feedback: "Wsparcie i opinie", community: "Podsumowanie społeczności użytkowników", download: "Pobierz",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Nie twórz obszaru roboczego w ścieżce głównej partycji, utwórz nowy folder jako obszar roboczy",+ msgNotEmpty: "⚠️ Ten folder zawiera inne pliki, utwórz nowy folder jako obszar roboczy",+ msgICloud: "⚠️ Ten folder znajduje się w ścieżce synchronizacji iCloud, zmień inną ścieżkę",+ msgCloudDrive: "⚠️ Ścieżka folderu nie może zawierać onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun itd., zmień inną ścieżkę",+ msgConfirm: "⚠️ Potwierdź, że obszar roboczy nie jest ustawiony w ścieżce dysku synchronizacji innej firmy, w przeciwnym razie spowoduje to uszkodzenie danych (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun itd.), kontynuować?",+ },+ "pt-BR": {+ title: "SiYuan", wsTitle: "Espaços de trabalho",+ missingTip: "⚠️ O caminho do último espaço de trabalho aberto não pôde ser encontrado",+ emptyHint: "Nenhum espaço de trabalho disponível, selecione um novo caminho de espaço de trabalho",+ selectPath: "🗂️ Selecionar um novo caminho de espaço de trabalho",+ selectPathDesc: "O espaço de trabalho é usado para armazenar dados, que pode ser alterado posteriormente no menu principal da barra superior",+ selectBtn: "Selecionar", lang: "🌐 Idioma",+ langDesc: "Idioma da interface do usuário, que pode ser alterado posteriormente em <kbd>Configurações</kbd> - <kbd>Aparência</kbd>",+ open: "Abrir", feedback: "Suporte e Feedback", community: "Resumo da comunidade de usuários", download: "Baixar",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Não crie o espaço de trabalho no caminho raiz da partição, crie uma nova pasta como espaço de trabalho",+ msgNotEmpty: "⚠️ Esta pasta contém outros arquivos, crie uma nova pasta como espaço de trabalho",+ msgICloud: "⚠️ Esta pasta está sob o caminho de sincronização do iCloud, altere para outro caminho",+ msgCloudDrive: "⚠️ O caminho da pasta não pode conter onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun, etc., altere para outro caminho",+ msgConfirm: "⚠️ Confirme que o espaço de trabalho não está definido sob o caminho de um disco de sincronização de terceiros, caso contrário causará danos aos dados (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), continuar?",+ },+ "ru": {+ title: "SiYuan", wsTitle: "Рабочие пространства",+ missingTip: "⚠️ Не удалось найти путь последнего открытого рабочего пространства",+ emptyHint: "Нет доступных рабочих пространств, выберите новый путь рабочего пространства",+ selectPath: "🗂️ Выберите новый путь рабочего пространства",+ selectPathDesc: "Рабочее пространство используется для хранения данных, его можно переключить позже в главном меню верхней панели",+ selectBtn: "Выбрать", lang: "🌐 Язык",+ langDesc: "Язык интерфейса пользователя, который можно переключить позже в <kbd>Настройках</kbd> - <kbd>Внешний вид</kbd>",+ open: "Открыть", feedback: "Поддержка и обратная связь", community: "Сводка сообщества пользователей", download: "Скачать",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Не создавайте рабочее пространство в корневом пути раздела, создайте новую папку в качестве рабочего пространства",+ msgNotEmpty: "⚠️ Эта папка содержит другие файлы, создайте новую папку в качестве рабочего пространства",+ msgICloud: "⚠️ Эта папка находится по пути синхронизации iCloud, измените другой путь",+ msgCloudDrive: "⚠️ Путь к папке не может содержать onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun и т. д., измените другой путь",+ msgConfirm: "⚠️ Подтвердите, что рабочее пространство не настроено по пути стороннего диска синхронизации, иначе это приведёт к повреждению данных (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun и т. д.), продолжить?",+ },+ "sk": {+ title: "SiYuan", wsTitle: "Pracovné priestory",+ missingTip: "⚠️ Nepodarilo sa nájsť cestu k poslednému otvorenému pracovnému priestoru",+ emptyHint: "Žiadne dostupné pracovné priestory, vyberte novú cestu pracovného priestoru",+ selectPath: "🗂️ Vybrať novú cestu pracovného priestoru",+ selectPathDesc: "Pracovný priestor sa používa na ukladanie údajov, ktoré sa dá neskôr prepnúť v hlavnej ponuke hornej lišty",+ selectBtn: "Vybrať", lang: "🌐 Jazyk",+ langDesc: "Jazyk používateľského rozhrania, ktorý možno neskôr prepnúť v <kbd>Nastaveniach</kbd> - <kbd>Vzhľad</kbd>",+ open: "Otvoriť", feedback: "Podpora a spätná väzba", community: "Súhrn komunity používateľov", download: "Stiahnuť",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Nevytvárajte pracovný priestor v koreňovej ceste oddielu, vytvorte nový priečinok ako pracovný priestor",+ msgNotEmpty: "⚠️ Tento priečinok obsahuje iné súbory, vytvorte nový priečinok ako pracovný priestor",+ msgICloud: "⚠️ Tento priečinok je pod cestou synchronizácie iCloud, zmeňte inú cestu",+ msgCloudDrive: "⚠️ Cesta k priečinku nemôže obsahovať onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun atď., zmeňte inú cestu",+ msgConfirm: "⚠️ Potvrďte, že pracovný priestor nie je nastavený pod cestou synchronizačného disku tretej strany, inak to spôsobí poškodenie údajov (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun atď.), pokračovať?",+ },+ "th": {+ title: "SiYuan", wsTitle: "พื้นที่ทำงาน",+ missingTip: "⚠️ ไม่พบเส้นทางพื้นที่ทำงานที่เปิดล่าสุด",+ emptyHint: "ไม่มีพื้นที่ทำงานที่พร้อมใช้งาน โปรดเลือกเส้นทางพื้นที่ทำงานใหม่",+ selectPath: "🗂️ เลือกเส้นทางพื้นที่ทำงานใหม่",+ selectPathDesc: "พื้นที่ทำงานใช้สำหรับจัดเก็บข้อมูล ซึ่งสามารถสลับได้ในภายหลังในเมนูหลักของแถบด้านบน",+ selectBtn: "เลือก", lang: "🌐 ภาษา",+ langDesc: "ภาษาของอินเทอร์เฟซผู้ใช้ ซึ่งสามารถสลับได้ในภายหลังใน <kbd>การตั้งค่า</kbd> - <kbd>ลักษณะ</kbd>",+ open: "เปิด", feedback: "การสนับสนุนและข้อเสนอแนะ", community: "สรุปชุมชนผู้ใช้", download: "ดาวน์โหลด",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ อย่าสร้างพื้นที่ทำงานในเส้นทางรูทของพาร์ติชัน โปรดสร้างโฟลเดอร์ใหม่เป็นพื้นที่ทำงาน",+ msgNotEmpty: "⚠️ โฟลเดอร์นี้มีไฟล์อื่น ๆ โปรดสร้างโฟลเดอร์ใหม่เป็นพื้นที่ทำงาน",+ msgICloud: "⚠️ โฟลเดอร์นี้อยู่ภายใต้เส้นทางซิงค์ iCloud โปรดเปลี่ยนเส้นทางอื่น",+ msgCloudDrive: "⚠️ เส้นทางโฟลเดอร์ไม่สามารถมี onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun ฯลฯ ได้ โปรดเปลี่ยนเส้นทางอื่น",+ msgConfirm: "⚠️ โปรดยืนยันว่าพื้นที่ทำงานไม่ได้ตั้งไว้ภายใต้เส้นทางของดิสก์ซิงค์ของบุคคลที่สาม มิฉะนั้นจะทำให้ข้อมูลเสียหาย (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun ฯลฯ) ดำเนินการต่อ?",+ },+ "tr": {+ title: "SiYuan", wsTitle: "Çalışma alanları",+ missingTip: "⚠️ Son açılan çalışma alanı yolu bulunamadı",+ emptyHint: "Kullanılabilir çalışma alanı yok, lütfen yeni bir çalışma alanı yolu seçin",+ selectPath: "🗂️ Yeni bir çalışma alanı yolu seçin",+ selectPathDesc: "Çalışma alanı verileri depolamak için kullanılır, daha sonra üst çubuk menüsünde değiştirilebilir",+ selectBtn: "Seç", lang: "🌐 Dil",+ langDesc: "Kullanıcı arayüzü dili, daha sonra <kbd>Ayarlar</kbd> - <kbd>Görünüm</kbd> bölümünde değiştirilebilir",+ open: "Aç", feedback: "Destek ve Geri Bildirim", community: "Kullanıcı topluluğu özeti", download: "İndir",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Çalışma alanını bölüm kök yolunda oluşturmayın, çalışma alanı olarak yeni bir klasör oluşturun",+ msgNotEmpty: "⚠️ Bu klasör başka dosyalar içeriyor, çalışma alanı olarak yeni bir klasör oluşturun",+ msgICloud: "⚠️ Bu klasör iCloud eşzamanlama yolunun altında, lütfen başka bir yol değiştirin",+ msgCloudDrive: "⚠️ Klasör yolu onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun vb. içeremez, lütfen başka bir yol değiştirin",+ msgConfirm: "⚠️ Çalışma alanının üçüncü taraf eşzamanlama diskinin yolu altında ayarlanmadığını onaylayın, aksi takdirde veri hasarına neden olur (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun vb.), devam edilsin mi?",+ },+ "uk": {+ title: "SiYuan", wsTitle: "Робочі простори",+ missingTip: "⚠️ Не вдалося знайти шлях до останнього відкритого робочого простору",+ emptyHint: "Немає доступних робочих просторів, виберіть новий шлях робочого простору",+ selectPath: "🗂️ Виберіть новий шлях робочого простору",+ selectPathDesc: "Робочий простір використовується для зберігання даних, який пізніше можна змінити в головному меню верхньої панелі",+ selectBtn: "Вибрати", lang: "🌐 Мова",+ langDesc: "Мова інтерфейсу користувача, яку пізніше можна змінити в <kbd>Налаштуваннях</kbd> - <kbd>Вигляд</kbd>",+ open: "Відкрити", feedback: "Підтримка та зворотний зв'язок", community: "Огляд спільноти користувачів", download: "Завантажити",+ feedbackUrl: "https://liuyun.io/article/1686530886208",+ communityUrl: "https://liuyun.io/article/1687779743723",+ downloadUrl: "https://b3log.org/siyuan/en/download.html",+ msgPartitionRoot: "⚠️ Не створюйте робочий простір у кореневому шляху розділу, створіть нову папку як робочий простір",+ msgNotEmpty: "⚠️ Ця папка містить інші файли, створіть нову папку як робочий простір",+ msgICloud: "⚠️ Ця папка знаходиться під шляхом синхронізації iCloud, змініть інший шлях",+ msgCloudDrive: "⚠️ Шлях до папки не може містити onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun тощо, змініть інший шлях",+ msgConfirm: "⚠️ Підтвердьте, що робочий простір не налаштований під шляхом стороннього диска синхронізації, інакше це спричинить пошкодження даних (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun тощо), продовжити?",+ },}- setLang(currentLang)- document.querySelectorAll('.version').forEach(item => {- item.textContent = `v${getSearch('v')}`- })+ const path = require('path')+ const {ipcRenderer} = require('electron')+ let currentLang = decodeURIComponent(getSearch('lang'))- document.querySelectorAll('.icon').forEach(item => {- item.src = decodeURIComponent(`${getSearch('icon')}`)- })+ // 应用指定语言的文案到 DOM https://github.com/siyuan-note/siyuan/issues/14748+ const applyLang = (lang) => {+ const langData = I18N[lang] || I18N["en"]+ document.title = `${langData.title} v${getSearch('v')}`+ document.querySelectorAll('[data-i18n]').forEach(item => {+ const key = item.getAttribute('data-i18n')+ if (langData[key]) {+ item.textContent = langData[key]+ }+ })+ // 含 HTML 标签(如 <kbd>)的文案用 innerHTML+ document.querySelectorAll('[data-i18n-html]').forEach(item => {+ const key = item.getAttribute('data-i18n-html')+ if (langData[key]) {+ item.innerHTML = langData[key]+ }+ })+ document.querySelectorAll('[data-i18n-href]').forEach(item => {+ const key = item.getAttribute('data-i18n-href')+ if (langData[key]) {+ item.href = langData[key]+ }+ })+ currentLang = lang+ }+ applyLang(currentLang)- document.querySelectorAll('.missing').forEach(item => {- item.textContent = decodeURIComponent(getSearch('missing'))- })+ document.querySelector('.version').textContent = `v${getSearch('v')}`+ document.querySelector('.icon').src = decodeURIComponent(`${getSearch('icon')}`)+ document.querySelector('.missing').textContent = decodeURIComponent(getSearch('missing'))- document.querySelectorAll('.lang').forEach(item => {- item.value = currentLang- item.addEventListener('change', () => {- document.querySelectorAll('.lang').forEach(item1 => {- item1.value = item.value- })- setLang(item.value)- })+ document.querySelector('.lang').value = currentLang+ document.querySelector('.lang').addEventListener('change', (event) => {+ applyLang(event.target.value)+ // 重新渲染列表项按钮文案+ renderWsList()})if (process.platform === 'darwin') {@@ -620,20 +935,18 @@}document.getElementById('close').addEventListener('click', () => {- const {ipcRenderer} = require('electron')ipcRenderer.send('siyuan-first-quit')})document.getElementById('min').addEventListener('click', () => {- const {ipcRenderer} = require('electron')ipcRenderer.send("siyuan-cmd", "minimize");})// 渲染可用工作空间列表 https://github.com/siyuan-note/siyuan/issues/14748- const path = require('path')- const {ipcRenderer} = require('electron')const wsRaw = decodeURIComponent(getSearch('workspaces'))const wsList = wsRaw.split('\n').filter(item => '' !== item.trim())- const renderWsList = (root, lang) => {+ const renderWsList = () => {+ const langData = I18N[currentLang] || I18N["en"]+ const root = document.querySelector('.wsList')root.innerHTML = ''wsList.forEach(p => {const div = document.createElement('div')@@ -650,12 +963,12 @@text.appendChild(wsPath)const btn = document.createElement('button')btn.className = 'b3-button ws-open'- btn.textContent = isChinese(lang) ? '打开' : 'Open'+ btn.textContent = langData.openbtn.dataset.path = pbtn.addEventListener('click', () => {ipcRenderer.send('siyuan-select-workspace', {workspace: p,- lang: lang,+ lang: currentLang,})})div.appendChild(text)@@ -664,92 +977,66 @@})}if (0 < wsList.length) {- // 存在可用工作空间时渲染左列列表,隐藏右列空提示- renderWsList(document.querySelector('#zhCN .wsList'), 'zh-CN')- renderWsList(document.querySelector('#enUS .wsList'), 'en')+ // 存在可用工作空间时渲染左列列表+ renderWsList()} else {// 没有可用工作空间时隐藏左列,显示右列空提示- document.querySelectorAll('.wsPanel').forEach(item => {- item.classList.add('fn__none')- })- document.querySelectorAll('.emptyHint').forEach(item => {- item.classList.remove('fn__none')- })+ document.querySelector('.wsPanel').classList.add('fn__none')+ document.querySelector('.emptyHint').classList.remove('fn__none')}- document.querySelectorAll('.choosePath').forEach((item) => {- item.addEventListener('click', async () => {- const fs = require('fs')+ document.querySelector('.choosePath').addEventListener('click', async () => {+ const langData = I18N[currentLang] || I18N["en"]+ const fs = require('fs')- let defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")- if ("darwin" === process.platform) {- // Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095- defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "Library", "Application Support", "SiYuan")- }- if (!fs.existsSync(defaultWorkspace)) {- fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})- }+ let defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")+ if ("darwin" === process.platform) {+ // Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095+ defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "Library", "Application Support", "SiYuan")+ }+ if (!fs.existsSync(defaultWorkspace)) {+ fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})+ }- const result = await ipcRenderer.invoke("siyuan-get", {- cmd: "showOpenDialog",- defaultPath: defaultWorkspace,- properties: ['openDirectory', 'createDirectory'],- });+ const result = await ipcRenderer.invoke("siyuan-get", {+ cmd: "showOpenDialog",+ defaultPath: defaultWorkspace,+ properties: ['openDirectory', 'createDirectory'],+ });- if (result.canceled) {- return- }- const initPath = result.filePaths[0]+ if (result.canceled) {+ return+ }+ const initPath = result.filePaths[0]- if (isPartitionRootPath(initPath)) {- let msg = '⚠️ Do not create the workspace in the partition root path, please create a new folder as the workspace'- if (isChinese(currentLang)) {- msg = '⚠️ 请勿在分区根路径上创建工作空间,请新建一个文件夹作为工作空间'- }- alert(msg)- return- }+ if (isPartitionRootPath(initPath)) {+ alert(langData.msgPartitionRoot)+ return+ }- if (!isWorkspaceDir(initPath) && !isEmptyDir(initPath)) {- let msg = '⚠️ This folder contains other files, please create a new folder as the workspace'- if (isChinese(currentLang)) {- msg = '⚠️ 该文件夹包含了其他文件,请新建一个文件夹作为工作空间'- }- alert(msg)- return- }+ if (!isWorkspaceDir(initPath) && !isEmptyDir(initPath)) {+ alert(langData.msgNotEmpty)+ return+ }- if (isICloudPath(initPath)) {- let msg = '⚠️ This folder is under the iCloud sync path, please change another path'- if (isChinese(currentLang)) {- msg = '⚠️ 该文件夹位于 iCloud 同步路径下,请更换其他路径'- }- alert(msg)- return- }+ if (isICloudPath(initPath)) {+ alert(langData.msgICloud)+ return+ }- if (isCloudDrivePath(initPath)) {- let msg = '⚠️ The folder path can not contain onedrive, dropbox, google drive, pcloud, nutstore, baidunetdisk, weiyun,坚果云,百度网盘 and 腾讯微云, etc., please change another path'- if (isChinese(currentLang)) {- msg = '⚠️ 文件夹路径不能包含 onedrive、dropbox、google drive、pcloud、nutstore、baidunetdisk、weiyun、坚果云、百度网盘和腾讯微云等字样,请更换其他路径'- }- alert(msg)- return- }- let msg = '⚠️ Please confirm that the workspace is not set under the path of a third-party sync disk, otherwise it will cause data damage (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.), continue?'- if (isChinese(currentLang)) {- msg = '⚠️ 请确认没有将工作空间设置在第三方同步盘路径下,否则会造成数据损坏(iCloud/OneDrive/Dropbox/Google Drive/坚果云/百度网盘/腾讯微云等),是否继续?'- }- if (!confirm(msg)) {- return- }- if (!fs.existsSync(initPath)) {- fs.mkdirSync(initPath, {mode: 0o755, recursive: true})- }- ipcRenderer.send('siyuan-select-workspace', {- workspace: initPath,- lang: currentLang,- })+ if (isCloudDrivePath(initPath)) {+ alert(langData.msgCloudDrive)+ return+ }+ if (!confirm(langData.msgConfirm)) {+ return+ }+ if (!fs.existsSync(initPath)) {+ fs.mkdirSync(initPath, {mode: 0o755, recursive: true})+ }+ ipcRenderer.send('siyuan-select-workspace', {+ workspace: initPath,+ lang: currentLang,})})