From 71235a59c3737bbea2606a458017ee87da128235 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sat, 7 May 2022 19:58:17 -0700 Subject: [PATCH] hardcoded language defaults --- languages/en.json | 2 +- resources/js/index.js | 4 ++-- resources/js/translation.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/languages/en.json b/languages/en.json index b746cec..674781a 100644 --- a/languages/en.json +++ b/languages/en.json @@ -38,7 +38,7 @@ "proxyInstallBtn": "Install", "proxyInstallDeny": "No thanks", - "gameFolderDialog": "Select game folder", + "gameFolderDialog": "Select game exe", "grasscutterFileDialog": "Select Grasscutter server jar file", "loggingInTo": "Logging in to: ", diff --git a/resources/js/index.js b/resources/js/index.js index 791dbfb..fee2c9d 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -428,7 +428,7 @@ async function setGameExe() { } async function setGrasscutterFolder() { - const folder = await Neutralino.os.showOpenDialog(localeObj.grasscutterFileDialog, { + const folder = await Neutralino.os.showOpenDialog(localeObj.grasscutterFileDialog || 'Select Grasscutter server jar file', { filters: [ { name: 'Jar files', extensions: ['jar'] } ] @@ -437,7 +437,7 @@ async function setGrasscutterFolder() { if (!folder[0]) return console.log(hasForeignChars(folder[0])) - if (hasForeignChars(folder[0])) displayAlert(localeObj.foreignCharacterAlert) + if (hasForeignChars(folder[0])) displayAlert(localeObj.foreignCharacterAlert || 'The file path set contains foreign characters, this may cause problems!') // Set the folder in our configuration const config = await getCfg() diff --git a/resources/js/translation.js b/resources/js/translation.js index a579a5f..17276bd 100644 --- a/resources/js/translation.js +++ b/resources/js/translation.js @@ -38,8 +38,8 @@ async function doTranslation() { set('grasscutterFileSet', 'grasscutterFileSet') // Private options - document.querySelector('#ip').placeholder = localeObj.ipPlaceholder - document.querySelector('#port').placeholder = localeObj.portPlaceholder + document.querySelector('#ip').placeholder = localeObj.ipPlaceholder || 'IP Address' + document.querySelector('#port').placeholder = localeObj.portPlaceholder || 'Port' // Settings set('fullSettingsTitle', 'settingsTitle')