From 03ce7318ee25fa48f64fe1b972f81fdf40ce4be7 Mon Sep 17 00:00:00 2001
From: Delta <31860825+AA-Delta@users.noreply.github.com>
Date: Mon, 26 Jun 2023 10:33:35 -0500
Subject: [Spanish Translation] Improve clarity and fix spelling errors in
element descriptions
The text of some elements did not correctly convey their purpose, so they were changed to be better understood. Some spelling mistakes were corrected.
---
src/lang/es.json | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/lang/es.json b/src/lang/es.json
index d0bc189..84a1573 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -2,7 +2,7 @@
"lang.title": "Spanish - Español",
"cli.help.help": "muestra este mensaje de ayuda",
- "cli.help.devtools": "habre las herramientas de desarrollador/depuración ",
+ "cli.help.devtools": "abre las herramientas de desarrollador/depuración ",
"cli.help.version": "muestra la información de la versión",
"cli.help.cli": "obliga la linea de comandos a habilitarse",
"cli.help.update": "actualiza Northstar desde la ruta de juego establecida",
@@ -15,7 +15,7 @@
"cli.setpath.noarg": "No se ha proporcionado ningún argumento para --setpath",
- "cli.gamepath.lost": "El directorio del juego no fue encontrado, ¡asegúrate de que esté montado!",
+ "cli.gamepath.lost": "El directorio del juego no fue encontrado, ¡asegúrate de que esté disponible!",
"cli.update.current": "Versión actual:",
"cli.update.downloading": "Descargando...",
@@ -39,7 +39,7 @@
"cli.mods.installed": "¡Modificiación instalada exitosamente!",
"cli.mods.cantfind": "¡No se encuentra una modificación con ese nombre!",
"cli.mods.notamod": "La carpeta o el archivo seleccionado no es una modificación",
- "cli.mods.toggledall": "¡Estado de todas las modiciaciones ha sido cambiado exitosamente!",
+ "cli.mods.toggledall": "¡El estado de todas las modiciaciones ha sido cambiado exitosamente!",
"cli.mods.improperjson": "%s's mod.json tiene errores de formato",
"gui.welcome": "Bienvenido a Viper!",
@@ -54,8 +54,8 @@
"gui.mods.count": "Modificaciones instaladas:",
"gui.mods.disabledtag": "Deshabilitado",
"gui.mods.install": "Instalar modificación",
- "gui.mods.find": "Encontrar modificaciones",
- "gui.mods.toggleall": "Alternar todo",
+ "gui.mods.find": "Buscar modificaciones",
+ "gui.mods.toggleall": "Activar / Desactivar todo",
"gui.mods.removeall": "Remover todo",
"gui.mods.nothingselected": "No has seleccionado una modificación.",
"gui.mods.toggleall.confirm": "Alternar todo podría deshabilitar las modificaciones requeridas para que Northstar funcione. ¿Está seguro?",
@@ -71,7 +71,7 @@
"gui.mods.unknown_author": "Desconocido",
"gui.browser.info": "Información",
- "gui.browser.madeby": "por",
+ "gui.browser.madeby": "hecho por",
"gui.browser.search": "Buscar...",
"gui.browser.update": "Actualizar",
"gui.browser.install": "Instalar",
@@ -140,7 +140,7 @@
"gui.server.player": "jugador",
"gui.server.players": "jugadores",
"gui.server.servers": "servidores",
- "gui.server.offline": "El servidor Master está desconectado",
+ "gui.server.offline": "El servidor principal está desconectado",
"gui.toast.noInternet.title": "Sin Internet",
"gui.toast.noInternet.desc": "Viper puede funcionar de forma incorrecta.",
@@ -155,13 +155,13 @@
"viper.info.issues": "Reporta problemas de Viper:",
"ns.menu.main": "Northstar Launcher",
- "ns.menu.mods": "Modificiaciones",
+ "ns.menu.mods": "Modificaciones",
"ns.menu.release": "Notas de actualización",
- "general.autoupdates.gamerunning": "El juego se está ejecutando, no se puede actualizar Northstar",
+ "general.autoupdates.gamerunning": "El juego está en ejecución, no se puede actualizar Northstar",
"general.mods.enabled": "Modificaciones habilitadas:",
"general.mods.disabled": "Modificaciones deshabilitadas:",
- "general.mods.installed": "Modificiaciones intaladas:",
+ "general.mods.installed": "Modificiaciones instaladas:",
"general.missingpath": "¡La ruta del jueno no se ha podido encontrar automaticamente! ¡Por favor, elige la ruta manualmente!",
"general.notinstalled": "¡Northstar no se ha instalado!",
"general.launching": "Ejecutando",
--
cgit v1.2.3
From 137092b34c92d9b7cd572ca4d97072a9007f3f8b Mon Sep 17 00:00:00 2001
From: Delta <31860825+AA-Delta@users.noreply.github.com>
Date: Mon, 26 Jun 2023 14:38:53 -0500
Subject: Actualizar es.json
---
src/lang/es.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lang/es.json b/src/lang/es.json
index 84a1573..85011a1 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -39,7 +39,7 @@
"cli.mods.installed": "¡Modificiación instalada exitosamente!",
"cli.mods.cantfind": "¡No se encuentra una modificación con ese nombre!",
"cli.mods.notamod": "La carpeta o el archivo seleccionado no es una modificación",
- "cli.mods.toggledall": "¡El estado de todas las modiciaciones ha sido cambiado exitosamente!",
+ "cli.mods.toggledall": "¡El estado de todas las modifiaciones ha sido cambiado exitosamente!",
"cli.mods.improperjson": "%s's mod.json tiene errores de formato",
"gui.welcome": "Bienvenido a Viper!",
--
cgit v1.2.3
From a7debd9c3d5858b05b875e6bf2870e89fe51f115 Mon Sep 17 00:00:00 2001
From: 0neGal
Date: Sat, 22 Jul 2023 02:15:30 +0200
Subject: minor edits to the window decoration tooltips
---
src/lang/en.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lang/en.json b/src/lang/en.json
index bd95a53..e510557 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -171,9 +171,9 @@
"request.viper.noReleaseNotes": "Couldn't fetch Viper release notes.\nTry again later!",
"request.northstar.noReleaseNotes": "Couldn't fetch Northstar release notes.\nTry again later!",
- "tooltip.close": "Closes Viper",
- "tooltip.minimize": "Minimizes the window",
- "tooltip.settings": "Opens the settings popup",
+ "tooltip.close": "Close Viper",
+ "tooltip.minimize": "Minimize Viper",
+ "tooltip.settings": "Settings",
"tooltip.pages.viper": "Viper",
"tooltip.pages.northstar": "Northstar",
"tooltip.pages.titanfall": "Titanfall 2"
--
cgit v1.2.3
From 1b6c60d4a84f29938c53804f97891b1ac524370d Mon Sep 17 00:00:00 2001
From: 0neGal
Date: Sat, 22 Jul 2023 02:27:45 +0200
Subject: minor changes to the styling
---
src/app/css/launcher.css | 5 +++++
src/app/css/webview.css | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/src/app/css/launcher.css b/src/app/css/launcher.css
index 9726981..58b0c18 100644
--- a/src/app/css/launcher.css
+++ b/src/app/css/launcher.css
@@ -46,6 +46,11 @@
transform: scale(0.9);
}
+.gamesContainer button.inactive:hover {
+ transform: scale(0.95);
+ filter: brightness(120%);
+}
+
.gamesContainer button::before {
content: "";
display: block;
diff --git a/src/app/css/webview.css b/src/app/css/webview.css
index 982ebfc..b6a536d 100644
--- a/src/app/css/webview.css
+++ b/src/app/css/webview.css
@@ -4,7 +4,11 @@ body {
background-color: transparent !important;
}
+.footer,
#ncmp_tool,
+.bottom-ads,
+.ncmp__banner,
+#get-app-alert,
.navbar, .bottom-padding,
.card-header, .breadcrumb,
.list-group, .mb-4, .my-2, .mt-2,
--
cgit v1.2.3
From f3f55ebcfbe93698358199e1699b41d3b273e060 Mon Sep 17 00:00:00 2001
From: 0neGal
Date: Sat, 22 Jul 2023 02:36:33 +0200
Subject: added empty localization strings
---
src/lang/de.json | 11 ++++++++++-
src/lang/es.json | 11 ++++++++++-
src/lang/fr.json | 11 ++++++++++-
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/lang/de.json b/src/lang/de.json
index 1662bef..030e3be 100644
--- a/src/lang/de.json
+++ b/src/lang/de.json
@@ -167,5 +167,14 @@
"general.invalidconfig": "Deine Konfigurationsdatei ist nicht richtig formatiert, falls diese manuell verändert wurde bitte stelle sicher das alles korrekt ist.\n\nFalls du diese nicht manuell verändert hast, ist es empfohlen diese zurückzusetzen!\n\nUm sie zurückzusetzen drücke einfach auf \"Ok\".\n\nWeitere Informationen:\n",
"request.viper.noReleaseNotes": "Viper Release Notes konnten nicht geladen werden.\nVersuche es erneut später!",
- "request.northstar.noReleaseNotes": "Northstar Release Notes konnten nicht geladen werden.\nVersuche es erneut später!"
+ "request.northstar.noReleaseNotes": "Northstar Release Notes konnten nicht geladen werden.\nVersuche es erneut später!",
+
+ "general.running": "",
+
+ "tooltip.close": "",
+ "tooltip.minimize": "",
+ "tooltip.settings": "",
+ "tooltip.pages.viper": "",
+ "tooltip.pages.northstar": "",
+ "tooltip.pages.titanfall": ""
}
diff --git a/src/lang/es.json b/src/lang/es.json
index 85011a1..2c4060f 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -168,5 +168,14 @@
"general.invalidconfig": "Su archivo de configuración está formateado de forma incorrecta, si ha sido editado manualmente, por favor valide que ha sido escrito correctamente. \n\nSi no ha editado manualmente el archivo de configuración, es recomendado que simplemente restaure la configuración. \n\nPara restaurar tu configuración simplemente de click en \"OK\" a continuación. \n\nMas detalles:\n",
"request.viper.noReleaseNotes": "No se pudo encontrar las notas de lanzamiento de Viper.\n¡Intenta mas tarde!",
- "request.northstar.noReleaseNotes": "No se pudo encontrar las notas de lanzamiento de Northstar.\n¡Intenta mas tarde!"
+ "request.northstar.noReleaseNotes": "No se pudo encontrar las notas de lanzamiento de Northstar.\n¡Intenta mas tarde!",
+
+ "general.running": "",
+
+ "tooltip.close": "",
+ "tooltip.minimize": "",
+ "tooltip.settings": "",
+ "tooltip.pages.viper": "",
+ "tooltip.pages.northstar": "",
+ "tooltip.pages.titanfall": ""
}
diff --git a/src/lang/fr.json b/src/lang/fr.json
index 3ae7272..49c2c2b 100644
--- a/src/lang/fr.json
+++ b/src/lang/fr.json
@@ -168,5 +168,14 @@
"general.invalidconfig": "Votre fichier de configuration n'est pas formaté correctement ; si vous l'avez manuellement édité, veuillez vérifier son contenu.\n\nSinon, il est recommandé de remettre la configuration à zéro.\n\nPour cela, cliquez sur le bouton \"Ok\" en-dessous de ce message.\n\nPlus d'informations :\n",
"request.viper.noReleaseNotes": "Impossible de récupérer les notes de mises à jour de Viper.\nVeuillez réessayer plus tard.",
- "request.northstar.noReleaseNotes": "Impossible de récupérer les notes de mises à jour de Northstar.\nVeuillez réessayer plus tard."
+ "request.northstar.noReleaseNotes": "Impossible de récupérer les notes de mises à jour de Northstar.\nVeuillez réessayer plus tard.",
+
+ "general.running": "",
+
+ "tooltip.close": "",
+ "tooltip.minimize": "",
+ "tooltip.settings": "",
+ "tooltip.pages.viper": "",
+ "tooltip.pages.northstar": "",
+ "tooltip.pages.titanfall": ""
}
--
cgit v1.2.3
From e984cf81b7fd84c44fb39206c639c35a44c6054c Mon Sep 17 00:00:00 2001
From: 0neGal
Date: Sat, 22 Jul 2023 02:58:51 +0200
Subject: minor edits to the README.md
---
README.md | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 1c84c09..ca953c7 100644
--- a/README.md
+++ b/README.md
@@ -37,23 +37,19 @@ Currently Viper is capable of:
* Auto-Update itself
* Be pretty!
-Besides this I've been considering adding some easy to use VPK modding tools so everybody can have fun with VPK modding even if you don't know how to do it the traditional way. However that is not at the top of the todo list right now.
+There are of course many other things that it can do, but summed up very simply, that is what Viper is capable of doing. With every update Viper gets more features and alike, often many optional features are also available in the settings menu.
+
## Configuration
-All settings take place in the settings page, found in the top right corner of the app, where you can disable auto-updates, and other related settings. You can also manually go in and edit your config file (`viper.json`), if you feel so inclined.
+All settings take place in the settings page, found in the top right corner of the app, where you can change all kinds of settings. You can also manually go in and edit your config file (`viper.json`), if you feel so inclined.
Your configuration file will be found in `%APPDATA%\viper.json` on Windows, and inside either `~/.config` or through your environment variables (`$XDG_CONFIG_HOME`) on Linux, the latter has priority.
-## Contact/Support
-
-To get support either open a GitHub issue.
-Or if you must you can contact a developer through the methods below:
+## Support
-Ways to contact the main developer: [0neGal](https://github.com/0neGal)
- * Twitter: [@0neGal](https://twitter.com/0neGal)
- * Reddit: [/u/0neGal](https://reddit.com/u/0neGal)
+To get support please [open a GitHub issue](https://github.com/0neGal/viper/issues/new/choose), and clearly describe the problem with as many details as possible.
### Frequently Asked Questions (FAQ)
@@ -61,7 +57,7 @@ Many of the questions and problems you may have might be able to be answered by
## Sidenote
-Given that we already have so many Northstar updaters and launchers I urge people to instead of creating new launchers unless there's a very specific reason, just make a pull request on one of the existing, otherwise we'll continue to have new ones.
+Given that we already have so many Northstar updaters and launchers I urge people to instead of creating new launchers unless there's a very specific reason, just make a pull request on one of the existing ones, otherwise we'll continue to have new ones.
Relevant xkcd:
@@ -79,7 +75,7 @@ Some of the existing launchers are listed below:
## Development
-If you wanna edit Viper's code and run it and so on, you can simply do something along the lines of the below:
+If you wanna edit Viper's code, run it, and so on, you can simply do something along the lines of the below:
```sh
$ git clone https://github.com/0neGal/viper
@@ -99,7 +95,7 @@ Additionally, if you're creating your own fork you easily publish builds and or
$ GH_TOKEN="" npm run publish
```
-Keep in mind building all Linux builds may take a while on some systems as packaging the `tar.gz` release can take a while on many CPU's, at least from my testing. All other builds should be done quickly. When using the `publish` command it also automatically uploads the needed files to deploy auto-updates, keep in mind you'd need to have the `repository` setting changed to your new fork's location, otherwise it'll fetch from the original.
+Keep in mind building all Linux builds may take a while on some systems, as packaging the `tar.gz` release can take a while on many CPUs, at least from my testing. All other builds should be done quickly. When using the `publish` command it also automatically uploads the needed files to deploy auto-updates, keep in mind you'd need to have the `repository` setting changed to your new fork's location, otherwise it'll fetch from the original.
## Credits
--
cgit v1.2.3
From b0b440472eaa624fd628d920016dfcf058e91e15 Mon Sep 17 00:00:00 2001
From: Delta <31860825+AA-Delta@users.noreply.github.com>
Date: Fri, 21 Jul 2023 20:23:45 -0500
Subject: Add missing Spanish localizations
#193
---
src/lang/es.json | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/lang/es.json b/src/lang/es.json
index 2c4060f..9139629 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -170,12 +170,12 @@
"request.viper.noReleaseNotes": "No se pudo encontrar las notas de lanzamiento de Viper.\n¡Intenta mas tarde!",
"request.northstar.noReleaseNotes": "No se pudo encontrar las notas de lanzamiento de Northstar.\n¡Intenta mas tarde!",
- "general.running": "",
-
- "tooltip.close": "",
- "tooltip.minimize": "",
- "tooltip.settings": "",
- "tooltip.pages.viper": "",
- "tooltip.pages.northstar": "",
- "tooltip.pages.titanfall": ""
+ "general.running": "Ejecutandose",
+
+ "tooltip.close": "Cerrar Viper",
+ "tooltip.minimize": "Minimizar Viper",
+ "tooltip.settings": "Configuraciones",
+ "tooltip.pages.viper": "Viper",
+ "tooltip.pages.northstar": "Northstar",
+ "tooltip.pages.titanfall": "Titanfall 2"
}
--
cgit v1.2.3
From 11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 Mon Sep 17 00:00:00 2001
From: 0neGal
Date: Sat, 22 Jul 2023 16:09:41 +0200
Subject: colored console logging
Far prettier, and far more useful at a glance.
---
src/cli.js | 1 +
src/index.js | 1 +
src/modules/console.js | 27 +++++++++++++++++++++++++++
src/modules/findgame.js | 8 +++++---
src/modules/launch.js | 6 ++++--
src/modules/mods.js | 24 +++++++++++++-----------
src/modules/settings.js | 4 +++-
src/modules/update.js | 28 +++++++++++++++-------------
8 files changed, 69 insertions(+), 30 deletions(-)
create mode 100644 src/modules/console.js
diff --git a/src/cli.js b/src/cli.js
index e332085..34dd8dc 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -7,6 +7,7 @@ const events = new Emitter();
const cli = app.commandLine;
const lang = require("./lang");
const json = require("./modules/json");
+console = require("./modules/console");
function hasArgs() {
// Makes sure the GUI isn't launched.
diff --git a/src/index.js b/src/index.js
index 3d2f65b..259f7cc 100644
--- a/src/index.js
+++ b/src/index.js
@@ -21,6 +21,7 @@ const settings = require("./modules/settings");
const requests = require("./modules/requests");
const is_running = require("./modules/is_running");
+console = require("./modules/console");
var log = console.log;
// Starts the actual BrowserWindow, which is only run when using the
diff --git a/src/modules/console.js b/src/modules/console.js
new file mode 100644
index 0000000..7112071
--- /dev/null
+++ b/src/modules/console.js
@@ -0,0 +1,27 @@
+let new_console = {
+ ...console
+}
+
+let orig_console = console;
+
+new_console.ok = (...args) => {
+ orig_console.log('\x1b[92m%s\x1b[0m', ...args)
+}
+
+new_console.misc = (...args) => {
+ orig_console.warn('\x1b[90m%s\x1b[0m', ...args)
+}
+
+new_console.info = (...args) => {
+ orig_console.warn('\x1b[94m%s\x1b[0m', ...args)
+}
+
+new_console.warn = (...args) => {
+ orig_console.warn('\x1b[93m%s\x1b[0m', ...args)
+}
+
+new_console.error = (...args) => {
+ orig_console.error('\x1b[91m%s\x1b[0m', ...args)
+}
+
+module.exports = new_console;
diff --git a/src/modules/findgame.js b/src/modules/findgame.js
index 1c330df..505595f 100644
--- a/src/modules/findgame.js
+++ b/src/modules/findgame.js
@@ -6,6 +6,8 @@ const { app } = require("electron");
const util = require("util");
const exec = util.promisify(require("child_process").exec);
+console = require("./console");
+
module.exports = async () => {
let gamepath = "";
@@ -40,10 +42,10 @@ module.exports = async () => {
let data_array = Object.values(values[i]);
if (fs.existsSync(data_array[0] + "/steamapps/common/Titanfall2/Titanfall2.exe")) {
- console.log("Found game in:", data_array[0]);
+ console.ok("Found game in:", data_array[0]);
return data_array[0] + "/steamapps/common/Titanfall2";
} else {
- console.log("Game not in:", data_array[0]);
+ console.error("Game not in:", data_array[0]);
}
}
}
@@ -70,7 +72,7 @@ module.exports = async () => {
// searches VDF files
for (let i = 0; i < vdf_files.length; i++) {
if (! fs.existsSync(vdf_files[i])) {continue}
- console.log("Searching VDF file at:", vdf_files[i]);
+ console.info("Searching VDF file at:", vdf_files[i]);
let data = fs.readFileSync(vdf_files[i]);
let read_vdf = readvdf(data.toString());
diff --git a/src/modules/launch.js b/src/modules/launch.js
index 82de109..af9939b 100644
--- a/src/modules/launch.js
+++ b/src/modules/launch.js
@@ -6,6 +6,8 @@ const lang = require("../lang");
const win = require("./window");
const settings = require("./settings");
+console = require("./console");
+
// launches the game
//
// either Northstar or Vanilla. Linux support is not currently a thing,
@@ -25,11 +27,11 @@ function launch(game_version) {
// launch the requested game version
switch(game_version) {
case "vanilla":
- console.log(lang("general.launching"), "Vanilla...");
+ console.info(lang("general.launching"), "Vanilla...");
exec("Titanfall2.exe", {cwd: settings.gamepath});
break;
default:
- console.log(lang("general.launching"), "Northstar...");
+ console.info(lang("general.launching"), "Northstar...");
exec("NorthstarLauncher.exe", {cwd: settings.gamepath});
break;
}
diff --git a/src/modules/mods.js b/src/modules/mods.js
index 095e501..fc2a682 100644
--- a/src/modules/mods.js
+++ b/src/modules/mods.js
@@ -10,6 +10,8 @@ const win = require("./window");
const version = require("./version");
const settings = require("./settings");
+console = require("./console");
+
const cli = require("../cli");
const lang = require("../lang");
@@ -33,7 +35,7 @@ mods.list = () => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -124,7 +126,7 @@ mods.get = (mod) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -258,20 +260,20 @@ mods.install = (mod, opts) => {
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
let notamod = () => {
win.log(lang("gui.mods.notamod"));
- console.log("error: " + lang("cli.mods.notamod"));
+ console.error("error: " + lang("cli.mods.notamod"));
cli.exit(1);
return false;
}
let installed = () => {
- console.log(lang("cli.mods.installed"));
+ console.ok(lang("cli.mods.installed"));
cli.exit();
win.log(lang("gui.mods.installedmod"));
@@ -505,7 +507,7 @@ mods.remove = (mod) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -521,7 +523,7 @@ mods.remove = (mod) => {
let mod_name = mods.get(mod).FolderName;
if (! mod_name) {
- console.log("error: " + lang("cli.mods.cantfind"));
+ console.error("error: " + lang("cli.mods.cantfind"));
cli.exit(1);
return;
}
@@ -544,7 +546,7 @@ mods.remove = (mod) => {
// actually remove the mod itself
fs.rmSync(path_to_mod, {recursive: true});
- console.log(lang("cli.mods.removed"));
+ console.ok(lang("cli.mods.removed"));
cli.exit();
ipcMain.emit("gui-getmods"); // send updated list to renderer
@@ -569,7 +571,7 @@ mods.toggle = (mod, fork) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -581,7 +583,7 @@ mods.toggle = (mod, fork) => {
mods.toggle(modlist[i].Name, true); // enable mod
}
- console.log(lang("cli.mods.toggledall"));
+ console.ok(lang("cli.mods.toggledall"));
cli.exit(0);
return
}
@@ -590,7 +592,7 @@ mods.toggle = (mod, fork) => {
mods.modfile.toggle(mod);
if (! fork) {
- console.log(lang("cli.mods.toggled"));
+ console.ok(lang("cli.mods.toggled"));
cli.exit();
}
diff --git a/src/modules/settings.js b/src/modules/settings.js
index 76326cc..3b60d7f 100644
--- a/src/modules/settings.js
+++ b/src/modules/settings.js
@@ -5,6 +5,8 @@ const app = require("electron").app;
const json = require("./json");
const lang = require("../lang");
+console = require("./console");
+
var invalid_settings = false;
// base settings
@@ -47,7 +49,7 @@ if (fs.existsSync("viper.json")) {
settings.nsargs = fs.readFileSync(args, "utf8");
}
} else {
- console.log(lang("general.missingpath"));
+ console.error(lang("general.missingpath"));
}
// as to not have to do the same one liner a million times, this
diff --git a/src/modules/update.js b/src/modules/update.js
index e57faf6..02d38c6 100644
--- a/src/modules/update.js
+++ b/src/modules/update.js
@@ -12,6 +12,8 @@ const requests = require("./requests");
const gamepath = require("./gamepath");
const is_running = require("./is_running");
+console = require("./console");
+
const unzip = require("unzipper");
const { https } = require("follow-redirects");
@@ -57,23 +59,23 @@ update.northstar_autoupdate = () => {
async function _checkForUpdates() {
is_auto_updating = true;
- console.log(lang("cli.autoupdates.checking"));
+ console.info(lang("cli.autoupdates.checking"));
// checks if NS is outdated
if (await northstar_update_available()) {
- console.log(lang("cli.autoupdates.available"));
+ console.ok(lang("cli.autoupdates.available"));
if (await is_running.game()) {
- console.log(lang("general.autoupdates.gamerunning"));
+ console.error(lang("general.autoupdates.gamerunning"));
new Notification({
title: lang("gui.nsupdate.gaming.title"),
body: lang("gui.nsupdate.gaming.body")
}).show();
} else {
- console.log(lang("cli.autoupdates.updatingns"));
+ console.status(lang("cli.autoupdates.updatingns"));
update.northstar();
}
} else {
- console.log(lang("cli.autoupdates.noupdate"));
+ console.info(lang("cli.autoupdates.noupdate"));
}
setTimeout(
@@ -150,14 +152,14 @@ update.viper = (autoinstall) => {
// unzip module does not support excluding files directly.
update.northstar = async () => {
if (await is_running.game()) {
- console.log(lang("general.autoupdates.gamerunning"));
+ console.error(lang("general.autoupdates.gamerunning"));
return false;
}
if (! gamepath.exists()) {return}
ipcMain.emit("ns-update-event", "cli.update.checking");
- console.log(lang("cli.update.checking"));
+ console.info(lang("cli.update.checking"));
let ns_version = version.northstar();
const latest_version = await requests.getLatestNsVersion();
@@ -170,14 +172,14 @@ update.northstar = async () => {
// Makes sure it is not already the latest version
if (! await northstar_update_available()) {
ipcMain.emit("ns-update-event", "cli.update.uptodate.short");
- console.log(lang("cli.update.uptodate"), ns_version);
+ console.ok(lang("cli.update.uptodate"), ns_version);
win.log(lang("gui.update.uptodate"));
cli.exit();
return;
} else {
if (ns_version != "unknown") {
- console.log(lang("cli.update.current"), ns_version);
+ console.info(lang("cli.update.current"), ns_version);
};
}
@@ -188,11 +190,11 @@ update.northstar = async () => {
// cancel out if zip can't be retrieved and or found
if (res.statusCode !== 200) {
ipcMain.emit("ns-update-event", "cli.update.uptodate.short");
- console.log(lang("cli.update.uptodate"), ns_version);
+ console.ok(lang("cli.update.uptodate"), ns_version);
return false;
}
- console.log(lang("cli.update.downloading") + ":", latest_version);
+ console.info(lang("cli.update.downloading") + ":", latest_version);
ipcMain.emit("ns-update-event", "cli.update.downloading");
let tmp = path.dirname(settings.zip);
@@ -225,7 +227,7 @@ update.northstar = async () => {
win.log(lang("gui.update.extracting"));
ipcMain.emit("ns-update-event", "gui.update.extracting");
- console.log(lang("cli.update.downloaddone"));
+ console.ok(lang("cli.update.downloaddone"));
// extracts the zip, this is the part where we're actually
// installing Northstar.
extract.pipe(unzip.Extract({path: settings.gamepath}))
@@ -249,7 +251,7 @@ update.northstar = async () => {
ipcMain.emit("get-version");
ipcMain.emit("ns-update-event", "cli.update.uptodate.short");
win.log(lang("gui.update.finished"));
- console.log(lang("cli.update.finished"));
+ console.ok(lang("cli.update.finished"));
cli.exit();
})
})
--
cgit v1.2.3
From 875e0050874b4ae21c7795d36dc3fd1d5b26a49e Mon Sep 17 00:00:00 2001
From: Remy Raes
Date: Sat, 22 Jul 2023 23:35:42 +0200
Subject: french trads
---
src/lang/fr.json | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/lang/fr.json b/src/lang/fr.json
index 49c2c2b..e04e2a2 100644
--- a/src/lang/fr.json
+++ b/src/lang/fr.json
@@ -170,12 +170,12 @@
"request.viper.noReleaseNotes": "Impossible de récupérer les notes de mises à jour de Viper.\nVeuillez réessayer plus tard.",
"request.northstar.noReleaseNotes": "Impossible de récupérer les notes de mises à jour de Northstar.\nVeuillez réessayer plus tard.",
- "general.running": "",
-
- "tooltip.close": "",
- "tooltip.minimize": "",
- "tooltip.settings": "",
- "tooltip.pages.viper": "",
- "tooltip.pages.northstar": "",
- "tooltip.pages.titanfall": ""
+ "general.running": "En cours d'exécution",
+
+ "tooltip.close": "Fermer Viper",
+ "tooltip.minimize": "Réduire Viper",
+ "tooltip.settings": "Paramètres",
+ "tooltip.pages.viper": "Viper",
+ "tooltip.pages.northstar": "Northstar",
+ "tooltip.pages.titanfall": "Titanfall 2"
}
--
cgit v1.2.3
From 2532f9f3f4976cd98a2b1aba72c10042e1fa0a51 Mon Sep 17 00:00:00 2001
From: Presti
Date: Mon, 24 Jul 2023 01:06:42 +0200
Subject: German translation.
---
src/lang/de.json | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/lang/de.json b/src/lang/de.json
index 030e3be..744fbc0 100644
--- a/src/lang/de.json
+++ b/src/lang/de.json
@@ -169,12 +169,12 @@
"request.viper.noReleaseNotes": "Viper Release Notes konnten nicht geladen werden.\nVersuche es erneut später!",
"request.northstar.noReleaseNotes": "Northstar Release Notes konnten nicht geladen werden.\nVersuche es erneut später!",
- "general.running": "",
-
- "tooltip.close": "",
- "tooltip.minimize": "",
- "tooltip.settings": "",
- "tooltip.pages.viper": "",
- "tooltip.pages.northstar": "",
- "tooltip.pages.titanfall": ""
+ "general.running": "Läuft bereits.",
+
+ "tooltip.close": "Schließen",
+ "tooltip.minimize": "Minimieren",
+ "tooltip.settings": "Einstellungen",
+ "tooltip.pages.viper": "Viper",
+ "tooltip.pages.northstar": "Northstar",
+ "tooltip.pages.titanfall": "Titanfall 2"
}
--
cgit v1.2.3