feat: add Russian localization and independent STT languages
CI / Typecheck, tests, lint (push) Canceled after 0s
CI / Standalone (mac-arm64) (push) Canceled after 0s
CI / Standalone (linux-x64) (push) Canceled after 0s
CI / Standalone (windows-x64) (push) Canceled after 0s

This commit is contained in:
2026-10-25 17:18:44 +03:00
parent b277ee3e0f
commit a50ca4b867
93 changed files with 3261 additions and 904 deletions
+5 -2
View File
@@ -63,6 +63,7 @@ describe("desktop window chrome", () => {
it("preload exposes OS identity without exposing Node/Electron to the renderer", () => {
let bridge: Record<string, unknown> = {};
const sent: unknown[][] = [];
const context = {
process: { platform: "win32" },
require: () => ({
@@ -72,13 +73,15 @@ describe("desktop window chrome", () => {
bridge = api;
},
},
ipcRenderer: {},
ipcRenderer: { send: (...args: unknown[]) => sent.push(args) },
}),
};
runInNewContext(readFileSync(new URL("../electron/preload.cjs", import.meta.url), "utf8"), context);
assert.equal(bridge.platform, "win32");
(bridge.setLanguage as (language: string) => void)("ru");
assert.deepEqual(sent, [["lh:language", "ru"]]);
assert.deepEqual(Object.keys(bridge).sort(), [
"chatgpt", "expandWindow", "getZoom", "installUpdate", "onUpdateStatus", "onZoom", "platform", "subscriptions",
"chatgpt", "expandWindow", "getZoom", "installUpdate", "onUpdateStatus", "onZoom", "platform", "setLanguage", "subscriptions",
]);
assert.deepEqual(Object.keys(bridge.subscriptions as object).sort(), ["cancel", "consent", "disconnect", "login", "onChange", "open", "respond", "retry", "status"]);
});