mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-26 17:29:53 +01:00
added translation to default MOTD
This commit is contained in:
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Můj profil",
|
||||
|
||||
"notifications.loading": "Načítání upozornění",
|
||||
"chats.loading": "Načítání grafů"
|
||||
"chats.loading": "Načítání grafů",
|
||||
|
||||
"motd.welcome": "Vítejte na NodeBB, diskusní platformou budoucnosti.",
|
||||
"motd.get": "Získat NodeBB",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "To se mi líbí",
|
||||
"motd.follow": "Sledovat"
|
||||
}
|
||||
|
||||
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Profil",
|
||||
|
||||
"notifications.loading": "Benachrichtigungen laden",
|
||||
"chats.loading": "Nachrichten werden geladen"
|
||||
"chats.loading": "Nachrichten werden geladen",
|
||||
|
||||
"motd.welcome": "Willkommen auf NodeBB, der Diskussionsplattform der Zukunft.",
|
||||
"motd.get": "Bekommen NodeBB",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "Gefällt mir",
|
||||
"motd.follow": "Folgen"
|
||||
}
|
||||
|
||||
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Profile",
|
||||
|
||||
"notifications.loading": "Loading Notifications",
|
||||
"chats.loading": "Loading Chats"
|
||||
"chats.loading": "Loading Chats",
|
||||
|
||||
"motd.welcome": "Welcome to NodeBB, the discussion platform of the future.",
|
||||
"motd.get": "Get NodeBB",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "Like",
|
||||
"motd.follow": "Follow"
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"404.message": "Al parecer lo que estas buscando no existe. Te recomendamos que vuelvas al <a href='/''>inicio</a>.",
|
||||
"500.title": "Error Interno.",
|
||||
"500.message": "Ooops! Algo salio mal!, No te alarmes. Nuestros simios hiperinteligentes lo solucionarán",
|
||||
|
||||
|
||||
"register": "Registrarse",
|
||||
"login": "Conectarse",
|
||||
|
||||
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Perfil",
|
||||
|
||||
"notifications.loading": "Cargando Notificaciones",
|
||||
"chats.loading": "Cargando Chats"
|
||||
"chats.loading": "Cargando Chats",
|
||||
|
||||
"motd.welcome": "Bienvenido a NodeBB, la plataforma de debate sobre el futuro.",
|
||||
"motd.get": "Obtener",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "Me gusta",
|
||||
"motd.follow": "Seguir"
|
||||
}
|
||||
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Profile",
|
||||
|
||||
"notifications.loading": "Chargement des Notifications",
|
||||
"chats.loading": "Chargement des Chats"
|
||||
"chats.loading": "Chargement des Chats",
|
||||
|
||||
"motd.welcome": "Bienvenue à NodeBB, la plate-forme de discussion sur l'avenir.",
|
||||
"motd.get": "Obtenir NodeBB",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "J'aime",
|
||||
"motd.follow": "Suivre"
|
||||
}
|
||||
|
||||
@@ -27,5 +27,11 @@
|
||||
"header.profile": "Profilo",
|
||||
|
||||
"notifications.loading": "Caricamento delle Notifiche",
|
||||
"chats.loading": "Caricamento delle Chat"
|
||||
"chats.loading": "Caricamento delle Chat",
|
||||
|
||||
"motd.welcome": "Benvenuti al NodeBB, la piattaforma di discussione del futuro.",
|
||||
"motd.get": "Ottenere NodeBB",
|
||||
"motd.fork": "Fork",
|
||||
"motd.like": "Mi piace",
|
||||
"motd.follow": "Segui"
|
||||
}
|
||||
@@ -12,6 +12,7 @@ var path = require('path'),
|
||||
categories = require('../categories'),
|
||||
categoryTools = require('../categoryTools')
|
||||
utils = require('../../public/src/utils'),
|
||||
translator = require('../../public/src/translator'),
|
||||
pkg = require('../../package.json'),
|
||||
meta = require('../meta');
|
||||
|
||||
@@ -51,10 +52,12 @@ var path = require('path'),
|
||||
app.get('/home', function (req, res) {
|
||||
var uid = (req.user) ? req.user.uid : 0;
|
||||
categories.getAllCategories(uid, function (err, data) {
|
||||
// Remove disabled categories
|
||||
data.categories = data.categories.filter(function (category) {
|
||||
return (!category.disabled || parseInt(category.disabled, 10) === 0);
|
||||
});
|
||||
|
||||
// Retrieve category information for /
|
||||
function iterator(category, callback) {
|
||||
categories.getRecentReplies(category.cid, uid, parseInt(category.numRecentReplies, 10), function (err, posts) {
|
||||
category.posts = posts;
|
||||
@@ -64,10 +67,20 @@ var path = require('path'),
|
||||
}
|
||||
|
||||
async.each(data.categories, iterator, function (err) {
|
||||
// Assemble the MOTD
|
||||
var motdString;
|
||||
if (!meta.config.motd) {
|
||||
// Construct default MOTD
|
||||
translator.mget(['global:motd.welcome', 'global:motd.get', 'global:motd.fork', 'global:motd.like', 'global:motd.follow'], function(err, strings) {
|
||||
motdString = '<div class="pull-right btn-group"><a target="_blank" href="https://www.nodebb.org" class="btn btn-default btn-lg"><i class="fa fa-comment"></i><span class="hidden-mobile"> ' + strings[1] + '</span></a><a target="_blank" href="https://github.com/designcreateplay/NodeBB" class="btn btn-default btn-lg hidden-mobile"><i class="fa fa-github"></i><span class="hidden-mobile"> ' + strings[2] + '</span></a><a target="_blank" href="https://facebook.com/NodeBB" class="btn btn-default btn-lg"><i class="fa fa-facebook"></i><span class="hidden-mobile"> ' + strings[4] + '</span></a><a target="_blank" href="https://twitter.com/NodeBB" class="btn btn-default btn-lg"><i class="fa fa-twitter"></i><span class="hidden-mobile"> ' + strings[4] + '</span></a></div>\n\n# NodeBB <span>v' + pkg.version + '</span>\n' + strings[0];
|
||||
});
|
||||
} else {
|
||||
motdString = meta.config.motd;
|
||||
}
|
||||
data.motd_class = (parseInt(meta.config.show_motd, 10) === 1 || meta.config.show_motd === undefined) ? '' : ' none';
|
||||
data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default');
|
||||
|
||||
data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"https://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-comment\"></i><span class='hidden-mobile'> Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg hidden-mobile\"><i class=\"fa fa-github\"></i><span class='hidden-mobile'> Fork</span></a><a target=\"_blank\" href=\"https://facebook.com/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-facebook\"></i><span class='hidden-mobile'> Like</span></a><a target=\"_blank\" href=\"https://twitter.com/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-twitter\"></i><span class='hidden-mobile'> Follow</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");
|
||||
data.motd = require('marked')(motdString);
|
||||
res.json(data);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user