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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user