diff --git a/modules/project/pages.js b/modules/project/pages.js
index c35ac54..eb6149c 100644
--- a/modules/project/pages.js
+++ b/modules/project/pages.js
@@ -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 = "
"
- for (var i = 0, i < modlist.length; i++) {
- formatted += "- " + modlist[i] + "
;
- }
- formatted += "
"
- 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)
});
},
};
diff --git a/modules/project/strings.json b/modules/project/strings.json
index 6c8119f..592ba0c 100644
--- a/modules/project/strings.json
+++ b/modules/project/strings.json
@@ -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"
}
}
diff --git a/views/project/project.jade b/views/project/project.jade
index 70a81ee..ecfe3f7 100644
--- a/views/project/project.jade
+++ b/views/project/project.jade
@@ -10,6 +10,7 @@ block content
h3 Configuration
ul
li #{currlang}
+ li #{debugmode}
h4 #{loadmod}
ul
each module in modules