mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
translations for dialogs
This commit is contained in:
parent
00d8d57e66
commit
7c405a31fd
@ -81,5 +81,11 @@
|
||||
|
||||
"updateNotifText": "A new update is available! Newest version: ",
|
||||
|
||||
"chineseCharacterAlert": "The file path set contains Chinese characters, this may cause problems!"
|
||||
"chineseCharacterAlert": "The file path set contains Chinese characters, this may cause problems!",
|
||||
|
||||
"dialogOk": "OK",
|
||||
"dialogNo": "NO",
|
||||
"serverEnableDialogTitle": "You found the Grasscutter server launcher!",
|
||||
"serverEnableDialogText": "If you do not have an existing Grasscutter installation to set, would you like to download a build?"
|
||||
|
||||
}
|
||||
|
@ -123,13 +123,16 @@ function openDialog(title, message, negBtn = false, affirmBtn = closeDialog) {
|
||||
const noBtn = document.getElementById('dialogButtonNeg')
|
||||
const yesBtn = document.getElementById('dialogButtonAffirm')
|
||||
|
||||
if (!noBtn) {
|
||||
if (!negBtn) {
|
||||
noBtn.style.display = 'none'
|
||||
} else {
|
||||
noBtn.style.removeProperty('display')
|
||||
noBtn.onclick = () => closeDialog()
|
||||
}
|
||||
|
||||
yesBtn.innerText = localeObj.dialogYes || 'OK'
|
||||
noBtn.innerText = localeObj.dialogNo || 'NO'
|
||||
|
||||
yesBtn.onclick = () => {
|
||||
affirmBtn()
|
||||
closeDialog()
|
||||
|
@ -27,8 +27,8 @@ async function toggleServerLaunchSection() {
|
||||
closeSettings()
|
||||
|
||||
openDialog(
|
||||
'You found the Grasscutter server launcher!' || localeObj.serverEnableDialogTitle,
|
||||
'If you do not have an existing Grasscutter installation to set, would you like to download a build?' || localeObj.serverEnableDialogText,
|
||||
localeObj.serverEnableDialogTitle || 'You found the Grasscutter server launcher!',
|
||||
localeObj.serverEnableDialogText || 'If you do not have an existing Grasscutter installation to set, would you like to download a build?',
|
||||
true,
|
||||
openDownloads
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user