diff --git a/locales/en-US/runtime.json b/locales/en-US/runtime.json index 2e0c26702..bbb4053d5 100644 --- a/locales/en-US/runtime.json +++ b/locales/en-US/runtime.json @@ -28,7 +28,15 @@ "uninstall-failed": "Uninstall failed", "uninstall-failed-long": "Uninstall of module __name__ failed:", "uninstalled": "Uninstalled module: __name__" - } + }, + "unable-to-listen": "Unable to listen on __listenpath__", + "port-in-use": "Error: port in use", + "uncaught-exception": "Uncaught Exception:", + "admin-ui-disabled": "Admin UI disabled", + "now-running": "Server now running at __listenpath__", + "failed-to-start": "Failed to start server:", + "headless-mode": "Running in headless mode", + "httpadminauth-deprecated": "use of httpAdminAuth is deprecated. Use adminAuth instead" }, "api": { @@ -111,13 +119,5 @@ "flows-file": "Flows file : __path__", "create": "Creating new flow file" } - }, - - "httpadminauth-deprecated": "use of httpAdminAuth is deprecated. Use adminAuth instead", - "unable-to-listen": "Unable to listen on __listenpath__", - "port-in-use": "Error: port in use", - "uncaught-exception": "Uncaught Exception:", - "admin-ui-disabled": "Admin UI disabled", - "server-now-running": "Server now running at __listenpath__", - "failed-to-start-server": "Failed to start server:" + } } diff --git a/red.js b/red.js index 5ac90e528..d4bd2d44d 100755 --- a/red.js +++ b/red.js @@ -167,7 +167,7 @@ try { } if (settings.httpAdminRoot !== false && settings.httpAdminAuth) { - RED.log.warn(log._("httpadminauth-deprecated")); + RED.log.warn(log._("server.httpadminauth-deprecated")); app.use(settings.httpAdminRoot, express.basicAuth(function(user, pass) { return user === settings.httpAdminAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpAdminAuth.pass; @@ -217,10 +217,10 @@ RED.start().then(function() { if (settings.httpAdminRoot !== false || settings.httpNodeRoot !== false || settings.httpStatic) { server.on('error', function(err) { if (err.errno === "EADDRINUSE") { - RED.log.error(log._("unable-to-listen", {listenpath:getListenPath()})); - RED.log.error(log._("port-in-use")); + RED.log.error(log._("server.unable-to-listen", {listenpath:getListenPath()})); + RED.log.error(log._("server.port-in-use")); } else { - RED.log.error(log._("uncaught-exception")); + RED.log.error(log._("server.uncaught-exception")); if (err.stack) { RED.log.error(err.stack); } else { @@ -231,16 +231,16 @@ RED.start().then(function() { }); server.listen(settings.uiPort,settings.uiHost,function() { if (settings.httpAdminRoot === false) { - RED.log.info(log._("admin-ui-disabled")); + RED.log.info(log._("server.admin-ui-disabled")); } process.title = 'node-red'; - RED.log.info(log._("server-now-running", {listenpath:getListenPath()})); + RED.log.info(log._("server.now-running", {listenpath:getListenPath()})); }); } else { - util.log('[red] Running in headless mode'); + RED.log.info(log._("server.headless-mode")); } }).otherwise(function(err) { - RED.log.error(log._("failed-to-start-server")); + RED.log.error(log._("server.failed-to-start")); if (err.stack) { RED.log.error(err.stack); } else {