Text update

This commit is contained in:
NeuralMiner 2021-10-15 19:12:09 -06:00
parent a419aa527f
commit 8cb26d2b31
4 changed files with 20 additions and 17 deletions

View file

@ -131,7 +131,7 @@ class Database {
console.info("Latest database version: " + this.latestVersion);
if (version === this.latestVersion) {
console.info("Database no need to patch");
console.info("Database patch not needed");
} else if (version > this.latestVersion) {
console.info("Warning: Database version is newer than expected");
} else {
@ -152,8 +152,8 @@ class Database {
await Database.close();
console.error(ex);
console.error("Start Uptime-Kuma failed due to patch db failed");
console.error("Please submit the bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues");
console.error("Start Uptime-Kuma failed due to issue patching the database");
console.error("Please submit a bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues");
this.restore();
process.exit(1);
@ -191,7 +191,7 @@ class Database {
await Database.close();
console.error(ex);
console.error("Start Uptime-Kuma failed due to patch db failed");
console.error("Start Uptime-Kuma failed due to issue patching the database");
console.error("Please submit the bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues");
this.restore();
@ -232,7 +232,7 @@ class Database {
this.patched = true;
await this.importSQLFile("./db/" + sqlFilename);
databasePatchedFiles[sqlFilename] = true;
console.log(sqlFilename + " is patched successfully");
console.log(sqlFilename + " was patched successfully");
} else {
debug(sqlFilename + " is already patched, skip");
@ -287,7 +287,7 @@ class Database {
};
process.addListener("unhandledRejection", listener);
console.log("Closing DB");
console.log("Closing the database");
while (true) {
Database.noReject = true;
@ -297,7 +297,7 @@ class Database {
if (Database.noReject) {
break;
} else {
console.log("Waiting to close the db");
console.log("Waiting to close the database");
}
}
console.log("SQLite closed");
@ -312,7 +312,7 @@ class Database {
*/
static backup(version) {
if (! this.backupPath) {
console.info("Backup the db");
console.info("Backup the database");
this.backupPath = this.dataDir + "kuma.db.bak" + version;
fs.copyFileSync(Database.path, this.backupPath);
@ -335,7 +335,7 @@ class Database {
*/
static restore() {
if (this.backupPath) {
console.error("Patch db failed!!! Restoring the backup");
console.error("Patching the database failed!!! Restoring the backup");
const shmPath = Database.path + "-shm";
const walPath = Database.path + "-wal";
@ -354,7 +354,7 @@ class Database {
fs.unlinkSync(walPath);
}
} catch (e) {
console.log("Restore failed, you may need to restore the backup manually");
console.log("Restore failed; you may need to restore the backup manually");
process.exit(1);
}

View file

@ -1,7 +1,6 @@
console.log("Welcome to Uptime Kuma");
const args = require("args-parser")(process.argv);
const { sleep, debug, getRandomInt, genSecret } = require("../src/util");
const config = require("./config");
debug(args);
@ -9,6 +8,10 @@ if (! process.env.NODE_ENV) {
process.env.NODE_ENV = "production";
}
// Demo Mode?
const demoMode = args["demo"] || false;
exports.demoMode = demoMode;
console.log("Node Env: " + process.env.NODE_ENV);
console.log("Importing Node libraries");
@ -81,7 +84,7 @@ const sslCert = process.env.UPTIME_KUMA_SSL_CERT || process.env.SSL_CERT || args
*/
const testMode = !!args["test"] || false;
if (config.demoMode) {
if (demoMode) {
console.log("==== Demo Mode ====");
}
@ -1328,7 +1331,7 @@ async function initDatabase() {
fs.copyFileSync(Database.templatePath, Database.path);
}
console.log("Connecting to Database");
console.log("Connecting to the Database");
await Database.connect();
console.log("Connected");
@ -1428,7 +1431,7 @@ async function shutdownFunction(signal) {
}
function finalFunction() {
console.log("Graceful shutdown successfully!");
console.log("Graceful shutdown successful!");
}
gracefulShutdown(server, {

View file

@ -467,7 +467,7 @@ export default {
return;
}
// Beautiful the JSON format
// Beautify the JSON format
if (this.monitor.body) {
this.monitor.body = JSON.stringify(JSON.parse(this.monitor.body), null, 4);
}

View file

@ -75,7 +75,7 @@ export default {
this.processing = true;
if (this.password !== this.repeatPassword) {
toast.error("Repeat password do not match.");
toast.error("Passwords do not match.");
this.processing = false;
return;
}