make spellcheck use all system locales

This commit is contained in:
Vendicated
2023-04-14 04:05:56 +02:00
parent 9120d05efc
commit 70dd38f79d
4 changed files with 17 additions and 2 deletions

View File

@@ -23,6 +23,10 @@ export const VencordDesktopNative = {
get: () => sendSync<Settings>(IpcEvents.GET_SETTINGS),
set: (settings: Settings, path?: string) => invoke<void>(IpcEvents.SET_SETTINGS, settings, path)
},
spellcheck: {
setLanguages: (languages: readonly string[]) => invoke<void>(IpcEvents.SPELLCHECK_SET_LANGUAGES, languages)
// todo: perhaps add ways to learn words
},
win: {
focus: () => invoke<void>(IpcEvents.FOCUS)
}

View File

@@ -39,5 +39,6 @@ if (IS_DEV) {
document.getElementById("vcd-css-core")!.textContent = readFileSync(rendererCss, "utf-8");
});
}
// #endregion
VencordDesktopNative.spellcheck.setLanguages(window.navigator.languages);