forked from GitHub/dbot
convert to dbot.t; add Italian; add debugMode
This commit is contained in:
parent
2a4698c982
commit
d3f8e295be
@ -1,39 +1,29 @@
|
||||
var exec = require('child_process').exec;
|
||||
|
||||
var pages = function(dbot) {
|
||||
var lang = dbot.config.language;
|
||||
/*
|
||||
var modules = function() {
|
||||
var modlist = dbot.config.moduleNames;
|
||||
var formatted = "<ul>"
|
||||
for (var i = 0, i < modlist.length; i++) {
|
||||
formatted += "<li>" + modlist[i] + "</li>;
|
||||
}
|
||||
formatted += "</ul>"
|
||||
return formatted;
|
||||
} */
|
||||
var rev;
|
||||
exec("git rev-list --all | wc -l", function(a,b,c){rev = b});
|
||||
return {
|
||||
'/project': function(req, res) {
|
||||
res.render('project', {
|
||||
"name": dbot.config.name,
|
||||
"curr839": lang,
|
||||
"curr839": dbot.config.language,
|
||||
"currver": dbot.config.version,
|
||||
"currlang": dbot.strings["dbotspeaks"][lang].format({ // dbot.t won't work s;
|
||||
"lang839": lang,
|
||||
"langen": dbot.strings[lang]["en"],
|
||||
"lang": dbot.strings[lang][lang],
|
||||
"currlang": dbot.t("dbotspeaks",{
|
||||
"lang839": dbot.config.language,
|
||||
"langen": dbot.strings[dbot.config.language]["en"],
|
||||
"lang": dbot.t(dbot.config.language),
|
||||
"name": dbot.config.name
|
||||
}),
|
||||
"projectstatus": dbot.strings["projectstatus"][lang],
|
||||
"revnum": dbot.strings["revnum"][lang].format({
|
||||
"projectstatus": dbot.t("projectstatus"),
|
||||
"revnum": dbot.t("revnum",{
|
||||
"name": dbot.config.name,
|
||||
"rev": rev,
|
||||
"ver": "abcdef" // TODO, obviously
|
||||
}),
|
||||
"modules": dbot.config.moduleNames,
|
||||
"loadmod": dbot.strings["loadedmodules"][lang]
|
||||
"loadmod": dbot.t("loadedmodules"),
|
||||
"debugmode": dbot.t("debugmode-" + dbot.config.debugMode)
|
||||
});
|
||||
},
|
||||
};
|
||||
|
@ -2,35 +2,66 @@
|
||||
"dbotspeaks": {
|
||||
"en": "{name} speaks {lang} ({langen})",
|
||||
"de": "{name} spricht {lang} ({langen})",
|
||||
"fr": "{name} parle {lang} ({langen})"
|
||||
"fr": "{name} parle {lang} ({langen})",
|
||||
"it": "{name} parla {lang} ({langen})"
|
||||
},
|
||||
"en": {
|
||||
"en": "English",
|
||||
"fr": "anglais",
|
||||
"de": "Englisch"
|
||||
"de": "Englisch",
|
||||
"it": "inglese"
|
||||
},
|
||||
"fr": {
|
||||
"en": "French",
|
||||
"fr": "français",
|
||||
"de": "Französisch"
|
||||
"de": "Französisch",
|
||||
"it": "francese"
|
||||
},
|
||||
"de": {
|
||||
"en": "German",
|
||||
"fr": "allemande",
|
||||
"de": "Deutsch"
|
||||
"de": "Deutsch",
|
||||
"it": "tedesco"
|
||||
},
|
||||
"it": {
|
||||
"en": "Italian",
|
||||
"fr": "italien",
|
||||
"de": "Italienier",
|
||||
"it": "italiano"
|
||||
},
|
||||
"projectstatus": {
|
||||
"en": "Project Status",
|
||||
"fr": "Situation du Projet",
|
||||
"de": "Projektstatus"
|
||||
"en": "project status",
|
||||
"fr": "situation du projet",
|
||||
"de": "Projektstatus",
|
||||
"it": "stato del progetto"
|
||||
},
|
||||
"revnum": {
|
||||
"en": "{name} is at revision {rev} ({ver})",
|
||||
"fr": "{name} est à révision {rev} ({ver})",
|
||||
"de": "{name} ist in der Revision {rev} ({ver})"
|
||||
"de": "{name} ist in der Revision {rev} ({ver})",
|
||||
"it": "{name} è il numero di revisione {rev} ({ver})"
|
||||
},
|
||||
"loadedmodules": {
|
||||
"en": "Loaded modules",
|
||||
"fr": "Modules chargés"
|
||||
"en": "loaded modules",
|
||||
"fr": "modules chargés",
|
||||
"it": "moduli caricati"
|
||||
},
|
||||
"configuration": {
|
||||
"en": "Configuration",
|
||||
"fr": "Configuration",
|
||||
"de": "Konfiguration",
|
||||
"it": "configuazione"
|
||||
},
|
||||
"debugmode-true": {
|
||||
"en": "Debug mode active",
|
||||
"fr": "debug actif",
|
||||
"de": "Debug aktiv",
|
||||
"it": "debug attivo"
|
||||
},
|
||||
"debugmode-false": {
|
||||
"en": "Debug off",
|
||||
"fr": "debug éteint",
|
||||
"de": "Debug ausgeschaltet",
|
||||
"it": "debug spento"
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ block content
|
||||
h3 Configuration
|
||||
ul
|
||||
li #{currlang}
|
||||
li #{debugmode}
|
||||
h4 #{loadmod}
|
||||
ul
|
||||
each module in modules
|
||||
|
Loading…
Reference in New Issue
Block a user