i18n for settings.ejs

This commit is contained in:
Kamesuta 2023-08-31 03:45:21 +09:00
parent b2ad90148e
commit f5317e9444
3 changed files with 181 additions and 87 deletions

View File

@ -68,6 +68,96 @@
"overlayDesc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud..",
"overlayAcknowledge": "Conare Iterum",
"overlayDismiss": "Dismiss"
},
"settings": {
"navHeaderText": "Settings",
"navAccount": "Account",
"navMinecraft": "Minecraft",
"navMods": "Mods",
"navJava": "Java",
"navLauncher": "Launcher",
"navAbout": "About",
"navUpdates": "Updates",
"navDone": "Done",
"tabAccountHeaderText": "Account Settings",
"tabAccountHeaderDesc": "Add new accounts or manage existing ones.",
"microsoftAccount": "Microsoft",
"addMicrosoftAccount": "+ Add Microsoft Account",
"mojangAccount": "Mojang",
"addMojangAccount": "+ Add Mojang Account",
"minecraftTabHeaderText": "Minecraft Settings",
"minecraftTabHeaderDesc": "Options related to game launch.",
"gameResolutionTitle": "Game Resolution",
"gameResolutionCross": "✖",
"launchFullscreenTitle": "Launch in fullscreen.",
"autoConnectTitle": "Automatically connect to the server on launch.",
"launchDetachedTitle": "Launch game process detached from launcher.",
"launchDetachedDesc": "If the game is not detached, closing the launcher will also close the game.",
"tabModsHeaderText": "Mod Settings",
"tabModsHeaderDesc": "Enable or disable mods.",
"switchServerButton": "Switch",
"requiredMods": "Required Mods",
"optionalMods": "Optional Mods",
"dropinMods": "Drop-in Mods",
"addMods": "Add Mods",
"dropinRefreshNote": "(F5 to Refresh)",
"shaderpacks": "Shaderpacks",
"shaderpackDesc": "Enable or disable shaders. Please note, shaders will only run smoothly on powerful setups. You may add custom packs here.",
"shaderpackButton": " + ",
"selectShaderpack": "Select Shaderpack",
"tabJavaHeaderText": "Java Settings",
"tabJavaHeaderDesc": "Manage the Java configuration (advanced).",
"memoryTitle": "Memory",
"maxRAM": "Maximum RAM",
"minRAM": "Minimum RAM",
"memoryDesc": "The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag.",
"memoryTotalTitle": "Total",
"memoryTotalValue": "16G",
"memoryAvailableTitle": "Available",
"memoryAvailableValue": "7.3G",
"javaExecutableTitle": "Java Executable",
"javaExecDetails": "Selected: Java 8 Update 172 (x64)",
"javaExecVal": "null",
"javaExecSelDialogTitle": "Select Java Executable",
"javaExecSelButtonText": "Choose File",
"javaExecDesc": "The Java executable is validated before game launch.",
"javaReqDesc": "Requires Java 8 x64.",
"javaPathDesc": "The path should end with <strong>bin<%= process.platform === 'win32' ? '\\\\javaw.exe' : '/java' %></strong>.",
"jvmOptsTitle": "Additional JVM Options",
"jvmOptsDesc": "Options to be provided to the JVM at runtime. <em>-Xms</em> and <em>-Xmx</em> should not be included.",
"jvmOptsLink": "https://docs.oracle.com/javase/8/docs/technotes/tools/<%= process.platform === 'win32' ? 'windows' : 'unix' %>/java.html",
"jvmOptsLinkText": "Available Options for Java 8.",
"launcherTabHeaderText": "Launcher Settings",
"launcherTabHeaderDesc": "Options related to the launcher itself.",
"allowPrereleaseTitle": "Allow Pre-Release Updates.",
"allowPrereleaseDesc": "Pre-Releases include new features which may have not been fully tested or integrated.<br>This will always be true if you are using a pre-release version.",
"dataDirectoryTitle": "Data Directory",
"selectDataDirectory": "Select Data Directory",
"chooseFolder": "Choose Folder",
"dataDirectoryDesc": "All game files and local Java installations will be stored in the data directory.<br>Screenshots and world saves are stored in the instance folder for the corresponding server configuration.",
"aboutTabHeaderText": "About",
"aboutTabHeaderDesc": "View information and release notes for the current version.",
"aboutTitle": "Helios Launcher",
"aboutCurrentVersionCheck": "Stable Release",
"versionCheck": "&#10003;",
"stableRelease": "Stable Release",
"versionText": "Version ",
"versionValue": "0.0.1-alpha.18",
"sourceGithub": "Source (GitHub)",
"sourceGithubLink": "https://github.com/dscalZi/HeliosLauncher",
"support": "Support",
"supportLink": "https://github.com/dscalZi/HeliosLauncher/issues",
"devToolsConsole": "DevTools Console",
"releaseNotes": "Release Notes",
"changelog": "Changelog",
"noReleaseNotes": "No Release Notes",
"viewReleaseNotes": "View Release Notes on GitHub",
"launcherUpdatesHeaderText": "Launcher Updates",
"launcherUpdatesHeaderDesc": "Download, install, and review updates for the launcher.",
"latestVersion": "You Are Running the Latest Version",
"checkForUpdates": "Check for Updates",
"whatsNew": "What's New",
"updateReleaseNotes": "Update Release Notes"
}
},
"js": {

View File

@ -2,21 +2,21 @@
<div id="settingsContainerLeft">
<div id="settingsNavContainer">
<div id="settingsNavHeader">
<span id="settingsNavHeaderText">Settings</span>
<span id="settingsNavHeaderText"><%- lang('settings.navHeaderText') %></span>
</div>
<div id="settingsNavItemsContainer">
<div id="settingsNavItemsContent">
<button class="settingsNavItem" rSc="settingsTabAccount" id="settingsNavAccount" selected>Account</button>
<button class="settingsNavItem" rSc="settingsTabMinecraft">Minecraft</button>
<button class="settingsNavItem" rSc="settingsTabMods">Mods</button>
<button class="settingsNavItem" rSc="settingsTabJava">Java</button>
<button class="settingsNavItem" rSc="settingsTabLauncher">Launcher</button>
<button class="settingsNavItem" rSc="settingsTabAccount" id="settingsNavAccount" selected><%- lang('settings.navAccount') %></button>
<button class="settingsNavItem" rSc="settingsTabMinecraft"><%- lang('settings.navMinecraft') %></button>
<button class="settingsNavItem" rSc="settingsTabMods"><%- lang('settings.navMods') %></button>
<button class="settingsNavItem" rSc="settingsTabJava"><%- lang('settings.navJava') %></button>
<button class="settingsNavItem" rSc="settingsTabLauncher"><%- lang('settings.navLauncher') %></button>
<div class="settingsNavSpacer"></div>
<button class="settingsNavItem" rSc="settingsTabAbout">About</button>
<button class="settingsNavItem" rSc="settingsTabUpdate" id="settingsNavUpdate">Updates</button>
<button class="settingsNavItem" rSc="settingsTabAbout"><%- lang('settings.navAbout') %></button>
<button class="settingsNavItem" rSc="settingsTabUpdate" id="settingsNavUpdate"><%- lang('settings.navUpdates') %></button>
<div id="settingsNavContentBottom">
<div class="settingsNavDivider"></div>
<button id="settingsNavDone">Done</button>
<button id="settingsNavDone"><%- lang('settings.navDone') %></button>
</div>
</div>
</div>
@ -25,8 +25,8 @@
<div id="settingsContainerRight">
<div id="settingsTabAccount" class="settingsTab">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Account Settings</span>
<span class="settingsTabHeaderDesc">Add new accounts or manage existing ones.</span>
<span class="settingsTabHeaderText"><%- lang('settings.tabAccountHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.tabAccountHeaderDesc') %></span>
</div>
<div class="settingsAuthAccountTypeContainer">
<div class="settingsAuthAccountTypeHeader">
@ -37,10 +37,10 @@
<path fill="#05a6f0" d="M1 12h10v10H1z" />
<path fill="#ffba08" d="M12 12h10v10H12z" />
</svg>
<span>Microsoft</span>
<span><%- lang('settings.microsoftAccount') %></span>
</div>
<div class="settingsAuthAccountTypeHeaderRight">
<button class="settingsAddAuthAccount" id="settingsAddMicrosoftAccount">+ Add Microsoft Account</button>
<button class="settingsAddAuthAccount" id="settingsAddMicrosoftAccount"><%- lang('settings.addMicrosoftAccount') %></button>
</div>
</div>
@ -57,10 +57,10 @@
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
</svg>
<span>Mojang</span>
<span><%- lang('settings.mojangAccount') %></span>
</div>
<div class="settingsAuthAccountTypeHeaderRight">
<button class="settingsAddAuthAccount" id="settingsAddMojangAccount">+ Add Mojang Account</button>
<button class="settingsAddAuthAccount" id="settingsAddMojangAccount"><%- lang('settings.addMojangAccount') %></button>
</div>
</div>
@ -71,20 +71,20 @@
</div>
<div id="settingsTabMinecraft" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Minecraft Settings</span>
<span class="settingsTabHeaderDesc">Options related to game launch.</span>
<span class="settingsTabHeaderText"><%- lang('settings.minecraftTabHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.minecraftTabHeaderDesc') %></span>
</div>
<div id="settingsGameResolutionContainer">
<span class="settingsFieldTitle">Game Resolution</span>
<span class="settingsFieldTitle"><%- lang('settings.gameResolutionTitle') %></span>
<div id="settingsGameResolutionContent">
<input type="number" id="settingsGameWidth" min="0" cValue="GameWidth">
<div id="settingsGameResolutionCross">&#10006;</div>
<div id="settingsGameResolutionCross"><%- lang('settings.gameResolutionCross') %></div>
<input type="number" id="settingsGameHeight" min="0" cValue="GameHeight">
</div>
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Launch in fullscreen.</span>
<span class="settingsFieldTitle"><%- lang('settings.launchFullscreenTitle') %></span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -95,7 +95,7 @@
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Automatically connect to the server on launch.</span>
<span class="settingsFieldTitle"><%- lang('settings.autoConnectTitle') %></span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -106,8 +106,8 @@
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Launch game process detached from launcher.</span>
<span class="settingsFieldDesc">If the game is not detached, closing the launcher will also close the game.</span>
<span class="settingsFieldTitle"><%- lang('settings.launchDetachedTitle') %></span>
<span class="settingsFieldDesc"><%- lang('settings.launchDetachedDesc') %></span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -119,8 +119,8 @@
</div>
<div id="settingsTabMods" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Mod Settings</span>
<span class="settingsTabHeaderDesc">Enable or disable mods.</span>
<span class="settingsTabHeaderText"><%- lang('settings.tabModsHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.tabModsHeaderDesc') %></span>
</div>
<div class="settingsSelServContainer">
<div class="settingsSelServContent">
@ -128,37 +128,37 @@
</div>
<div class="settingsSwitchServerContainer">
<div class="settingsSwitchServerContent">
<button class="settingsSwitchServerButton">Switch</button>
<button class="settingsSwitchServerButton"><%- lang('settings.switchServerButton') %></button>
</div>
</div>
</div>
<div id="settingsModsContainer">
<div id="settingsReqModsContainer">
<div class="settingsModsHeader">Required Mods</div>
<div class="settingsModsHeader"><%- lang('settings.requiredMods') %></div>
<div id="settingsReqModsContent">
</div>
</div>
<div id="settingsOptModsContainer">
<div class="settingsModsHeader">Optional Mods</div>
<div class="settingsModsHeader"><%- lang('settings.optionalMods') %></div>
<div id="settingsOptModsContent">
</div>
</div>
<div id="settingsDropinModsContainer">
<div class="settingsModsHeader">Drop-in Mods</div>
<button id="settingsDropinFileSystemButton">+ Add Mods <span id="settingsDropinRefreshNote">(F5 to Refresh)</span></button>
<div class="settingsModsHeader"><%- lang('settings.dropinMods') %></div>
<button id="settingsDropinFileSystemButton"><%- lang('settings.addMods') %> <span id="settingsDropinRefreshNote"><%- lang('settings.dropinRefreshNote') %></span></button>
<div id="settingsDropinModsContent">
</div>
</div>
<div id="settingsShadersContainer">
<div class="settingsModsHeader">Shaderpacks</div>
<div id="settingsShaderpackDesc">Enable or disable shaders. Please note, shaders will only run smoothly on powerful setups. You may add custom packs here.</div>
<div class="settingsModsHeader"><%- lang('settings.shaderpacks') %></div>
<div id="settingsShaderpackDesc"><%- lang('settings.shaderpackDesc') %></div>
<div id="settingsShaderpackWrapper">
<button id="settingsShaderpackButton"> + </button>
<button id="settingsShaderpackButton"><%- lang('settings.shaderpackButton') %></button>
<div class="settingsSelectContainer">
<div class="settingsSelectSelected" id="settingsShadersSelected">Select Shaderpack</div>
<div class="settingsSelectSelected" id="settingsShadersSelected"><%- lang('settings.selectShaderpack') %></div>
<div class="settingsSelectOptions" id="settingsShadersOptions" hidden>
</div>
@ -169,8 +169,8 @@
</div>
<div id="settingsTabJava" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Java Settings</span>
<span class="settingsTabHeaderDesc">Manage the Java configuration (advanced).</span>
<span class="settingsTabHeaderText"><%- lang('settings.tabJavaHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.tabJavaHeaderDesc') %></span>
</div>
<div class="settingsSelServContainer">
<div class="settingsSelServContent">
@ -178,16 +178,16 @@
</div>
<div class="settingsSwitchServerContainer">
<div class="settingsSwitchServerContent">
<button class="settingsSwitchServerButton">Switch</button>
<button class="settingsSwitchServerButton"><%- lang('settings.switchServerButton') %></button>
</div>
</div>
</div>
<div id="settingsMemoryContainer">
<div id="settingsMemoryTitle">Memory</div>
<div id="settingsMemoryTitle"><%- lang('settings.memoryTitle') %></div>
<div id="settingsMemoryContent">
<div id="settingsMemoryContentLeft">
<div class="settingsMemoryContentItem">
<span class="settingsMemoryHeader">Maximum RAM</span>
<span class="settingsMemoryHeader"><%- lang('settings.maxRAM') %></span>
<div class="settingsMemoryActionContainer">
<div id="settingsMaxRAMRange" class="rangeSlider" cValue="MaxRAM" serverDependent min="3" max="8" value="3" step="0.5">
<div class="rangeSliderBar"></div>
@ -197,7 +197,7 @@
</div>
</div>
<div class="settingsMemoryContentItem">
<span class="settingsMemoryHeader">Minimum RAM</span>
<span class="settingsMemoryHeader"><%- lang('settings.minRAM') %></span>
<div class="settingsMemoryActionContainer">
<div id="settingsMinRAMRange" class="rangeSlider" cValue="MinRAM" serverDependent min="3" max="8" value="3" step="0.5">
<div class="rangeSliderBar"></div>
@ -206,26 +206,26 @@
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
</div>
</div>
<div id="settingsMemoryDesc">The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag.</div>
<div id="settingsMemoryDesc"><%- lang('settings.memoryDesc') %></div>
</div>
<div id="settingsMemoryContentRight">
<div id="settingsMemoryStatus">
<div class="settingsMemoryStatusContainer">
<span class="settingsMemoryStatusTitle">Total</span>
<span id="settingsMemoryTotal" class="settingsMemoryStatusValue">16G</span>
<span class="settingsMemoryStatusTitle"><%- lang('settings.memoryTotalTitle') %></span>
<span id="settingsMemoryTotal" class="settingsMemoryStatusValue"><%- lang('settings.memoryTotalValue') %></span>
</div>
<div class="settingsMemoryStatusContainer">
<span class="settingsMemoryStatusTitle">Available</span>
<span id="settingsMemoryAvail" class="settingsMemoryStatusValue">7.3G</span>
<span class="settingsMemoryStatusTitle"><%- lang('settings.memoryAvailableTitle') %></span>
<span id="settingsMemoryAvail" class="settingsMemoryStatusValue"><%- lang('settings.memoryAvailableValue') %></span>
</div>
</div>
</div>
</div>
</div>
<div class="settingsFileSelContainer">
<div class="settingsFileSelTitle">Java Executable</div>
<div class="settingsFileSelTitle"><%- lang('settings.javaExecutableTitle') %></div>
<div class="settingsFileSelContent">
<div id="settingsJavaExecDetails">Selected: Java 8 Update 172 (x64)</div>
<div id="settingsJavaExecDetails"><%- lang('settings.javaExecDetails') %></div>
<div class="settingsFileSelActions">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG" x="0px" y="0px" viewBox="0 0 305.001 305.001">
@ -241,14 +241,14 @@
</g>
</svg>
</div>
<input class="settingsFileSelVal" id="settingsJavaExecVal" type="text" value="null" cValue="JavaExecutable" serverDependent disabled>
<button class="settingsFileSelButton" id="settingsJavaExecSel" dialogTitle="Select Java Executable" dialogDirectory="false">Choose File</button>
<input class="settingsFileSelVal" id="settingsJavaExecVal" type="text" value="<%- lang('settings.javaExecVal') %>" cValue="JavaExecutable" serverDependent disabled>
<button class="settingsFileSelButton" id="settingsJavaExecSel" dialogTitle="<%- lang('settings.javaExecSelDialogTitle') %>" dialogDirectory="false"><%- lang('settings.javaExecSelButtonText') %></button>
</div>
</div>
<div class="settingsFileSelDesc">The Java executable is validated before game launch. <strong id="settingsJavaReqDesc">Requires Java 8 x64.</strong><br>The path should end with <strong>bin<%= process.platform === 'win32' ? '\\javaw.exe' : '/java' %></strong>.</div>
<div class="settingsFileSelDesc"><%- lang('settings.javaExecDesc') %> <strong id="settingsJavaReqDesc"><%- lang('settings.javaReqDesc') %></strong><br><%- evalEjs(lang('settings.javaPathDesc')) %></div>
</div>
<div id="settingsJVMOptsContainer">
<div id="settingsJVMOptsTitle">Additional JVM Options</div>
<div id="settingsJVMOptsTitle"><%- lang('settings.jvmOptsTitle') %></div>
<div id="settingsJVMOptsContent">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG" x="0px" y="0px" viewBox="0 0 305.001 305.001">
@ -266,18 +266,18 @@
</div>
<input id="settingsJVMOptsVal" cValue="JVMOptions" serverDependent type="text">
</div>
<div id="settingsJVMOptsDesc">Options to be provided to the JVM at runtime. <em>-Xms</em> and <em>-Xmx</em> should not be included.<br><a href="https://docs.oracle.com/javase/8/docs/technotes/tools/<%= process.platform === 'win32' ? 'windows' : 'unix' %>/java.html" id="settingsJvmOptsLink">Available Options for Java 8</a>.</div>
<div id="settingsJVMOptsDesc"><%- lang('settings.jvmOptsDesc') %><br><a href="<%- lang('settings.jvmOptsLink') %>" id="settingsJvmOptsLink"><%- evalEjs(lang('settings.jvmOptsLinkText')) %></a></div>
</div>
</div>
<div id="settingsTabLauncher" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Launcher Settings</span>
<span class="settingsTabHeaderDesc">Options related to the launcher itself.</span>
<span class="settingsTabHeaderText"><%- lang('settings.launcherTabHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.launcherTabHeaderDesc') %></span>
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Allow Pre-Release Updates.</span>
<span class="settingsFieldDesc">Pre-Releases include new features which may have not been fully tested or integrated.<br>This will always be true if you are using a pre-release version.</span>
<span class="settingsFieldTitle"><%- lang('settings.allowPrereleaseTitle') %></span>
<span class="settingsFieldDesc"><%- lang('settings.allowPrereleaseDesc') %></span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -288,7 +288,7 @@
</div>
<div class="settingsFileSelContainer">
<div class="settingsFileSelContent">
<div class="settingsFieldTitle" id="settingsDataDirTitle">Data Directory</div>
<div class="settingsFieldTitle" id="settingsDataDirTitle"><%- lang('settings.dataDirectoryTitle') %></div>
<div class="settingsFileSelActions">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG">
@ -300,90 +300,90 @@
</svg>
</div>
<input class="settingsFileSelVal" type="text" value="null" cValue="DataDirectory" disabled>
<button class="settingsFileSelButton" dialogTitle="Select Data Directory" dialogDirectory="true">Choose Folder</button>
<button class="settingsFileSelButton" dialogTitle="<%- lang('settings.selectDataDirectory') %>" dialogDirectory="true"><%- lang('settings.chooseFolder') %></button>
</div>
</div>
<div class="settingsFileSelDesc">All game files and local Java installations will be stored in the data directory.<br>Screenshots and world saves are stored in the instance folder for the corresponding server configuration.</div>
<div class="settingsFileSelDesc"><%- lang('settings.dataDirectoryDesc') %></div>
</div>
</div>
<div id="settingsTabAbout" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">About</span>
<span class="settingsTabHeaderDesc">View information and release notes for the current version.</span>
<span class="settingsTabHeaderText"><%- lang('settings.aboutTabHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.aboutTabHeaderDesc') %></span>
</div>
<div id="settingsAboutCurrentContainer">
<div id="settingsAboutCurrentContent">
<div id="settingsAboutCurrentHeadline">
<img id="settingsAboutLogo" src="./assets/images/SealCircle.png">
<span id="settingsAboutTitle">Helios Launcher</span>
<span id="settingsAboutTitle"><%- lang('settings.aboutTitle') %></span>
</div>
<div id="settingsAboutCurrentVersion">
<div id="settingsAboutCurrentVersionCheck">&#10003;</div>
<div id="settingsAboutCurrentVersionCheck"><%- lang('settings.versionCheck') %></div>
<div id="settingsAboutCurrentVersionDetails">
<span id="settingsAboutCurrentVersionTitle">Stable Release</span>
<span id="settingsAboutCurrentVersionTitle"><%- lang('settings.stableRelease') %></span>
<div id="settingsAboutCurrentVersionLine">
<span id="settingsAboutCurrentVersionText">Version </span>
<span id="settingsAboutCurrentVersionValue">0.0.1-alpha.12</span>
<span id="settingsAboutCurrentVersionText"><%- lang('settings.versionText') %></span>
<span id="settingsAboutCurrentVersionValue"><%- lang('settings.versionValue') %></span>
</div>
</div>
</div>
</div>
<div id="settingsAboutButtons">
<a href="https://github.com/dscalZi/HeliosLauncher" id="settingsAboutSourceButton" class="settingsAboutButton">Source (GitHub)</a>
<a href="<%- lang('settings.sourceGithubLink') %>" id="settingsAboutSourceButton" class="settingsAboutButton"><%- lang('settings.sourceGithub') %></a>
<!-- The following must be included in third-party usage. -->
<!-- <a href="https://github.com/dscalzi/HeliosLauncher" id="settingsAboutSourceButton" class="settingsAboutButton">Original Source</a> -->
<a href="https://github.com/dscalZi/HeliosLauncher/issues" id="settingsAboutSupportButton" class="settingsAboutButton">Support</a>
<a href="#" id="settingsAboutDevToolsButton" class="settingsAboutButton">DevTools Console</a>
<a href="<%- lang('settings.supportLink') %>" id="settingsAboutSupportButton" class="settingsAboutButton"><%- lang('settings.support') %></a>
<a href="#" id="settingsAboutDevToolsButton" class="settingsAboutButton"><%- lang('settings.devToolsConsole') %></a>
</div>
</div>
<div class="settingsChangelogContainer">
<div class="settingsChangelogContent">
<div class="settingsChangelogHeadline">
<div class="settingsChangelogLabel">Release Notes</div>
<div class="settingsChangelogTitle">Changelog</div>
<div class="settingsChangelogLabel"><%- lang('settings.releaseNotes') %></div>
<div class="settingsChangelogTitle"><%- lang('settings.changelog') %></div>
</div>
<div class="settingsChangelogText">
No Release Notes
<%- lang('settings.noReleaseNotes') %>
</div>
</div>
<div class="settingsChangelogActions">
<a class="settingsChangelogButton settingsAboutButton" href="#">View Release Notes on GitHub</a>
<a class="settingsChangelogButton settingsAboutButton" href="#"><%- lang('settings.viewReleaseNotes') %></a>
</div>
</div>
</div>
<div id="settingsTabUpdate" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Launcher Updates</span>
<span class="settingsTabHeaderDesc">Download, install, and review updates for the launcher.</span>
<span class="settingsTabHeaderText"><%- lang('settings.launcherUpdatesHeaderText') %></span>
<span class="settingsTabHeaderDesc"><%- lang('settings.launcherUpdatesHeaderDesc') %></span>
</div>
<div id="settingsUpdateStatusContainer">
<div id="settingsUpdateStatusContent">
<div id="settingsUpdateStatusHeadline">
<span id="settingsUpdateTitle">You Are Running the Latest Version</span>
<span id="settingsUpdateTitle"><%- lang('settings.latestVersion') %></span>
</div>
<div id="settingsUpdateVersion">
<div id="settingsUpdateVersionCheck">&#10003;</div>
<div id="settingsUpdateVersionCheck"><%- lang('settings.versionCheck') %></div>
<div id="settingsUpdateVersionDetails">
<span id="settingsUpdateVersionTitle">Stable Release</span>
<span id="settingsUpdateVersionTitle"><%- lang('settings.stableRelease') %></span>
<div id="settingsUpdateVersionLine">
<span id="settingsUpdateVersionText">Version </span>
<span id="settingsUpdateVersionValue">0.0.1-alpha.18</span>
<span id="settingsUpdateVersionText"><%- lang('settings.versionText') %> </span>
<span id="settingsUpdateVersionValue"><%- lang('settings.versionValue') %></span>
</div>
</div>
</div>
<div id="settingsUpdateActionContainer">
<button id="settingsUpdateActionButton">Check for Updates</button>
<button id="settingsUpdateActionButton"><%- lang('settings.checkForUpdates') %></button>
</div>
</div>
</div>
<div class="settingsChangelogContainer">
<div class="settingsChangelogContent">
<div class="settingsChangelogHeadline">
<div class="settingsChangelogLabel">What's New</div>
<div class="settingsChangelogTitle">Update Release Notes</div>
<div class="settingsChangelogLabel"><%- lang('settings.whatsNew') %></div>
<div class="settingsChangelogTitle"><%- lang('settings.updateReleaseNotes') %></div>
</div>
<div class="settingsChangelogText">
No Release Notes
<%- lang('settings.noReleaseNotes') %>
</div>
</div>
</div>

View File

@ -4,6 +4,7 @@ remoteMain.initialize()
// Requirements
const { app, BrowserWindow, ipcMain, Menu, shell } = require('electron')
const autoUpdater = require('electron-updater').autoUpdater
const ejs = require('ejs')
const ejse = require('ejs-electron')
const fs = require('fs')
const isDev = require('./app/assets/js/isdev')
@ -240,9 +241,12 @@ function createWindow() {
})
remoteMain.enable(win.webContents)
ejse.data('bkid', Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)))
ejse.data('Lang', LangLoader)
ejse.data('lang', LangLoader.queryEJS)
const data = {
bkid: Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)),
lang: LangLoader.queryEJS,
evalEjs: (str) => ejs.render(str, data)
}
Object.entries(data).forEach(([key, val]) => ejse.data(key, val))
win.loadURL(pathToFileURL(path.join(__dirname, 'app', 'app.ejs')).toString())