mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
separate lang file for customization
This commit is contained in:
parent
66efac7035
commit
d2aba8cf5c
@ -1,7 +1,7 @@
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-In6B8teKZQll5heMl9bS7CESTbGvuAt3VVV86BUQBDk='"/>
|
||||
<title>Helios Launcher</title>
|
||||
<title><%= lang('app.title') %></title>
|
||||
<script src="./assets/js/scripts/uicore.js"></script>
|
||||
<script src="./assets/js/scripts/uibinder.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
||||
|
@ -33,9 +33,14 @@ exports.queryEJS = function(id, placeHolders){
|
||||
}
|
||||
|
||||
exports.setupLanguage = function(){
|
||||
// Load a Placeholder Language File for texts that do not require translation
|
||||
exports.loadLanguage('_placeholder')
|
||||
|
||||
// Load Language Files
|
||||
exports.loadLanguage('en_US')
|
||||
|
||||
// Uncomment this when translations are ready
|
||||
//exports.loadLanguage('xx_XX')
|
||||
|
||||
// Load Custom Language File for Launcher Customizer
|
||||
exports.loadLanguage('_custom')
|
||||
}
|
20
app/assets/lang/_custom.toml
Normal file
20
app/assets/lang/_custom.toml
Normal file
@ -0,0 +1,20 @@
|
||||
# Custom Language File for Launcher Customizer
|
||||
|
||||
[ejs.app]
|
||||
title = "Helios Launcher"
|
||||
|
||||
[ejs.landing]
|
||||
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
||||
mediaTwitterURL = "#"
|
||||
mediaInstagramURL = "#"
|
||||
mediaYouTubeURL = "#"
|
||||
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
||||
|
||||
[ejs.settings]
|
||||
sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher"
|
||||
supportLink = "https://github.com/dscalZi/HeliosLauncher/issues"
|
||||
|
||||
[ejs.welcome]
|
||||
welcomeHeader = "WELCOME TO WESTEROSCRAFT"
|
||||
welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming."
|
||||
welcomeDescCTA = "You are just a few clicks away from Westeros."
|
13
app/assets/lang/_placeholder.toml
Normal file
13
app/assets/lang/_placeholder.toml
Normal file
@ -0,0 +1,13 @@
|
||||
# Placeholder Language File for texts that do not require translation
|
||||
|
||||
[ejs.landing]
|
||||
newsArticleTitle = "Lorem Ipsum"
|
||||
newsArticleDate = "Mar 15, 44 BC, 9:14 AM"
|
||||
newsArticleAuthor = "by Cicero"
|
||||
newsArticleComments = "0 Comments"
|
||||
|
||||
[ejs.overlay]
|
||||
overlayTitle = "Lorem Ipsum:<br>Finis Illud"
|
||||
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"
|
@ -3,11 +3,6 @@ updateAvailableTooltip = "Update Available"
|
||||
usernamePlaceholder = "Username"
|
||||
usernameEditButton = "Edit"
|
||||
settingsTooltip = "Settings"
|
||||
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
||||
mediaTwitterURL = "#"
|
||||
mediaInstagramURL = "#"
|
||||
mediaYouTubeURL = "#"
|
||||
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
||||
serverStatus = "SERVER"
|
||||
serverStatusPlaceholder = "OFFLINE"
|
||||
mojangStatus = "MOJANG STATUS"
|
||||
@ -19,10 +14,6 @@ launchButton = "PLAY"
|
||||
launchButtonPlaceholder = "• No Server Selected"
|
||||
launchProgressLabel = "0%"
|
||||
launchDetails = "Please wait.."
|
||||
newsArticleTitle = "Lorem Ipsum"
|
||||
newsArticleDate = "Mar 15, 44 BC, 9:14 AM"
|
||||
newsArticleAuthor = "by Cicero"
|
||||
newsArticleComments = "0 Comments"
|
||||
newsNavigationStatus = "1 of 1"
|
||||
newsErrorLoadSpan = "Checking for News.."
|
||||
newsErrorFailedSpan = "Failed to Load News"
|
||||
@ -44,7 +35,7 @@ loginButtonText = "LOGIN"
|
||||
loginNeedAccountLink = "https://minecraft.net/store/minecraft-java-edition/"
|
||||
loginNeedAccountText = "Need an Account?"
|
||||
loginPasswordDisclaimer1 = "Your password is sent directly to mojang and never stored."
|
||||
loginPasswordDisclaimer2 = "Helios Launcher is not affiliated with Mojang AB."
|
||||
loginPasswordDisclaimer2 = "<%= lang('app.title') %> is not affiliated with Mojang AB."
|
||||
|
||||
[ejs.loginOptions]
|
||||
loginOptionsTitle = "Login Options"
|
||||
@ -59,10 +50,6 @@ serverSelectCancel = "Cancel"
|
||||
accountSelectHeader = "Select an Account"
|
||||
accountSelectConfirm = "Select"
|
||||
accountSelectCancel = "Cancel"
|
||||
overlayTitle = "Lorem Ipsum:<br>Finis Illud"
|
||||
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"
|
||||
|
||||
[ejs.settings]
|
||||
navHeaderText = "Settings"
|
||||
@ -132,16 +119,14 @@ 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"
|
||||
aboutTitle = "<%= lang('app.title') %>"
|
||||
aboutCurrentVersionCheck = "Stable Release"
|
||||
versionCheck = "✓"
|
||||
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"
|
||||
@ -158,9 +143,6 @@ updateReleaseNotes = "Update Release Notes"
|
||||
waitingText = "Waiting for Microsoft.."
|
||||
|
||||
[ejs.welcome]
|
||||
welcomeHeader = "WELCOME TO WESTEROSCRAFT"
|
||||
welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming."
|
||||
welcomeDescCTA = "You are just a few clicks away from Westeros."
|
||||
continueButton = "CONTINUE"
|
||||
|
||||
|
||||
@ -203,7 +185,7 @@ players = "PLAYERS"
|
||||
[js.landing.systemScan]
|
||||
checking = "Checking system info.."
|
||||
noCompatibleJava = "No Compatible<br>Java Installation Found"
|
||||
installJavaMessage = "In order to join WesterosCraft, you need a 64-bit installation of Java {major}. Would you like us to install a copy?"
|
||||
installJavaMessage = "In order to launch Minecraft, you need a 64-bit installation of Java {major}. Would you like us to install a copy?"
|
||||
installJava = "Install Java"
|
||||
installJavaManually = "Install Manually"
|
||||
javaDownloadPrepare = "Preparing Java Download.."
|
||||
|
@ -13,7 +13,7 @@
|
||||
<% } else{ %>
|
||||
<div id="frameContentWin">
|
||||
<div id="frameTitleDock">
|
||||
<span id="frameTitleText">Helios Launcher</span>
|
||||
<span id="frameTitleText"><%= lang('app.title') %></span>
|
||||
</div>
|
||||
<div id="frameButtonDockWin">
|
||||
<button class="frameButton fMb" id="frameButton_minimize" tabIndex="-1">
|
||||
|
@ -266,7 +266,7 @@
|
||||
</div>
|
||||
<input id="settingsJVMOptsVal" cValue="JVMOptions" serverDependent type="text">
|
||||
</div>
|
||||
<div id="settingsJVMOptsDesc"><%- lang('settings.jvmOptsDesc') %><br><a href="<%- lang('settings.jvmOptsLink') %>" id="settingsJvmOptsLink"><%- evalEjs(lang('settings.jvmOptsLinkText')) %></a></div>
|
||||
<div id="settingsJVMOptsDesc"><%- lang('settings.jvmOptsDesc') %><br><a href="<%- lang('settings.jvmOptsLink') %>" id="settingsJvmOptsLink"><%- lang('settings.jvmOptsLinkText') %></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsTabLauncher" class="settingsTab" style="display: none;">
|
||||
|
2
index.js
2
index.js
@ -243,7 +243,7 @@ function createWindow() {
|
||||
|
||||
const data = {
|
||||
bkid: Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)),
|
||||
lang: LangLoader.queryEJS,
|
||||
lang: (str) => ejs.render(LangLoader.queryEJS(str), data),
|
||||
evalEjs: (str) => ejs.render(str, data)
|
||||
}
|
||||
Object.entries(data).forEach(([key, val]) => ejse.data(key, val))
|
||||
|
Loading…
Reference in New Issue
Block a user