1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

[PM-3753] Update electron desktop language handling (#6482)

* [PM-3753] Update desktop language handling

* Remove i18n service import aliases

* Validate the provided locale before loading it

* Support underscores in locales
This commit is contained in:
Daniel García
2023-10-24 12:32:54 +02:00
committed by GitHub
parent 17897cfe35
commit 222345f0c9
6 changed files with 102 additions and 18 deletions

View File

@@ -39,6 +39,9 @@ export default {
ipcRenderer.on("systemThemeUpdated", (_event, theme: ThemeType) => callback(theme));
},
getLanguageFile: (formattedLocale: string): Promise<object> =>
ipcRenderer.invoke("getLanguageFile", formattedLocale),
sendMessage: (message: { command: string } & any) =>
ipcRenderer.send("messagingService", message),
onMessage: (callback: (message: { command: string } & any) => void) => {