mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08: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: ",
|
"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 noBtn = document.getElementById('dialogButtonNeg')
|
||||||
const yesBtn = document.getElementById('dialogButtonAffirm')
|
const yesBtn = document.getElementById('dialogButtonAffirm')
|
||||||
|
|
||||||
if (!noBtn) {
|
if (!negBtn) {
|
||||||
noBtn.style.display = 'none'
|
noBtn.style.display = 'none'
|
||||||
} else {
|
} else {
|
||||||
noBtn.style.removeProperty('display')
|
noBtn.style.removeProperty('display')
|
||||||
noBtn.onclick = () => closeDialog()
|
noBtn.onclick = () => closeDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yesBtn.innerText = localeObj.dialogYes || 'OK'
|
||||||
|
noBtn.innerText = localeObj.dialogNo || 'NO'
|
||||||
|
|
||||||
yesBtn.onclick = () => {
|
yesBtn.onclick = () => {
|
||||||
affirmBtn()
|
affirmBtn()
|
||||||
closeDialog()
|
closeDialog()
|
||||||
|
@ -27,8 +27,8 @@ async function toggleServerLaunchSection() {
|
|||||||
closeSettings()
|
closeSettings()
|
||||||
|
|
||||||
openDialog(
|
openDialog(
|
||||||
'You found the Grasscutter server launcher!' || localeObj.serverEnableDialogTitle,
|
localeObj.serverEnableDialogTitle || 'You found the Grasscutter server launcher!',
|
||||||
'If you do not have an existing Grasscutter installation to set, would you like to download a build?' || localeObj.serverEnableDialogText,
|
localeObj.serverEnableDialogText || 'If you do not have an existing Grasscutter installation to set, would you like to download a build?',
|
||||||
true,
|
true,
|
||||||
openDownloads
|
openDownloads
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user