i18n for uibinder.js

This commit is contained in:
Kamesuta 2023-09-02 15:21:43 +09:00
parent 988d9391a5
commit 9a956c4553
2 changed files with 23 additions and 7 deletions

View File

@ -115,9 +115,9 @@ function showFatalStartupError(){
$('#loadingContainer').fadeOut(250, () => { $('#loadingContainer').fadeOut(250, () => {
document.getElementById('overlayContainer').style.background = 'none' document.getElementById('overlayContainer').style.background = 'none'
setOverlayContent( setOverlayContent(
'Fatal Error: Unable to Load Distribution Index', Lang.queryJS('uibinder.startup.fatalErrorTitle'),
'A connection could not be established to our servers to download the distribution index. No local copies were available to load. <br><br>The distribution index is an essential file which provides the latest server information. The launcher is unable to start without it. Ensure you are connected to the internet and relaunch the application.', Lang.queryJS('uibinder.startup.fatalErrorMessage'),
'Close' Lang.queryJS('uibinder.startup.closeButton')
) )
setOverlayHandler(() => { setOverlayHandler(() => {
const window = remote.getCurrentWindow() const window = remote.getCurrentWindow()
@ -333,10 +333,12 @@ async function validateSelectedAccount(){
ConfigManager.save() ConfigManager.save()
const accLen = Object.keys(ConfigManager.getAuthAccounts()).length const accLen = Object.keys(ConfigManager.getAuthAccounts()).length
setOverlayContent( setOverlayContent(
'Failed to Refresh Login', Lang.queryJS('uibinder.validateAccount.failedMessageTitle'),
`We were unable to refresh the login for <strong>${selectedAcc.displayName}</strong>. Please ${accLen > 0 ? 'select another account or ' : ''} login again.`, accLen > 0
'Login', ? Lang.queryJS('uibinder.validateAccount.failedMessage', { 'account': selectedAcc.displayName })
'Select Another Account' : Lang.queryJS('uibinder.validateAccount.failedMessageSelectAnotherAccount', { 'account': selectedAcc.displayName }),
Lang.queryJS('uibinder.validateAccount.loginButton'),
Lang.queryJS('uibinder.validateAccount.selectAnotherAccountButton')
) )
setOverlayHandler(() => { setOverlayHandler(() => {

View File

@ -311,6 +311,20 @@
"checkForUpdatesButton": "Check for Updates", "checkForUpdatesButton": "Check for Updates",
"checkingForUpdatesButton": "Checking for Updates.." "checkingForUpdatesButton": "Checking for Updates.."
} }
},
"uibinder": {
"startup": {
"fatalErrorTitle": "Fatal Error: Unable to Load Distribution Index",
"fatalErrorMessage": "A connection could not be established to our servers to download the distribution index. No local copies were available to load. <br><br>The distribution index is an essential file which provides the latest server information. The launcher is unable to start without it. Ensure you are connected to the internet and relaunch the application.",
"closeButton": "Close"
},
"validateAccount": {
"failedMessageTitle": "Failed to Refresh Login",
"failedMessage": "We were unable to refresh the login for <strong>{account}</strong>. Please select another account or login again.",
"failedMessageSelectAnotherAccount": "We were unable to refresh the login for <strong>{account}</strong>. Please login again.",
"loginButton": "Login",
"selectAnotherAccountButton": "Select Another Account"
}
} }
} }
} }