Mehrsprachigkeit (Englisch/Deutsch, Systemsprache oder Auswahl in den Einstellungen), README auf Englisch für Nutzer, Version 0.4.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ const { spawn } = require('child_process');
|
||||
|
||||
let koffi = null;
|
||||
try { koffi = require('koffi'); } catch { /* ohne koffi nur externe Fenster */ }
|
||||
const i18n = require('../i18n');
|
||||
|
||||
// ------------------------------------------------------------------ Windows
|
||||
// Chromium zeichnet per DirectComposition über alle nativen Kindfenster – ein per SetParent eingehängtes
|
||||
@@ -135,7 +136,7 @@ function x11() {
|
||||
XSync: l.func('int XSync(void *d, int discard)'),
|
||||
};
|
||||
x11.api.display = x11.api.XOpenDisplay(null);
|
||||
if (!x11.api.display) throw new Error('Keine Verbindung zum X-Server (MrTerm läuft nicht unter X11/XWayland).');
|
||||
if (!x11.api.display) throw new Error(i18n.t('No connection to the X server (MrTerm is not running under X11/XWayland).'));
|
||||
return x11.api;
|
||||
}
|
||||
|
||||
@@ -195,12 +196,12 @@ class LinuxEmbed {
|
||||
}
|
||||
|
||||
function embedSupported() {
|
||||
if (!koffi) return { ok: false, reason: 'koffi nicht verfügbar' };
|
||||
if (!koffi) return { ok: false, reason: i18n.t('koffi not available') };
|
||||
if (process.platform === 'win32') return { ok: true };
|
||||
if (process.platform === 'linux') {
|
||||
try { x11(); return { ok: true }; } catch (e) { return { ok: false, reason: e.message }; }
|
||||
}
|
||||
return { ok: false, reason: 'Plattform nicht unterstützt' };
|
||||
return { ok: false, reason: i18n.t('Platform not supported') };
|
||||
}
|
||||
|
||||
function createEmbed(parentHandle) {
|
||||
|
||||
Reference in New Issue
Block a user