forked from GitHub/dbot
Add more configuration splurge
+ Added dependency on underscore + Added displaying of some configuration options for dent, link, quotes, report and web + Translated (badly) the word "Milestones" * Translated and moved the github advert to below the milestones
This commit is contained in:
parent
a61a2300ab
commit
bddb7ccce4
@ -1,5 +1,6 @@
|
||||
var exec = require('child_process').exec,
|
||||
request = require('request');
|
||||
request = require('request'),
|
||||
_ = require('underscore');
|
||||
|
||||
var pages = function(dbot) {
|
||||
var quoteCat = dbot.db.quoteArrs[dbot.config.name],
|
||||
@ -14,6 +15,38 @@ var pages = function(dbot) {
|
||||
exec("git log -1", function(error, stdout, stderr) {
|
||||
diff = stdout
|
||||
});
|
||||
var configList = [];
|
||||
if(_.has(dbot.modules,'dent')){
|
||||
configList.push(dbot.t("dent-account", {
|
||||
"username": dbot.config.dent.username
|
||||
}));
|
||||
if(dbot.config.dent.dentQuotes) {
|
||||
configList.push(dbot.t("dent-push"));
|
||||
}
|
||||
}
|
||||
if(_.has(dbot.modules,'link')){
|
||||
if(dbot.config.link.autoTitle){
|
||||
configList.push(dbot.t("link-autotitle"));
|
||||
}
|
||||
}
|
||||
if(_.has(dbot.modules,'quotes')){
|
||||
configList.push(dbot.t("quote-rmlimit", {
|
||||
"limit": dbot.config.quotes.rmLimit
|
||||
}));
|
||||
}
|
||||
if(_.has(dbot.modules,'report')){
|
||||
if(dbot.config.report.notifyVoice){
|
||||
configList.push(dbot.t("report-notifyvoice"));
|
||||
}
|
||||
}
|
||||
if(_.has(dbot.modules,'web')){
|
||||
configList.push(dbot.t("web-port", {
|
||||
"port": dbot.config.web.webPort
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* TODO: merge back into github module */
|
||||
var milestones;
|
||||
@ -30,6 +63,7 @@ var pages = function(dbot) {
|
||||
}
|
||||
|
||||
res.render('project', {
|
||||
"configList": configList,
|
||||
"name": dbot.config.name,
|
||||
"intro": dbot.t("dbotintro", {
|
||||
"botname": dbot.config.name
|
||||
|
@ -115,7 +115,10 @@
|
||||
"it": "Nome"
|
||||
},
|
||||
"milestones": {
|
||||
"en": "Milestones"
|
||||
"en": "Milestones",
|
||||
"it": "tappe",
|
||||
"fr": "étapes",
|
||||
"de": "Etappenziele"
|
||||
},
|
||||
"development": {
|
||||
"en": "Development",
|
||||
@ -131,6 +134,26 @@
|
||||
},
|
||||
"propaganda": {
|
||||
"en": "Contribute via Github!",
|
||||
"fr": "Contribuer via Github!"
|
||||
"fr": "Contribuer via Github!",
|
||||
"it": "Contribuire con Github!",
|
||||
"de": "Beisteuern Github"
|
||||
},
|
||||
"dent-account": {
|
||||
"en": "{name} dents as @{username}"
|
||||
},
|
||||
"dent-push": {
|
||||
"en": "Quotes are automatically dented"
|
||||
},
|
||||
"link-autotitle": {
|
||||
"en": "Links are automatically titled"
|
||||
},
|
||||
"quote-rmlimit": {
|
||||
"en": "Quote removal throttle set to {limit}"
|
||||
},
|
||||
"report-notifyvoice": {
|
||||
"en": "Reports are sent to voiced users"
|
||||
},
|
||||
"web-port": {
|
||||
"en": "Running web interface on {port}"
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,6 @@ html(lang='#{curr839}')
|
||||
h4 #{git}
|
||||
p.center
|
||||
#{revnum}
|
||||
p.center
|
||||
a(href="https://github.com/"+repo) #{propaganda}
|
||||
|
||||
ul
|
||||
li #{branch}
|
||||
pre#gitdiff
|
||||
@ -47,11 +44,15 @@ html(lang='#{curr839}')
|
||||
print #{Math.round(width)+"%"}
|
||||
td #{milestone.open_issues}
|
||||
td #{milestone.closed_issues}
|
||||
p.center
|
||||
a(href="https://github.com/"+repo) #{propaganda}
|
||||
section#config
|
||||
h3 #{config}
|
||||
ul
|
||||
li #{currlang}
|
||||
li #{debugmode}
|
||||
each message in configList
|
||||
li #{message}
|
||||
h4 #{loadmod}
|
||||
ul#modules
|
||||
each module in modules
|
||||
|
Loading…
Reference in New Issue
Block a user