mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
fix the project quotes thing
This commit is contained in:
parent
8dcde52099
commit
fee7fedbf7
@ -3,8 +3,7 @@ var exec = require('child_process').exec,
|
|||||||
_ = require('underscore');
|
_ = require('underscore');
|
||||||
|
|
||||||
var pages = function(dbot) {
|
var pages = function(dbot) {
|
||||||
var quoteCat = dbot.db.quoteArrs[dbot.config.name],
|
var rev, diff, branch, credit, authors = [];
|
||||||
rev, diff, branch, credit, authors = [];
|
|
||||||
exec("git log --format='%cN¬' | sort -u | tr -d '\n'", function (error, stdout, sderr) {
|
exec("git log --format='%cN¬' | sort -u | tr -d '\n'", function (error, stdout, sderr) {
|
||||||
var credit = stdout.split("¬"); // nobody uses ¬, do they?
|
var credit = stdout.split("¬"); // nobody uses ¬, do they?
|
||||||
for (var i = 0; i < credit.length; i++) {
|
for (var i = 0; i < credit.length; i++) {
|
||||||
@ -37,10 +36,8 @@ var pages = function(dbot) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
'/project': function(req, res) {
|
'/project': function(req, res) {
|
||||||
var quote = dbot.config.name;
|
dbot.api.quotes.getQuote(dbot.config.name, function(quote) {
|
||||||
if(quoteCat) {
|
if(!quote) quote = dbot.config.name;
|
||||||
quote = quoteCat[Math.floor(Math.random()*quoteCat.length)];
|
|
||||||
}
|
|
||||||
|
|
||||||
res.render('project', {
|
res.render('project', {
|
||||||
"translation": dbot.modules.project.api.translationProgress(),
|
"translation": dbot.modules.project.api.translationProgress(),
|
||||||
@ -95,7 +92,8 @@ var pages = function(dbot) {
|
|||||||
"languagetranshead": dbot.t("translations"),
|
"languagetranshead": dbot.t("translations"),
|
||||||
"pullreqs": dbot.t("outstanding-pullreq")
|
"pullreqs": dbot.t("outstanding-pullreq")
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user