aboutsummaryrefslogtreecommitdiff
path: root/src/cli.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-29 00:52:20 +0100
committerGitHub <noreply@github.com>2021-12-29 00:52:20 +0100
commitefdc25e4516bc5341e305acf42935407f465a0fb (patch)
tree5b0eeb6c16d8d419e9dc680136918938cee3aff6 /src/cli.js
parent3d5ccdad4b95e4453ac1857324b2a89497870f09 (diff)
parent4add9f34f5d9cded91db553aa7a72c6898f7d98b (diff)
downloadViper-efdc25e4516bc5341e305acf42935407f465a0fb.tar.gz
Viper-efdc25e4516bc5341e305acf42935407f465a0fb.zip
Merge pull request #7 from 0neGal/localization
Localization support
Diffstat (limited to 'src/cli.js')
-rw-r--r--src/cli.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cli.js b/src/cli.js
index e5fe042..8593117 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -5,6 +5,7 @@ const Emitter = require("events");
const events = new Emitter();
const cli = app.commandLine;
+const lang = require("./lang");
function hasArgs() {
if (cli.hasSwitch("cli") ||
@@ -24,12 +25,12 @@ function exit(code) {
async function init() {
if (cli.hasSwitch("help")) {
console.log(`options:
- --help shows this help message
- --debug opens the dev/debug tools
+ --help ${lang("cli.help.help")}
+ --debug ${lang("cli.help.debug")}
- --cli forces the CLI to enable
- --update updates Northstar from your set game path
- --setpath sets your game path`)
+ --cli ${lang("cli.help.cli")}
+ --update ${lang("cli.help.update")}
+ --setpath ${lang("cli.help.setpath")}`)
// In the future --setpath should be able to understand
// relative paths, instead of just absolute ones.
exit();
@@ -43,7 +44,8 @@ async function init() {
if (cli.getSwitchValue("setpath") != "") {
ipcMain.emit("setpathcli", cli.getSwitchValue("setpath"));
} else {
- console.error("error: No argumment provided for --setpath");
+ console.error(`error: ${lang("cli.setpath.noarg")}`);
+ exit(1);
}
}