-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add translation support for closing window (#640)
* chore: Made closing text translatable * chore: closing text update clean up * Use IPC for updating the closing screen message * Remove extra show call * Remove unused variable Co-authored-by: ErikSin <67773827+ErikSin@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { ipcRenderer } = require('electron') | ||
|
||
window.addEventListener('DOMContentLoaded', () => { | ||
ipcRenderer.invoke('CLOSING:get-message').then(updateDom) | ||
ipcRenderer.on('CLOSING:update-message', (ev, message) => updateDom(message)) | ||
}) | ||
|
||
function updateDom (message) { | ||
const closingH1 = document.getElementById('closingText') | ||
if (closingH1) closingH1.textContent = message | ||
} |