diff --git a/api/controllers/home.js b/api/controllers/home.js
index 2bd147f..749b819 100644
--- a/api/controllers/home.js
+++ b/api/controllers/home.js
@@ -2,20 +2,23 @@ var response = require("../adapters/response");
var model = require("../adapters/model");
var policy = require("../policies/");
+var lang = require("../../language").getDefault();
+
module.exports = {
index: function(req, res) {
response(res).view("home/index", {
- title: "node-web-cluster",
- message: "Welcome to the index page!"
+ title: lang.home.title,
+ message: lang.home.message
});
},
login: function(req, res) {
response(res).view("home/login", {
- title: "node-web-cluster",
+ title: lang.home.title,
+ message: lang.home.message,
destination: req.param("destination") || "dashboard"
});
},
@@ -23,7 +26,8 @@ module.exports = {
signup: function(req, res) {
response(res).view("home/signup", {
- title: "node-web-cluster",
+ title: lang.home.title,
+ message: lang.home.message,
destination: req.param("destination") || "dashboard"
});
},
@@ -46,6 +50,7 @@ module.exports = {
response(res).view("home/dashboard", {
title: "node-web-cluster",
+ message: lang.home.message,
user: u
});
diff --git a/language/en-US.js b/language/en-US.js
index e4ae612..2f44f37 100644
--- a/language/en-US.js
+++ b/language/en-US.js
@@ -52,6 +52,12 @@ module.exports = {
query_error: "Problem querying database"
},
+ home: {
+
+ title: "Node Web Cluster",
+ message: "Welcome to the index page!"
+ },
+
user: {
email_registered: "Email already registered",
diff --git a/language/pt-BR.js b/language/pt-BR.js
index 003d2af..346f128 100644
--- a/language/pt-BR.js
+++ b/language/pt-BR.js
@@ -53,6 +53,14 @@ module.exports = {
query_error: "Erro ao conectar ao banco de dados"
},
+ // controllers
+
+ home: {
+
+ title: "Node Web Cluster",
+ message: "Bem vindo a pagina inicial do projeto!"
+ },
+
user: {
email_registered: "Email já registrado no sistema",
diff --git a/views/home/index.ejs b/views/home/index.ejs
index 6deb4e6..f731b80 100644
--- a/views/home/index.ejs
+++ b/views/home/index.ejs
@@ -1,6 +1,6 @@
-Welcome!
+<%= message %>
Sign-up | Login | Destroy
\ No newline at end of file