An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Support a Linux input method compatibility setting https://github.com/siyuan-note/siyuan/issues/19613
Daniel69b2d3e93361
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex 9c9e7e1850..4b6a157a4f 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "وضع توافق طرق الإدخال في Linux",+ "linuxInputMethodTip": "استخدام X11/XWayland لتحسين توافق طرق الإدخال؛ قد يؤثر على تحجيم العرض، وينطبق على جميع مساحات العمل على هذا الجهاز، ويسري بعد إغلاق SiYuan بالكامل وإعادة تشغيله",+ "linuxInputMethodError": "تعذرت قراءة إعدادات توافق طرق الإدخال أو حفظها",+ "linuxInputMethodOverrideTip": "تتحكم به معاملات بدء التشغيل؛ أزل --ozone-platform لاستخدام هذا الإعداد","mobileKernelReconnecting": "جارٍ إعادة الاتصال...","mobileKernelReconnectPrompt": "انقطع الاتصال بالنواة مؤقتًا. سيحاول SiYuan إعادة الاتصال تلقائيًا. عند العودة من الخلفية، قد تستغرق استعادة الاتصال بضع ثوانٍ. يُرجى الانتظار. ستُغلق هذه النافذة تلقائيًا بعد استعادة الاتصال. إذا لم يُستعد الاتصال بعد انتظار طويل، فحاول إعادة فتح SiYuan.","backlinkGlobalSort": "ترتيب المراجع على مستوى الكل",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex 4b5f9c4dbd..e95f92d3fd 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux-Eingabemethoden-Kompatibilitätsmodus",+ "linuxInputMethodTip": "X11/XWayland zur Verbesserung der Eingabemethoden-Kompatibilität verwenden; kann die Anzeigeskalierung beeinflussen, gilt für alle Arbeitsbereiche auf diesem Gerät und wird nach vollständigem Beenden und Neustarten von SiYuan wirksam",+ "linuxInputMethodError": "Die Kompatibilitätseinstellungen für Eingabemethoden konnten nicht gelesen oder gespeichert werden",+ "linuxInputMethodOverrideTip": "Durch Startparameter gesteuert; entfernen Sie --ozone-platform, um diese Einstellung zu verwenden","mobileKernelReconnecting": "Verbindung wird wiederhergestellt...","mobileKernelReconnectPrompt": "Die Verbindung zum Kernel wurde vorübergehend unterbrochen. SiYuan versucht automatisch, die Verbindung wiederherzustellen. Wenn die App aus dem Hintergrund zurückkehrt, kann dies einige Sekunden dauern. Bitte warte. Dieses Fenster schließt sich automatisch, sobald die Verbindung wiederhergestellt ist. Falls die Verbindung auch nach längerer Wartezeit nicht wiederhergestellt ist, öffne SiYuan erneut.","backlinkGlobalSort": "Globale Referenzsortierung",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex 123c052049..2030788412 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux input method compatibility mode",+ "linuxInputMethodTip": "Use X11/XWayland to address input method issues; may affect display scaling, applies to all workspaces on this device, and takes effect after fully quitting and restarting SiYuan",+ "linuxInputMethodError": "Unable to read or save input method compatibility settings",+ "linuxInputMethodOverrideTip": "Controlled by startup arguments; remove --ozone-platform to use this setting","mobileKernelReconnecting": "Reconnecting...","mobileKernelReconnectPrompt": "The connection to the kernel was temporarily lost. SiYuan will automatically try to reconnect. When returning from the background, restoring the connection may take a few seconds. Please wait. This window will close automatically once the connection is restored. If the connection is not restored after a long wait, try reopening SiYuan.","backlinkGlobalSort": "Global reference sorting",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex 7dcc1a5771..f01c8e38c0 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Modo de compatibilidad de métodos de entrada de Linux",+ "linuxInputMethodTip": "Usar X11/XWayland para mejorar la compatibilidad de los métodos de entrada; puede afectar al escalado, se aplica a todos los espacios de trabajo de este dispositivo y requiere cerrar completamente y reiniciar SiYuan",+ "linuxInputMethodError": "No se pueden leer o guardar los ajustes de compatibilidad de métodos de entrada",+ "linuxInputMethodOverrideTip": "Controlado por argumentos de inicio; elimina --ozone-platform para usar este ajuste","mobileKernelReconnecting": "Reconectando...","mobileKernelReconnectPrompt": "La conexión con el núcleo se ha interrumpido temporalmente. SiYuan intentará reconectarse automáticamente. Al volver del segundo plano, restablecer la conexión puede tardar unos segundos. Espera, por favor. Esta ventana se cerrará automáticamente cuando se restablezca la conexión. Si no se restablece tras una espera prolongada, intenta volver a abrir SiYuan.","backlinkGlobalSort": "Orden global de referencias",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex bb6632f3b1..84df752aff 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Mode de compatibilité des méthodes de saisie Linux",+ "linuxInputMethodTip": "Utiliser X11/XWayland pour améliorer la compatibilité des méthodes de saisie ; peut affecter la mise à l’échelle, s’applique à tous les espaces de travail de cet appareil et prend effet après avoir complètement quitté puis redémarré SiYuan",+ "linuxInputMethodError": "Impossible de lire ou d’enregistrer les paramètres de compatibilité des méthodes de saisie",+ "linuxInputMethodOverrideTip": "Contrôlé par les arguments de démarrage ; retirez --ozone-platform pour utiliser ce paramètre","mobileKernelReconnecting": "Reconnexion en cours...","mobileKernelReconnectPrompt": "La connexion au noyau a été temporairement interrompue. SiYuan tentera de se reconnecter automatiquement. Au retour de l’arrière-plan, le rétablissement de la connexion peut prendre quelques secondes. Veuillez patienter. Cette fenêtre se fermera automatiquement une fois la connexion rétablie. Si la connexion n’est pas rétablie après une longue attente, essayez de rouvrir SiYuan.","backlinkGlobalSort": "Tri global des références",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex d0dabb421f..2e8038aee6 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "מצב תאימות לשיטות קלט ב־Linux",+ "linuxInputMethodTip": "שימוש ב־X11/XWayland לשיפור תאימות שיטות הקלט; עשוי להשפיע על קנה המידה של התצוגה, חל על כל סביבות העבודה במכשיר זה ונכנס לתוקף לאחר סגירה מלאה והפעלה מחדש של SiYuan",+ "linuxInputMethodError": "לא ניתן לקרוא או לשמור את הגדרות התאימות של שיטות הקלט",+ "linuxInputMethodOverrideTip": "נשלט באמצעות ארגומנטים להפעלה; יש להסיר את --ozone-platform כדי להשתמש בהגדרה זו","mobileKernelReconnecting": "מתחבר מחדש...","mobileKernelReconnectPrompt": "החיבור לליבה נותק זמנית. SiYuan ינסה להתחבר מחדש באופן אוטומטי. בעת חזרה מהרקע, שחזור החיבור עשוי להימשך כמה שניות. נא להמתין. חלון זה ייסגר אוטומטית לאחר שחזור החיבור. אם החיבור לא משוחזר לאחר המתנה ממושכת, כדאי לנסות לפתוח מחדש את SiYuan.","backlinkGlobalSort": "מיון הפניות גלובלי",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex 5751ce968b..266d56f310 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux इनपुट विधि संगतता मोड",+ "linuxInputMethodTip": "इनपुट विधि की संगतता सुधारने के लिए X11/XWayland का उपयोग करें; इससे स्क्रीन स्केलिंग प्रभावित हो सकती है, यह इस डिवाइस के सभी कार्यस्थानों पर लागू होता है और SiYuan को पूरी तरह बंद करके दोबारा शुरू करने के बाद प्रभावी होता है",+ "linuxInputMethodError": "इनपुट विधि संगतता सेटिंग पढ़ी या सहेजी नहीं जा सकी",+ "linuxInputMethodOverrideTip": "स्टार्टअप आर्ग्युमेंट द्वारा नियंत्रित; इस सेटिंग का उपयोग करने के लिए --ozone-platform हटाएँ","mobileKernelReconnecting": "फिर से कनेक्ट हो रहा है...","mobileKernelReconnectPrompt": "कर्नेल से कनेक्शन अस्थायी रूप से टूट गया है। SiYuan अपने आप फिर से कनेक्ट करने का प्रयास करेगा। बैकग्राउंड से लौटने पर कनेक्शन बहाल होने में कुछ सेकंड लग सकते हैं। कृपया प्रतीक्षा करें। कनेक्शन बहाल होने पर यह विंडो अपने आप बंद हो जाएगी। यदि लंबे समय तक कनेक्शन बहाल नहीं होता है, तो SiYuan को फिर से खोलने का प्रयास करें।","backlinkGlobalSort": "सभी संदर्भों का क्रम",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex 4351b45256..b129cc3af8 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Mode kompatibilitas metode masukan Linux",+ "linuxInputMethodTip": "Gunakan X11/XWayland untuk meningkatkan kompatibilitas metode masukan; dapat memengaruhi skala tampilan, berlaku untuk semua ruang kerja di perangkat ini, dan aktif setelah SiYuan ditutup sepenuhnya lalu dimulai ulang",+ "linuxInputMethodError": "Tidak dapat membaca atau menyimpan pengaturan kompatibilitas metode masukan",+ "linuxInputMethodOverrideTip": "Dikendalikan oleh argumen awal; hapus --ozone-platform untuk menggunakan pengaturan ini","mobileKernelReconnecting": "Menghubungkan kembali...","mobileKernelReconnectPrompt": "Koneksi ke kernel terputus sementara. SiYuan akan mencoba menghubungkan kembali secara otomatis. Saat kembali dari latar belakang, pemulihan koneksi mungkin memerlukan beberapa detik. Harap tunggu. Jendela ini akan tertutup secara otomatis setelah koneksi pulih. Jika koneksi belum pulih setelah menunggu lama, coba buka kembali SiYuan.","backlinkGlobalSort": "Urutan referensi global",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex 75b63c4810..f64722dbe1 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Modalità di compatibilità dei metodi di input Linux",+ "linuxInputMethodTip": "Usa X11/XWayland per migliorare la compatibilità dei metodi di input; può influire sul ridimensionamento, si applica a tutti gli spazi di lavoro su questo dispositivo e richiede la chiusura completa e il riavvio di SiYuan",+ "linuxInputMethodError": "Impossibile leggere o salvare le impostazioni di compatibilità dei metodi di input",+ "linuxInputMethodOverrideTip": "Controllato dagli argomenti di avvio; rimuovi --ozone-platform per usare questa impostazione","mobileKernelReconnecting": "Riconnessione in corso...","mobileKernelReconnectPrompt": "La connessione al kernel è stata temporaneamente interrotta. SiYuan tenterà di riconnettersi automaticamente. Al ritorno dal background, il ripristino della connessione potrebbe richiedere alcuni secondi. Attendi. Questa finestra si chiuderà automaticamente una volta ripristinata la connessione. Se la connessione non viene ripristinata dopo una lunga attesa, prova a riaprire SiYuan.","backlinkGlobalSort": "Ordinamento globale dei riferimenti",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex 1842598132..2dc7596c73 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux 入力メソッド互換モード",+ "linuxInputMethodTip": "X11/XWayland を使用して入力メソッドの互換性を改善します。表示倍率に影響する場合があります。この端末のすべてのワークスペースに適用され、SiYuan を完全に終了して再起動すると有効になります",+ "linuxInputMethodError": "入力メソッドの互換設定を読み取りまたは保存できません",+ "linuxInputMethodOverrideTip": "起動引数で制御されています。この設定を使用するには --ozone-platform を削除してください","mobileKernelReconnecting": "再接続しています...","mobileKernelReconnectPrompt": "カーネルとの接続が一時的に切断されました。SiYuan は自動的に再接続を試みます。バックグラウンドから戻った際は、接続の復旧に数秒かかることがありますので、しばらくお待ちください。接続が復旧すると、このウィンドウは自動的に閉じます。長時間待っても復旧しない場合は、SiYuan を開き直してください。","backlinkGlobalSort": "参照全体の並び順",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex cc34938edd..9c5c528520 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux 입력기 호환 모드",+ "linuxInputMethodTip": "X11/XWayland를 사용하여 입력기 호환성을 개선합니다. 화면 배율에 영향을 줄 수 있으며 이 기기의 모든 작업 공간에 적용됩니다. SiYuan을 완전히 종료한 후 다시 시작하면 적용됩니다",+ "linuxInputMethodError": "입력기 호환 설정을 읽거나 저장할 수 없습니다",+ "linuxInputMethodOverrideTip": "시작 인수로 제어됩니다. 이 설정을 사용하려면 --ozone-platform을 제거하세요","mobileKernelReconnecting": "다시 연결하는 중...","mobileKernelReconnectPrompt": "커널과의 연결이 일시적으로 끊어졌습니다. SiYuan이 자동으로 다시 연결을 시도합니다. 백그라운드에서 돌아오면 연결을 복구하는 데 몇 초가 걸릴 수 있으니 잠시 기다려 주세요. 연결이 복구되면 이 창은 자동으로 닫힙니다. 오래 기다려도 연결이 복구되지 않으면 SiYuan을 다시 열어 보세요.","backlinkGlobalSort": "전체 참조 정렬",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 35a8ce973c..3af7fd4a72 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Compatibiliteitsmodus voor Linux-invoermethoden",+ "linuxInputMethodTip": "Gebruik X11/XWayland om de compatibiliteit van invoermethoden te verbeteren; kan de beeldschermschaal beïnvloeden, geldt voor alle werkruimten op dit apparaat en wordt actief nadat SiYuan volledig is afgesloten en opnieuw gestart",+ "linuxInputMethodError": "Kan de compatibiliteitsinstellingen voor invoermethoden niet lezen of opslaan",+ "linuxInputMethodOverrideTip": "Bepaald door opstartargumenten; verwijder --ozone-platform om deze instelling te gebruiken","mobileKernelReconnecting": "Opnieuw verbinden...","mobileKernelReconnectPrompt": "De verbinding met de kernel is tijdelijk verbroken. SiYuan probeert automatisch opnieuw verbinding te maken. Bij terugkeer uit de achtergrond kan het herstellen van de verbinding enkele seconden duren. Even geduld. Dit venster sluit automatisch zodra de verbinding is hersteld. Als de verbinding na lang wachten niet is hersteld, probeer SiYuan dan opnieuw te openen.","backlinkGlobalSort": "Alle verwijzingen sorteren",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex 01af16dbb3..dcee252565 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Tryb zgodności metod wprowadzania w systemie Linux",+ "linuxInputMethodTip": "Używaj X11/XWayland, aby poprawić zgodność metod wprowadzania; może wpływać na skalowanie ekranu, dotyczy wszystkich przestrzeni roboczych na tym urządzeniu i wymaga całkowitego zamknięcia oraz ponownego uruchomienia SiYuan",+ "linuxInputMethodError": "Nie można odczytać lub zapisać ustawień zgodności metod wprowadzania",+ "linuxInputMethodOverrideTip": "Sterowane argumentami uruchamiania; usuń --ozone-platform, aby użyć tego ustawienia","mobileKernelReconnecting": "Ponowne łączenie...","mobileKernelReconnectPrompt": "Połączenie z jądrem zostało tymczasowo przerwane. SiYuan automatycznie spróbuje połączyć się ponownie. Po powrocie z tła przywrócenie połączenia może potrwać kilka sekund. Proszę poczekać. To okno zamknie się automatycznie po przywróceniu połączenia. Jeśli połączenie nie zostanie przywrócone po dłuższym oczekiwaniu, spróbuj ponownie otworzyć SiYuan.","backlinkGlobalSort": "Globalne sortowanie odwołań",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex c05149ca83..45eab19397 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Modo de compatibilidade dos métodos de entrada do Linux",+ "linuxInputMethodTip": "Usar X11/XWayland para melhorar a compatibilidade dos métodos de entrada; pode afetar a escala da tela, aplica-se a todos os espaços de trabalho neste dispositivo e exige encerrar completamente e reiniciar o SiYuan",+ "linuxInputMethodError": "Não foi possível ler ou salvar as configurações de compatibilidade dos métodos de entrada",+ "linuxInputMethodOverrideTip": "Controlado por argumentos de inicialização; remova --ozone-platform para usar esta configuração","mobileKernelReconnecting": "Reconectando...","mobileKernelReconnectPrompt": "A conexão com o núcleo foi interrompida temporariamente. O SiYuan tentará se reconectar automaticamente. Ao retornar do segundo plano, restaurar a conexão pode levar alguns segundos. Aguarde. Esta janela será fechada automaticamente quando a conexão for restaurada. Se a conexão não for restaurada após uma longa espera, tente abrir o SiYuan novamente.","backlinkGlobalSort": "Ordenação global de referências",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex c85ac3541c..da5ebd887b 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Режим совместимости методов ввода Linux",+ "linuxInputMethodTip": "Использовать X11/XWayland для улучшения совместимости методов ввода; может влиять на масштабирование экрана, применяется ко всем рабочим пространствам на этом устройстве и вступает в силу после полного закрытия и перезапуска SiYuan",+ "linuxInputMethodError": "Не удалось прочитать или сохранить настройки совместимости методов ввода",+ "linuxInputMethodOverrideTip": "Управляется параметрами запуска; удалите --ozone-platform, чтобы использовать эту настройку","mobileKernelReconnecting": "Повторное подключение...","mobileKernelReconnectPrompt": "Соединение с ядром временно прервано. SiYuan автоматически попытается подключиться повторно. При возвращении из фонового режима восстановление соединения может занять несколько секунд. Пожалуйста, подождите. Это окно закроется автоматически после восстановления соединения. Если соединение долго не восстанавливается, попробуйте заново открыть SiYuan.","backlinkGlobalSort": "Глобальная сортировка ссылок",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex 426c55411f..738a32e0a4 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Režim kompatibility vstupných metód systému Linux",+ "linuxInputMethodTip": "Použiť X11/XWayland na zlepšenie kompatibility vstupných metód; môže ovplyvniť mierku zobrazenia, platí pre všetky pracovné priestory na tomto zariadení a prejaví sa po úplnom ukončení a opätovnom spustení SiYuan",+ "linuxInputMethodError": "Nastavenia kompatibility vstupných metód sa nepodarilo načítať alebo uložiť",+ "linuxInputMethodOverrideTip": "Riadené argumentmi spustenia; odstráňte --ozone-platform, aby ste mohli použiť toto nastavenie","mobileKernelReconnecting": "Opätovné pripájanie...","mobileKernelReconnectPrompt": "Spojenie s jadrom bolo dočasne prerušené. SiYuan sa automaticky pokúsi znova pripojiť. Pri návrate z pozadia môže obnovenie spojenia trvať niekoľko sekúnd. Počkajte, prosím. Toto okno sa po obnovení spojenia automaticky zatvorí. Ak sa spojenie neobnoví ani po dlhšom čakaní, skúste znova otvoriť SiYuan.","backlinkGlobalSort": "Globálne zoradenie odkazov",diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.jsonindex afcbe768d8..5af17db94e 100644--- a/app/appearance/langs/sr.json+++ b/app/appearance/langs/sr.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Режим компатибилности метода уноса за Linux",+ "linuxInputMethodTip": "Користи X11/XWayland за бољу компатибилност метода уноса; може утицати на скалирање приказа, важи за све радне просторе на овом уређају и примењује се након потпуног затварања и поновног покретања SiYuan-а",+ "linuxInputMethodError": "Није могуће прочитати или сачувати подешавања компатибилности метода уноса",+ "linuxInputMethodOverrideTip": "Контролисано аргументима покретања; уклоните --ozone-platform да бисте користили ово подешавање","mobileKernelReconnecting": "Поновно повезивање...","mobileKernelReconnectPrompt": "Веза са језгром је привремено прекинута. SiYuan ће аутоматски покушати да се поново повеже. При повратку из позадине, обнављање везе може потрајати неколико секунди. Сачекајте. Овај прозор ће се аутоматски затворити када се веза обнови. Ако се веза не обнови ни после дужег чекања, покушајте поново да отворите SiYuan.","backlinkGlobalSort": "Глобално сортирање референци",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex 67e8a80013..441fa8702e 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "โหมดความเข้ากันได้ของวิธีป้อนข้อมูลบน Linux",+ "linuxInputMethodTip": "ใช้ X11/XWayland เพื่อปรับปรุงความเข้ากันได้ของวิธีป้อนข้อมูล อาจส่งผลต่อการปรับขนาดหน้าจอ มีผลกับพื้นที่ทำงานทั้งหมดบนอุปกรณ์นี้ และมีผลหลังจากปิด SiYuan อย่างสมบูรณ์แล้วเปิดใหม่",+ "linuxInputMethodError": "ไม่สามารถอ่านหรือบันทึกการตั้งค่าความเข้ากันได้ของวิธีป้อนข้อมูล",+ "linuxInputMethodOverrideTip": "ควบคุมโดยอาร์กิวเมนต์เริ่มต้น ให้ลบ --ozone-platform เพื่อใช้การตั้งค่านี้","mobileKernelReconnecting": "กำลังเชื่อมต่อใหม่...","mobileKernelReconnectPrompt": "การเชื่อมต่อกับเคอร์เนลขาดหายชั่วคราว SiYuan จะพยายามเชื่อมต่อใหม่โดยอัตโนมัติ เมื่อกลับจากการทำงานเบื้องหลัง การกู้คืนการเชื่อมต่ออาจใช้เวลาสองสามวินาที โปรดรอสักครู่ หน้าต่างนี้จะปิดโดยอัตโนมัติเมื่อเชื่อมต่อได้อีกครั้ง หากรอนานแล้วยังเชื่อมต่อไม่ได้ ให้ลองเปิด SiYuan ใหม่","backlinkGlobalSort": "การเรียงการอ้างอิงทั้งหมด",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex 61ea812877..0b55b58857 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux giriş yöntemi uyumluluk modu",+ "linuxInputMethodTip": "Giriş yöntemi uyumluluğunu iyileştirmek için X11/XWayland kullanır; ekran ölçeklendirmesini etkileyebilir, bu cihazdaki tüm çalışma alanlarına uygulanır ve SiYuan tamamen kapatılıp yeniden başlatıldığında etkinleşir",+ "linuxInputMethodError": "Giriş yöntemi uyumluluk ayarları okunamadı veya kaydedilemedi",+ "linuxInputMethodOverrideTip": "Başlatma argümanları tarafından kontrol ediliyor; bu ayarı kullanmak için --ozone-platform argümanını kaldırın","mobileKernelReconnecting": "Yeniden bağlanılıyor...","mobileKernelReconnectPrompt": "Çekirdekle bağlantı geçici olarak kesildi. SiYuan otomatik olarak yeniden bağlanmayı deneyecek. Arka plandan dönerken bağlantının yeniden kurulması birkaç saniye sürebilir. Lütfen bekleyin. Bağlantı yeniden kurulduğunda bu pencere otomatik olarak kapanacaktır. Uzun süre beklemenize rağmen bağlantı yeniden kurulmazsa SiYuan'ı yeniden açmayı deneyin.","backlinkGlobalSort": "Genel başvuru sıralaması",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex 1be9bd766b..c1e385c97d 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Режим сумісності методів введення Linux",+ "linuxInputMethodTip": "Використовувати X11/XWayland для покращення сумісності методів введення; може впливати на масштабування екрана, застосовується до всіх робочих просторів на цьому пристрої та набуває чинності після повного закриття й перезапуску SiYuan",+ "linuxInputMethodError": "Не вдалося прочитати або зберегти налаштування сумісності методів введення",+ "linuxInputMethodOverrideTip": "Керується параметрами запуску; видаліть --ozone-platform, щоб використовувати це налаштування","mobileKernelReconnecting": "Повторне підключення...","mobileKernelReconnectPrompt": "З’єднання з ядром тимчасово перервано. SiYuan автоматично спробує підключитися знову. Після повернення з фонового режиму відновлення з’єднання може тривати кілька секунд. Зачекайте, будь ласка. Це вікно автоматично закриється після відновлення з’єднання. Якщо з’єднання довго не відновлюється, спробуйте знову відкрити SiYuan.","backlinkGlobalSort": "Глобальне сортування посилань",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex ed6804f5aa..be761b3c3e 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux 输入法兼容模式",+ "linuxInputMethodTip": "通过 X11/XWayland 改善输入法兼容性,可能影响显示缩放,作用于本机所有工作空间,完全退出并重新启动思源后生效",+ "linuxInputMethodError": "无法读取或保存输入法兼容设置",+ "linuxInputMethodOverrideTip": "当前由启动参数控制,移除 --ozone-platform 后可使用此设置","mobileKernelReconnecting": "正在重新连接...","mobileKernelReconnectPrompt": "与内核的连接暂时断开,思源会自动尝试重新连接。从后台返回时,恢复连接可能需要几秒,请稍等。连接恢复后,本窗口会自动关闭。如果长时间未恢复,请尝试重新打开思源。","backlinkGlobalSort": "全局引用排序",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex dcb0dc3c72..fd1fb61c3f 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1,4 +1,8 @@{+ "linuxInputMethod": "Linux 輸入法相容模式",+ "linuxInputMethodTip": "透過 X11/XWayland 改善輸入法相容性,可能影響顯示縮放,套用至本機所有工作空間,完全結束並重新啟動思源後生效",+ "linuxInputMethodError": "無法讀取或儲存輸入法相容設定",+ "linuxInputMethodOverrideTip": "目前由啟動參數控制,移除 --ozone-platform 後可使用此設定","mobileKernelReconnecting": "正在重新連線...","mobileKernelReconnectPrompt": "與核心的連線暫時中斷,思源會自動嘗試重新連線。從背景返回時,恢復連線可能需要幾秒,請稍候。連線恢復後,本視窗會自動關閉。如果長時間未恢復,請嘗試重新開啟思源。","backlinkGlobalSort": "全域引用排序",diff --git a/app/electron/linuxInputMethod.js b/app/electron/linuxInputMethod.jsnew file mode 100644index 0000000000..1d7d8cdf65--- /dev/null+++ b/app/electron/linuxInputMethod.js@@ -0,0 +1,50 @@+const fs = require("node:fs");+const path = require("node:path");+const crypto = require("node:crypto");++const readLinuxInputMethodSetting = (file) => {+ try {+ const data = JSON.parse(fs.readFileSync(file, "utf8"));+ if (typeof data?.enabled !== "boolean") {+ throw new Error("Invalid Linux input method setting");+ }+ return data.enabled;+ } catch (error) {+ if (error.code === "ENOENT") {+ return false;+ }+ throw error;+ }+};++const writeLinuxInputMethodSetting = (file, enabled) => {+ if (typeof enabled !== "boolean") {+ throw new TypeError("Invalid Linux input method setting");+ }+ fs.mkdirSync(path.dirname(file), {recursive: true});+ const temporary = file + "." + crypto.randomBytes(8).toString("hex") + ".tmp";+ try {+ fs.writeFileSync(temporary, JSON.stringify({enabled}), {mode: 0o600});+ fs.renameSync(temporary, file);+ } finally {+ if (fs.existsSync(temporary)) {+ fs.unlinkSync(temporary);+ }+ }+};++// 显式显示后端参数优先于本机兼容设置。+const getLinuxInputMethodOverride = (commandLine) => {+ if (commandLine.hasSwitch("ozone-platform")) {+ return commandLine.getSwitchValue("ozone-platform") === "x11";+ }+ return null;+};++const configureLinuxInputMethod = (commandLine, enabled, platform) => {+ if (platform === "linux" && enabled && getLinuxInputMethodOverride(commandLine) === null) {+ commandLine.appendSwitch("ozone-platform", "x11");+ }+};++module.exports = {readLinuxInputMethodSetting, writeLinuxInputMethodSetting, getLinuxInputMethodOverride, configureLinuxInputMethod};diff --git a/app/electron/linuxInputMethod.test.js b/app/electron/linuxInputMethod.test.jsnew file mode 100644index 0000000000..35066fd2dc--- /dev/null+++ b/app/electron/linuxInputMethod.test.js@@ -0,0 +1,71 @@+const assert = require("node:assert/strict");+const fs = require("node:fs");+const os = require("node:os");+const path = require("node:path");+const {test} = require("node:test");+const {+ readLinuxInputMethodSetting, writeLinuxInputMethodSetting, getLinuxInputMethodOverride, configureLinuxInputMethod,+} = require("./linuxInputMethod");++const commandLine = (platform) => {+ const switches = new Map(platform === undefined ? [] : [["ozone-platform", platform]]);+ return {+ hasSwitch: (name) => switches.has(name),+ getSwitchValue: (name) => switches.get(name),+ appendSwitch: (name, value) => switches.set(name, value),+ };+};++test("compatibility mode persists across launches and can be disabled", (t) => {+ const directory = fs.mkdtempSync(path.join(os.tmpdir(), "siyuan-ime-"));+ t.after(() => fs.rmSync(directory, {recursive: true, force: true}));+ const file = path.join(directory, "conf", "linux-input-method.json");+ assert.equal(readLinuxInputMethodSetting(file), false);+ for (const enabled of [true, false]) {+ writeLinuxInputMethodSetting(file, enabled);+ const launch = commandLine();+ configureLinuxInputMethod(launch, readLinuxInputMethodSetting(file), "linux");+ assert.equal(launch.getSwitchValue("ozone-platform"), enabled ? "x11" : undefined);+ }+ assert.deepEqual(fs.readdirSync(path.dirname(file)), ["linux-input-method.json"]);+});++test("explicit display backend overrides either saved choice", () => {+ for (const backend of ["x11", "wayland", "auto", ""]) {+ for (const enabled of [false, true]) {+ const launch = commandLine(backend);+ assert.equal(getLinuxInputMethodOverride(launch), backend === "x11");+ configureLinuxInputMethod(launch, enabled, "linux");+ assert.equal(launch.getSwitchValue("ozone-platform"), backend);+ }+ }+ assert.equal(getLinuxInputMethodOverride(commandLine()), null);+});++test("compatibility mode does not alter other platforms", () => {+ for (const platform of ["win32", "darwin"]) {+ const launch = commandLine();+ configureLinuxInputMethod(launch, true, platform);+ assert.equal(launch.hasSwitch("ozone-platform"), false);+ }+});++test("invalid settings and failed writes preserve existing data", (t) => {+ const directory = fs.mkdtempSync(path.join(os.tmpdir(), "siyuan-ime-"));+ t.after(() => fs.rmSync(directory, {recursive: true, force: true}));+ const file = path.join(directory, "linux-input-method.json");+ for (const content of ["{", "null", "{}", '{"enabled":"false"}']) {+ fs.writeFileSync(file, content);+ assert.throws(() => readLinuxInputMethodSetting(file));+ assert.equal(fs.readFileSync(file, "utf8"), content);+ }+ writeLinuxInputMethodSetting(file, true);+ for (const value of [undefined, null, "false", 0, {}]) {+ assert.throws(() => writeLinuxInputMethodSetting(file, value), TypeError);+ assert.equal(readLinuxInputMethodSetting(file), true);+ }+ t.mock.method(fs, "renameSync", () => { throw new Error("Write failed"); });+ assert.throws(() => writeLinuxInputMethodSetting(file, false), /Write failed/);+ assert.equal(readLinuxInputMethodSetting(file), true);+ assert.deepEqual(fs.readdirSync(directory), ["linux-input-method.json"]);+});diff --git a/app/electron/main.js b/app/electron/main.jsindex 3be186318a..33fe6860a8 100644--- a/app/electron/main.js+++ b/app/electron/main.js@@ -78,6 +78,10 @@ const {readAccessibilitySetting, writeAccessibilitySetting, getAccessibilityOverride, configureAccessibility,} = require("./accessibility");+const {+ readLinuxInputMethodSetting, writeLinuxInputMethodSetting, getLinuxInputMethodOverride, configureLinuxInputMethod,+} = require("./linuxInputMethod");+process.noAsar = true;const appDir = path.dirname(app.getAppPath());const isDevEnv = process.env.NODE_ENV === "development";@@ -85,6 +89,7 @@ const simulateRosetta = process.argv.includes("--simulate-rosetta");const appVer = app.getVersion();const confDir = path.join(app.getPath("home"), ".config", "siyuan");const windowStatePath = path.join(confDir, "windowState.json");+const linuxInputMethodSettingPath = path.join(confDir, "linux-input-method.json");const accessibilitySettingPath = path.join(confDir, "accessibility.json");const appCrashLogPath = path.join(confDir, "app.crash.log");const appCrashMarkerPath = path.join(confDir, "app.crash.json");@@ -767,6 +772,18 @@ try {}configureAccessibility(app.commandLine, accessibilityEnabled);+// Linux 输入法兼容设置在窗口创建前应用,显式显示后端参数保持优先。+const linuxInputMethodOverride = getLinuxInputMethodOverride(app.commandLine);+let linuxInputMethodEnabled = false;+if (process.platform === "linux") {+ try {+ linuxInputMethodEnabled = readLinuxInputMethodSetting(linuxInputMethodSettingPath);+ } catch (error) {+ writeLog("read Linux input method setting failed: " + error.message);+ }+ configureLinuxInputMethod(app.commandLine, linuxInputMethodEnabled, process.platform);+}+try {firstOpen = !remoteKernelTarget && !fs.existsSync(path.join(confDir, "workspace.json"));if (!fs.existsSync(confDir)) {@@ -3104,6 +3121,17 @@ app.whenReady().then(() => {app.exit();});ipcMain.handle("siyuan-get", async (event, data) => {+ if (data.cmd === "getLinuxInputMethodSetting" || data.cmd === "setLinuxInputMethodSetting") {+ if (process.platform !== "linux" || !initializedWindowIds.has(event.sender.id) ||+ !getWindowKernelTarget(event.sender.id) || event.senderFrame !== event.sender.mainFrame) {+ throw new Error("Linux input method setting is unavailable");+ }+ if (data.cmd === "setLinuxInputMethodSetting") {+ writeLinuxInputMethodSetting(linuxInputMethodSettingPath, data.enabled);+ linuxInputMethodEnabled = data.enabled;+ }+ return {enabled: linuxInputMethodEnabled, override: linuxInputMethodOverride};+ }if (data.cmd === "getAccessibilitySetting" || data.cmd === "setAccessibilitySetting") {if (!initializedWindowIds.has(event.sender.id) ||!getWindowKernelTarget(event.sender.id) || event.senderFrame !== event.sender.mainFrame) {diff --git a/app/src/config/tabs/appTab.test.ts b/app/src/config/tabs/appTab.test.tsindex 75ad725e47..bae201023a 100644--- a/app/src/config/tabs/appTab.test.ts+++ b/app/src/config/tabs/appTab.test.ts@@ -18,6 +18,7 @@ const getAccessibilitySlot = (browser: boolean, mobile: boolean, invoke?: Invokeconst moduleExports: {registerAppTab?: (tab: unknown) => void} = {};runInNewContext(code, {exports: moduleExports,+ process: {platform: "win32"},console: {warn: (): void => undefined},window: {siyuan: {languages: new Proxy({}, {get: (_, key) => String(key)}),diff --git a/app/src/config/tabs/appTab.ts b/app/src/config/tabs/appTab.tsindex 6ab9cdacf3..689dc3f842 100644--- a/app/src/config/tabs/appTab.ts+++ b/app/src/config/tabs/appTab.ts@@ -231,6 +231,22 @@ const registerAppGeneralGroup = (tab: SettingTabBuilder) => {</label>`,afterMount: mountAccessibilitySetting,});+ if (process.platform === "linux") {+ group.slot({+ key: "linuxInputMethod",+ keywords: [window.siyuan.languages.linuxInputMethod, window.siyuan.languages.linuxInputMethodTip],+ html: () => `<label class="fn__flex b3-label config-item">+ <div class="fn__flex-1 config-item__main">+ ${genConfigItemName(window.siyuan.languages.linuxInputMethod)}+ <div class="b3-label__text">${window.siyuan.languages.linuxInputMethodTip}</div>+ <div id="linuxInputMethodStatus" class="b3-label__text fn__none" role="status"></div>+ </div>+ <span class="fn__space"></span>+ <input id="linuxInputMethod" class="b3-switch fn__flex-center" type="checkbox" disabled>+ </label>`,+ afterMount: mountLinuxInputMethodSetting,+ });+ }/// #endif};@@ -276,6 +292,48 @@ const mountAccessibilitySetting = async (root: HTMLElement) => {}});};++const mountLinuxInputMethodSetting = async (root: HTMLElement) => {+ const input = root.querySelector<HTMLInputElement>("#linuxInputMethod");+ const status = root.querySelector<HTMLElement>("#linuxInputMethodStatus");+ let enabled = false;+ const showStatus = (text: string) => {+ status.textContent = text;+ status.classList.toggle("fn__none", !text);+ };+ try {+ const setting: {enabled: boolean; override: boolean | null} = await ipcRenderer.invoke(Constants.SIYUAN_GET, {+ cmd: "getLinuxInputMethodSetting",+ });+ enabled = setting.enabled;+ input.checked = setting.override ?? enabled;+ if (setting.override !== null) {+ showStatus(window.siyuan.languages.linuxInputMethodOverrideTip);+ return;+ }+ input.disabled = false;+ } catch (error) {+ console.warn("read Linux input method setting failed", error);+ showStatus(window.siyuan.languages.linuxInputMethodError);+ return;+ }+ input.addEventListener("change", async () => {+ input.disabled = true;+ showStatus("");+ try {+ const setting: {enabled: boolean} = await ipcRenderer.invoke(Constants.SIYUAN_GET, {+ cmd: "setLinuxInputMethodSetting", enabled: input.checked,+ });+ enabled = setting.enabled;+ } catch (error) {+ console.warn("save Linux input method setting failed", error);+ showStatus(window.siyuan.languages.linuxInputMethodError);+ } finally {+ input.checked = enabled;+ input.disabled = false;+ }+ });+};/// #endifconst genNetworkProxyHtml = (): string => {diff --git a/app/src/config/tabs/linuxInputMethod.test.ts b/app/src/config/tabs/linuxInputMethod.test.tsnew file mode 100644index 0000000000..8b6607c6ac--- /dev/null+++ b/app/src/config/tabs/linuxInputMethod.test.ts@@ -0,0 +1,131 @@+import * as assert from "node:assert/strict";+import {readFileSync} from "node:fs";+import {resolve} from "node:path";+import {test} from "node:test";+import {runInNewContext} from "node:vm";+import {ModuleKind, transpileModule} from "typescript";++const {parse} = require("ifdef-loader/preprocessor");++type LinuxInputMethodSetting = {enabled: boolean; override: boolean | null};+type Invoke = (channel: string, data: {cmd: string; enabled?: boolean}) => Promise<LinuxInputMethodSetting>;+type Slot = {key: string; html: () => string; afterMount: (root: unknown) => Promise<void>};++const getLinuxInputMethodSlot = (browser: boolean, mobile: boolean, invoke?: Invoke, platform = "linux"): Slot | undefined => {+ const source = readFileSync(resolve(process.cwd(), "src/config/tabs/appTab.ts"), "utf8");+ const processed = parse(source, {BROWSER: browser, MOBILE: mobile}, false, true);+ const code = transpileModule(processed, {compilerOptions: {module: ModuleKind.CommonJS}}).outputText;+ const moduleExports: {registerAppTab?: (tab: unknown) => void} = {};+ runInNewContext(code, {+ exports: moduleExports,+ process: {platform},+ console: {warn: (): void => undefined},+ window: {siyuan: {+ languages: new Proxy({}, {get: (_, key) => String(key)}),+ config: {system: {isMicrosoftStore: true}},+ }},+ require: (name: string) => {+ if (name === "electron") {+ assert.equal(browser, false);+ return {ipcRenderer: {invoke}};+ }+ if (name === "../../constants") {+ return {Constants: {SIYUAN_GET: "siyuan-get"}};+ }+ if (name === "../../util/hostCapabilities") {+ return {getHostCapabilities: () => ({importExport: false, workspaces: false})};+ }+ return new Proxy({}, {get: () => () => ""});+ },+ });+ const slots: Slot[] = [];+ const group = new Proxy({}, {+ get: (_, method) => (value: Slot) => {+ if (method === "slot") {+ slots.push(value);+ }+ },+ });+ moduleExports.registerAppTab({group: () => group});+ return slots.find(slot => slot.key === "linuxInputMethod");+};++const controls = () => {+ let change: () => Promise<void>;+ const input = {+ checked: false,+ disabled: true,+ addEventListener: (_: string, listener: () => Promise<void>) => { change = listener; },+ };+ const status = {textContent: "", classList: {toggle: (): void => undefined}};+ const root = {querySelector: (selector: string) => selector === "#linuxInputMethod" ? input : status};+ return {root, input, status, change: () => change()};+};++test("Linux input method preference is available in Electron but excluded from browser and mobile", () => {+ assert.ok(getLinuxInputMethodSlot(false, false));+ assert.equal(getLinuxInputMethodSlot(true, false), undefined);+ assert.equal(getLinuxInputMethodSlot(true, true), undefined);+});++test("Linux input method preference loads and saves through the desktop process", async () => {+ let saved = false;+ const slot = getLinuxInputMethodSlot(false, false, async (channel, data) => {+ assert.equal(channel, "siyuan-get");+ if (data.cmd === "setLinuxInputMethodSetting") {+ saved = data.enabled;+ }+ return {enabled: saved, override: null};+ });+ const view = controls();+ await slot.afterMount(view.root);+ assert.equal(view.input.checked, false);+ assert.equal(view.input.disabled, false);+ view.input.checked = true;+ await view.change();+ assert.equal(saved, true);+ const reopened = controls();+ await slot.afterMount(reopened.root);+ assert.equal(reopened.input.checked, true);+});++test("startup overrides display their effective state and explain the locked control", async () => {+ for (const override of [false, true]) {+ const slot = getLinuxInputMethodSlot(false, false, async () => ({enabled: !override, override}));+ const view = controls();+ await slot.afterMount(view.root);+ assert.equal(view.input.checked, override);+ assert.equal(view.input.disabled, true);+ assert.equal(view.status.textContent, "linuxInputMethodOverrideTip");+ }+});++test("read failures keep the preference disabled and visible to the user", async () => {+ const slot = getLinuxInputMethodSlot(false, false, async () => { throw new Error("Unavailable"); });+ const view = controls();+ await slot.afterMount(view.root);+ assert.equal(view.input.disabled, true);+ assert.equal(view.status.textContent, "linuxInputMethodError");+});++test("save failures restore the previous choice and allow retry", async () => {+ const slot = getLinuxInputMethodSlot(false, false, async (_, data) => {+ if (data.cmd === "setLinuxInputMethodSetting") {+ throw new Error("Unable to save");+ }+ return {enabled: false, override: null};+ });+ const view = controls();+ await slot.afterMount(view.root);+ view.input.checked = true;+ await view.change();+ assert.equal(view.input.checked, false);+ assert.equal(view.input.disabled, false);+ assert.equal(view.status.textContent, "linuxInputMethodError");+});++test("Linux input method preference is hidden on other desktop platforms", () => {+ for (const platform of ["win32", "darwin"]) {+ assert.equal(getLinuxInputMethodSlot(false, false, undefined, platform), undefined);+ }+});