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, () => {
document.getElementById('overlayContainer').style.background = 'none'
setOverlayContent(
'Fatal Error: Unable to Load Distribution Index',
'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.',
'Close'
Lang.queryJS('uibinder.startup.fatalErrorTitle'),
Lang.queryJS('uibinder.startup.fatalErrorMessage'),
Lang.queryJS('uibinder.startup.closeButton')
)
setOverlayHandler(() => {
const window = remote.getCurrentWindow()
@ -333,10 +333,12 @@ async function validateSelectedAccount(){
ConfigManager.save()
const accLen = Object.keys(ConfigManager.getAuthAccounts()).length
setOverlayContent(
'Failed to Refresh Login',
`We were unable to refresh the login for <strong>${selectedAcc.displayName}</strong>. Please ${accLen > 0 ? 'select another account or ' : ''} login again.`,
'Login',
'Select Another Account'
Lang.queryJS('uibinder.validateAccount.failedMessageTitle'),
accLen > 0
? Lang.queryJS('uibinder.validateAccount.failedMessage', { 'account': selectedAcc.displayName })
: Lang.queryJS('uibinder.validateAccount.failedMessageSelectAnotherAccount', { 'account': selectedAcc.displayName }),
Lang.queryJS('uibinder.validateAccount.loginButton'),
Lang.queryJS('uibinder.validateAccount.selectAnotherAccountButton')
)
setOverlayHandler(() => {

View File

@ -311,6 +311,20 @@
"checkForUpdatesButton": "Check 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"
}
}
}
}