diff --git a/.gitignore b/.gitignore index a49c313..2b664c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ # Ignore the user config files -./config.json - -# Ignore the user database +config.json db.json + +# ignore npm +node_modules/ + +# ignore assets +public/bootstrap/ +public/d3/ diff --git a/.gitmodules b/.gitmodules index 365ed83..d47e162 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "jsbot"] path = jsbot url = git://github.com/reality/jsbot.git -[submodule "modules/stats"] - path = modules/stats - url = git://github.com/SamStudio8/stats.git [submodule "modules/github"] path = modules/github url = git://github.com/zuzak/dbot-github.git +[submodule "modules/stats"] + path = modules/stats + url = git@github.com:SamStudio8/dbot-stats.git diff --git a/config.json.sample b/config.json.sample index be6de54..e982e5e 100644 --- a/config.json.sample +++ b/config.json.sample @@ -13,8 +13,8 @@ }, "admins": [ "batman" ], "moderators": [ "whatever" ], - "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users", "link" ], + "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "timers", "stats", "users", "link" ], "language": "en", - "debugMode": true, + "debugMode": false, "version": "Depressionbot IRC bot 0.4-dev - Lovingly crafted by The DepressionBot Foundation (a charity arm of the Official Aberystwyth Open Source International Development League)." } diff --git a/modules/admin/strings.json b/modules/admin/strings.json index cd8c8ec..44bc5e6 100644 --- a/modules/admin/strings.json +++ b/modules/admin/strings.json @@ -3,82 +3,97 @@ "en": "Joined {channel}", "es" : "Entrado en {channel}", "na'vi": "fpxäkìm {channel}(nemfa)", - "cy": "Wedi ymuno {channel}" + "cy": "Wedi ymuno {channel}", + "nl": "{channel} binnengekomen" }, "part": { "en": "Left {channel}", "es" : "Abandonada {channel}", "na'vi": "Hum {channel}", - "cy": "Wedi gadael {channel}" + "cy": "Wedi gadael {channel}", + "nl": "{channel} verlaten" }, "gpull": { "en": "Git pulled that shit.", "es": "Hecho git pull en esta mierda.", "na'vi": "Gìtìl fì'uti stamarsìm.", - "cy": "Wedi tynnu git yr cach na i gyd" + "cy": "Wedi tynnu git yr cach na i gyd", + "nl": "Git heeft die zooi binnengehaald." }, "reload": { "en": "Reloaded that shit.", "es": "Recargado esta mierda.", "na'vi": "Oel fìuti stìyeftxaw.", - "cy": "Ail-lwytho'r cach na" + "cy": "Ail-lwytho'r cach na", + "nl": "Die zooi opnieuw geladen." }, "load_module": { "en": "Loaded new module: {moduleName}", "es": "Cargado módulo nuevo: {moduleName}", "na'vi": "Oel {moduleName}it amip stìyeftxaw.", - "cy": "Wedi llwytho modiwl newydd: {moduleName}" + "cy": "Wedi llwytho modiwl newydd: {moduleName}", + "nl": "Nieuwe module geladen: {moduleName}" }, "unload_module": { "en": "Turned off module: {moduleName}", "es": "Descargado módulo: {moduleName}", "na'vi": "Oel {moduleName} tswìya'.", - "cy": "Wedi troi ffwrdd y modiwl: {moduleName}" + "cy": "Wedi troi ffwrdd y modiwl: {moduleName}", + "nl": "Module uitgeschakeld: {moduleName}" }, "unload_error": { "en": "{moduleName} isn't loaded. Idiot.", "es": "{moduleName} no está cargado. Idiota.", "na'vi": "Oel {moduleName}it omum. Nga skxawng lu.", - "cy": "Di {moduleName} ddim wedi llwytho. Twpsyn" + "cy": "Di {moduleName} ddim wedi llwytho. Twpsyn", + "nl": "{moduleName} is niet geladen. Idioot." }, "banned": { "en": "{user} banned from {command}", "es": "{user} está prohibido de usar {command}", "na'vi": "{command}ìri {user} ke tung.", - "cy": "{user} wedi ei gohurio o {command}" + "cy": "{user} wedi ei gohurio o {command}", + "nl": "{user} mag {command} niet meer gebruiken" }, "unbanned": { "en": "{user} unbanned from {command}", "es": "{user} no está prohibido de user {command}", "na'vi": "{command}ìri {user} tung set.", - "cy": "{user} wedi ei dad-wahardd o {command}" + "cy": "{user} wedi ei dad-wahardd o {command}", + "nl": "{user} mag {command} weer gebruiken" }, "unban_error": { "en": "{user} wasn't banned from that command, fool.", "es": "{user} no fue prohibido de esta instrucción, tont@.", "na'vi": "{user} fìtsu'oti tamung srekrr, nga skxawng lu.", - "cy": "Nid oedd {user} wedi ei wahardd o'r gyrchymun yna, fŵl" + "cy": "Nid oedd {user} wedi ei wahardd o'r gyrchymun yna, fŵl", + "nl": "{user} mag dat commando sowieso al gebruiken, mafketel." }, "qlock": { "en": "Locked quote category: {category}", "es": "Cerrado la categoría: {category}", "na'vi": "{category}ìri oel 'upxareti fmoli", - "cy": "Categori wedi cloi: {category}" + "cy": "Categori wedi cloi: {category}", + "nl": "Quote categorie vergrendeld: {category}" }, "already_in_channel": { "en": "I'm already in {channel}", - "na'vi": "Oel {channel}it tok li" + "na'vi": "Oel {channel}it tok li", + "nl": "Ik ben al in {channel}" }, "not_in_channel": { "en": "I'm not in {channel}", - "na'vi": "Oel {channel}it ke tok" + "na'vi": "Oel {channel}it ke tok", + "nl": "Ik ben niet aanwezig in {channel}" }, "already_loaded_web": { "en": "WHY CAN'T I LOAD ALL THIS WEB? (web already loaded)", - "na'vi": "PELUN OEL KE TSUN OMUM FÌWETIT NÌWOTX (wetìri oe omum li)" + "na'vi": "PELUN OEL KE TSUN OMUM FÌWETIT NÌWOTX (wetìri oe omum li)", + "nl": "AL DIT WEB WORDT ME TOCH EEN BEETJE TE VEEL! (web is al geladen)" }, "already_loaded": { "en": "{moduleName} is already loaded.", - "na'vi": "Oel omum teri {moduleName}it li." + "na'vi": "Oel omum teri {moduleName}it li.", + "nl": "{moduleName} is al geladen." } } diff --git a/modules/command/strings.json b/modules/command/strings.json index 341aae2..c20652e 100644 --- a/modules/command/strings.json +++ b/modules/command/strings.json @@ -3,31 +3,38 @@ "en": "{user} is banned from using this command. Commence incineration.", "es": "{user} está prohibido de usar esta instrucción. Comenzar incineración.", "na'vi": "Tsu'ori {user} ke tung. Nga skxawng lu.", - "cy": "Mae {user} wedi ei gohurio gan ddefnyddio'r gorchymun yma. Cychwyn orfflosgiad" + "cy": "Mae {user} wedi ei gohurio gan ddefnyddio'r gorchymun yma. Cychwyn orfflosgiad", + "nl": "{user} mag dit commando niet meer gebruiken. Bereid het verbrandingsritueel voor." }, "syntax_error": { "en": "Invalid syntax. Initiate incineration.", "es": "Sintaxis no válida. Iniciar incineración.", "na'vi": "Ngeyä pamrel keyawr lu. Nga skxawng lu.", - "cy": "Cystrawen annilys. Cychwyn orfflosgiad" + "cy": "Cystrawen annilys. Cychwyn orfflosgiad", + "nl": "Ongeldige syntax. Bereid het verbrandingsritueel voor." }, "usage": { "en": "Usage for {command}: {usage}.", - "na'vi": "Nga tsun sivar ìlä {command}: {usage}." + "na'vi": "Nga tsun sivar ìlä {command}: {usage}.", + "nl": "{command} wordt op de volgende manier gebruikt: {usage}." }, "no_usage_info": { "en": "No usage information found for {command}.", - "na'vi": "Oel ke tsun sivar {comamnd}it" + "na'vi": "Oel ke tsun sivar {comamnd}it", + "nl": "Geen gebruiksinformatie gevonden voor {command}." }, "help_link": { "en": "Help for {module}: {link}", - "na'vi": "{module}ä srungìl {link} it tok" + "na'vi": "{module}ä srungìl {link} it tok", + "nl": "Hulp voor {module}: {link}" }, "no_help": { "en": "No help found for {module}.", - "na'vi": "Fì{module}ìri oel ke tsun run srungit" + "na'vi": "Fì{module}ìri oel ke tsun run srungit", + "nl": "Geen hulp gevonden voor {module}." }, "loaded_modules_with_help": { - "en": "Loaded modules with help information: {modules}." + "en": "Loaded modules with help information: {modules}.", + "nl": "Geladen modules die hulpinformatie bevatten: {modules}." } } diff --git a/modules/dns/strings.json b/modules/dns/strings.json index f8c69bc..2a94e72 100644 --- a/modules/dns/strings.json +++ b/modules/dns/strings.json @@ -1,14 +1,17 @@ { "lookup-error": { - "en": "{domain} is \u000303AVAILABLE! \u000314({code})" + "en": "{domain} is \u000303AVAILABLE! \u000314({code})", + "nl": "{domain} is \u000303BESCHIKBAAR! \u000314({code})" }, "lookup": { - "en": "{domain} is \u000305TAKEN! \u000314({address})" + "en": "{domain} is \u000305TAKEN! \u000314({address})", + "nl": "{domain} is \u000305BEZET! \u000314({address})" }, "rdns": { "en": "{ip} \u2192 {domain}" }, "rdns-error": { - "en": "Unable to lookup {ip}. \u000314({error})" + "en": "Unable to lookup {ip}. \u000314({error})", + "nl": "{ip} kan niet worden opgezocht. \u000314({error})" } } diff --git a/modules/github b/modules/github index e9e9089..7e38c6b 160000 --- a/modules/github +++ b/modules/github @@ -1 +1 @@ -Subproject commit e9e9089f282b0455a481460ebec17a4672617ceb +Subproject commit 7e38c6be750a071724763872175f1a9445297b76 diff --git a/modules/ignore/strings.json b/modules/ignore/strings.json index 0badd2a..c1a36ef 100644 --- a/modules/ignore/strings.json +++ b/modules/ignore/strings.json @@ -3,83 +3,102 @@ "en": "{user}: Usage: ~ignore [module]. Modules you can ignore are: {modules}.", "es": "{user}: Modo de empleo: ~ignore [módulo]. Módulos que tú puedes ignorar son: {modules}.", "na'vi": "{user}: Sar: ~ignore ['u]. U, nga ke tìng mikyun: {modules}.", - "cy": "{user}: Defnydd: ~ignore [modiwl]. Modiwlau a allech anwybyddu yw: {modules}." + "cy": "{user}: Defnydd: ~ignore [modiwl]. Modiwlau a allech anwybyddu yw: {modules}.", + "nl": "{user}: Gebruik: ~ignore [module]. Modules die negeert kunnen worden zijn: {modules}." }, "already_ignoring": { "en": "{user}: You're already ignoring that module.", "es": "{user}: Ya ignoras este módulo.", "na'vi": "{user}: 'uri nga ke tìng mikyun srekrr.", - "cy": "{user}: Mi rwyt ti'n anwybyddu'r modiwl yna'n barod." + "cy": "{user}: Mi rwyt ti'n anwybyddu'r modiwl yna'n barod.", + "nl": "{user}: Je negeert deze module al." }, "ignored": { "en": "{user}: Now ignoring {module}.", "es": "{user}: Estás ignorando {module}.", "na'vi": "{user}: Nga ke terìng mikyun {module}ne set.", - "cy": "{user}: Nawr yn anwybyddu {module}" + "cy": "{user}: Nawr yn anwybyddu {module}", + "nl": "{user}: {module} wordt nu genegeerd." }, "invalid_ignore": { "en": "{user}: That isn't a valid module name.", "es": "{user}: Ese no es un nombre de un módulo valido.", "na'vi": "{user}: Tsatstxo eyawr ke lu.", - "cy": "{user}: Nid oedd hwna'n modiwl dilys" + "cy": "{user}: Nid oedd hwna'n modiwl dilys", + "nl": "{user}: Dat is geen geldige modulenaam." }, "unignore_usage": { "en": "{user}: Usage: ~unignore [module]. Modules you are currently ignoring: {modules}.", "es": "{user}: Modo de empleo: ~unignore [módulo]. Módulos que ignoras ahora mismo: {modules}.", "na'vi": "{user}: Sar: ~unignore ['u]. Uri, nga ke terìng mikyun: {modules}.", - "cy": "{user}: Defnydd ~unignore [modiwl]. Modiwlau rydech yn anwybyddu ar hyn o bryd: {modules}" + "cy": "{user}: Defnydd ~unignore [modiwl]. Modiwlau rydech yn anwybyddu ar hyn o bryd: {modules}", + "nl": "{user}: Gebruik: ~unignore [module]. Modules die momenteel worden genegeerd: {modules}." }, "invalid_unignore": { "en": "{user}: You're not ignoring that module or it doesn't exist.", "es": "{user}: No ignoras este módulo o no existe.", "na'vi":"{user}: Nga terìng mikyun fu fì'ul fìtsengit ke tok.", - "cy": "{user}: Nid wyt ti'n anwybyddu'r modiwl yna neu nid yw e'n bodoli" + "cy": "{user}: Nid wyt ti'n anwybyddu'r modiwl yna neu nid yw e'n bodoli", + "nl": "{user}: Deze module bestaat niet of wordt niet genegeerd." }, "unignored": { "en": "{user}: No longer ignoring {module}.", "es": "{user}: Ya no ignoras {module}.", "na'vi": "{user}: Nga terìng mikyun {module}ne set", - "cy": "{user}: Ddim yn anwybyddu {module} bellach" + "cy": "{user}: Ddim yn anwybyddu {module} bellach", + "nl": "{user}: {module} wordt niet langer genegeerd." }, "ban_usage": { - "en": "{user}: Usage: ~ban [user] [module/command]. Use * for all modules and commands." + "en": "{user}: Usage: ~ban [user] [module/command]. Use * for all modules and commands.", + "nl": "{user}: Gebruik: ~ban [gebruiker] [module/commando]. Gebruik * voor alle modules en alle commandos." }, "already_banned": { - "en": "{user}: {banned} is already banned from that module." + "en": "{user}: {banned} is already banned from that module.", + "nl": "{user}: {banned} is al geband van deze module." }, "banned_success": { - "en": "{user}: {banned} is now banned from {module}." + "en": "{user}: {banned} is now banned from {module}.", + "nl": "{user}: {banned} mag {module} nu niet meer gebruiken." }, "invalid_ban": { - "en": "{user}: That isn't a valid module name." + "en": "{user}: That isn't a valid module name.", + "nl": "{user}: Dat is geen geldige modulenaam." }, "unban_usage": { - "en": "{user}: Usage: ~unban [user] [module]." + "en": "{user}: Usage: ~unban [user] [module].", + "nl": "{user}: Gebruik: ~unban [gebruiker] [module]." }, "invalid_unban": { - "en": "{user}: {banned} is not banned from that module or it doesn't exist." + "en": "{user}: {banned} is not banned from that module or it doesn't exist.", + "nl": "{user}: {banned} is niet geband van die module of de module bestaat niet." }, "unbanned_success": { - "en": "{user}: {banned} is no longer banned from {module}." + "en": "{user}: {banned} is no longer banned from {module}.", + "nl": "{user}: {banned} mag {module} weer gebruiken." }, "ignoring_channel": { - "en": "Now ignoring {module} in {channel}", - "na'vi": "Oe ke stayawm {module}ur mì {channel}" + "en": "Now ignoring {module} in {channel}.", + "na'vi": "Oe ke stayawm {module}ur mì {channel}", + "nl": "{module} wordt nu genegeerd in {channel}." }, "already_ignoring_channel": { - "en": "Already ignoring {module} in {channel}", - "na'vi": "Oe ke stayawm {module}ur mì {channel} li" + "en": "Already ignoring {module} in {channel}.", + "na'vi": "Oe ke stayawm {module}ur mì {channel} li", + "nl": "{module} wordt al genegeerd in {channel}." }, "module_not_exist": { "en": "{module} isn't loaded or doesn't exist.", - "na'vi": "Oel ke omum teri {module}it fu {module} ke fkeytok" + "na'vi": "Oel ke omum teri {module}it fu {module} ke fkeytok", + "nl": "{module} is niet geladen of bestaat niet." }, "unignoring_channel": { - "en": "No longer ignoring {module} in {channel}", - "na'vi": "Oel stayawm {module}ur mì {channel} set." + "en": "No longer ignoring {module} in {channel}.", + "na'vi": "Oel stayawm {module}ur mì {channel} set.", + "nl": "{module} wordt niet meer genegeerd in {channel}." }, "not_ignoring_channel": { - "en": "{module} wasn't being ignored in {channel}", - "na'vi": "Oel stayawm {module}ur mì {channel} li." + "en": "{module} wasn't being ignored in {channel}.", + "na'vi": "Oel stayawm {module}ur mì {channel} li.", + "nl": "{module} werd niet genegeerd in {channel}." } } diff --git a/modules/imgur/config.json b/modules/imgur/config.json new file mode 100644 index 0000000..cc20a5d --- /dev/null +++ b/modules/imgur/config.json @@ -0,0 +1,8 @@ +{ + "dbKeys": [ "imgur" ], + "dependencies": [ "web", "api" ], + "imagelength": 5, + "nsfwwarn": true, + "apikey": "86fd3a8da348b65", + "highscore": "ricount" +} diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index 90f091b..507e6f2 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -7,14 +7,14 @@ var _ = require('underscore')._, request = require('request'); var imgur = function(dbot) { + this.db = dbot.db.imgur; this.internalAPI = { 'infoString': function(imgData) { - info = null; + info = ''; if(imgData && _.has(imgData, 'data')) { imgData = imgData.data; - info = '['; if(imgData.title) { - info += imgData.title + ' is '; + info += imgData.title + ' - '; } if(imgData.type) { if(imgData.animated) { @@ -26,11 +26,11 @@ var imgur = function(dbot) { info += 'an image with '; } info += imgData.views + ' views ('; - info += imgData.width + 'x' + imgData.height + ')].'; + info += imgData.width + 'x' + imgData.height + ')'; } return info; - } + }.bind(this) }; this.api = { @@ -45,9 +45,11 @@ var imgur = function(dbot) { var testUrl = 'http://i.imgur.com/' + testSlug + '.' + ext[_.random(0, ext.length - 1)]; + this.db.totalHttpRequests += 1; var image = request(testUrl, function(error, response, body) { // 492 is body.length of a removed image if(!error && response.statusCode == 200 && body.length != 492) { + this.db.totalImages += 1; callback(testUrl, testSlug); } else { this.api.getRandomImage(callback); @@ -55,27 +57,36 @@ var imgur = function(dbot) { }.bind(this)); }, + 'getImageInfoString': function(slug, callback) { + this.api.getImageInfo(slug, function(imgData) { + callback(this.internalAPI.infoString(imgData)); + }.bind(this)); + }, + 'getImageInfo': function(slug, callback) { request.get({ 'url': 'https://api.imgur.com/3/image/' + slug + '.json', 'json': true, 'headers': { - 'Authorization': 'Client-ID 86fd3a8da348b65' + 'Authorization': 'Client-ID ' + dbot.config.imgur.apikey } }, function(err, response, body) { + this.db.totalApiRequests += 1; callback(body); - }); + }.bind(this)); } }; this.api['getRandomImage'].external = true; this.api['getRandomImage'].extMap = [ 'callback' ]; + this.api['getImageInfoString'].external = true; + this.api['getImageInfoString'].extMap = [ 'slug', 'callback' ]; this.commands = { '~ri': function(event) { this.api.getRandomImage(function(link, slug) { this.api.getImageInfo(slug, function(imgData) { var info = this.internalAPI.infoString(imgData); - event.reply(event.user + ': ' + link + ' ' + info); + event.reply(event.user + ': ' + link + ' [' + info + ']'); }.bind(this)); }.bind(this)); } @@ -86,12 +97,15 @@ var imgur = function(dbot) { if(matches[1]) { this.api.getImageInfo(matches[1], function(imgData) { var info = this.internalAPI.infoString(imgData); - if(info) event.reply(info); + if(info) event.reply('[' + info + ']'); }.bind(this)); } }.bind(this); dbot.api.link.addHandler(this.name, /https?:\/\/i\.imgur\.com\/([a-zA-Z0-9]+)\.([jpg|png|gif])/, imgurHandler); dbot.api.link.addHandler(this.name, /https?:\/\/imgur\.com\/([a-zA-Z0-9]+)/, imgurHandler); + if(!_.has(dbot.db.imgur, 'totalHttpRequests')) dbot.db.imgur.totalHttpRequests = 0; + if(!_.has(dbot.db.imgur, 'totalApiRequests')) dbot.db.imgur.totalApiRequests = 0; + if(!_.has(dbot.db.imgur, 'totalImages')) dbot.db.imgur.totalImages = 0; }.bind(this); }; diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js new file mode 100644 index 0000000..314dfee --- /dev/null +++ b/modules/imgur/pages.js @@ -0,0 +1,29 @@ +var _ = require('underscore')._; + +var pages = function(dbot) { + return { + '/imgur/random': function(req, res) { + var quoteCat = dbot.db.quoteArrs[dbot.config.imgur.highscore], + highScore = 0; + + if(quoteCat) { + highScore = _.last(quoteCat); + } + + res.render('imgurr', { "highscore" : highScore }); + }, + + '/imgur/stats': function(req, res) { + res.render('imgurstats', { + 'name': dbot.config.name, + 'totalHttpRequests': this.db.totalHttpRequests, + 'totalApiRequests': this.db.totalApiRequests, + 'totalImages': this.db.totalImages + }); + } + }; +}; + +exports.fetch = function(dbot) { + return pages(dbot); +}; diff --git a/modules/imgur/strings.json b/modules/imgur/strings.json index 2d30288..869c806 100644 --- a/modules/imgur/strings.json +++ b/modules/imgur/strings.json @@ -1,6 +1,7 @@ { "nsfw": { "en": "might be NSFW", - "na'vi": "kxawm ke wivìntxu evengur" + "na'vi": "kxawm ke wivìntxu evengur", + "nl": "bevat mogelijk gevoelige beelden" } } diff --git a/modules/kick/strings.json b/modules/kick/strings.json index 674795a..6764552 100644 --- a/modules/kick/strings.json +++ b/modules/kick/strings.json @@ -3,7 +3,8 @@ "en": "{user} has been kicked {kicks} times and has kicked people {kicked} times.", "es": "Se ha expulsado {user} {kicks} veces y {user} ha expulsado personas {kicked} veces.", "na'vi": "Tuteol {user}it tsrame'i {kicks} hìmtxan ulte sute tsrame'i {kicked} hìmtxan.", - "cy": "Cafwyd {user} ei gicio {kicks} gwaith ac wedi cicio pobl {kicked} gwaith." + "cy": "Cafwyd {user} ei gicio {kicks} gwaith ac wedi cicio pobl {kicked} gwaith.", + "nl": "{user} is {kicks} keer gekickt en heeft anderen {kicked} keer gekickt." }, "kicked_dbot": { "en": "Thou shalt not kick {botname}", @@ -13,5 +14,7 @@ }, "ckicked": { "en": "Attention: {kicker} has kicked {kickee} from {channel}. The reason given was: \"{reason}.\"" + "cy": "Ni ddylech cicio {botname}", + "nl": "Gij zult {botname} niet kicken" } } diff --git a/modules/link/strings.json b/modules/link/strings.json index 832b243..fcef28f 100644 --- a/modules/link/strings.json +++ b/modules/link/strings.json @@ -1,13 +1,15 @@ { "title_not_found": { "en": "No page title found.", - "na'vi": "Oel ke tsun run 'upxare atxin." + "na'vi": "Oel ke tsun run 'upxare atxin.", + "nl": "Er is geen paginatitel gevonden." }, "xkcd": { "en": "xkcd {num}: {title} https://xkcd.com/{num}" }, "no-hits": { "en": "No hits.", - "na'vi": "Oel ke tsun rivum ayuoti." + "na'vi": "Oel ke tsun rivum ayuoti.", + "nl": "Geen resultaten." } } diff --git a/modules/poll/strings.json b/modules/poll/strings.json index 7e76d92..6029c60 100644 --- a/modules/poll/strings.json +++ b/modules/poll/strings.json @@ -3,18 +3,21 @@ "en": "Usage: ~newpoll name [options=opt1,opt2,opt3] description", "es" : "Modo de empleo: ~newpoll nombre [options=opción1,opción2,opción3] descripción", "na'vi": "Usage: ~newpoll tstxo [sìftxey=tìfxey1,tìfxey2,fìfxey3] tìsla'tsu", - "cy": "Defnydd: ~newpoll enw [optiynau=opt1,opt2,op3] disgrifiad" + "cy": "Defnydd: ~newpoll enw [optiynau=opt1,opt2,op3] disgrifiad", + "nl": "Gebruik: ~newpoll name [options=opt1,opt2,opt3] description" }, "poll_exists": { "en": "Poll '{name}' already exists.", "es" : "Votación '{name}' ya existe.", "na'vi": "sìpawm sna'o '{name}' fkeytok srekrr.", - "cy": "Mae'r pôl {name} bodoli'n barod" + "cy": "Mae'r pôl {name} bodoli'n barod", + "nl": "Poll '{name}' bestaat al." }, "poll_created": { "en": "Poll '{name}' created ({description}). Cast thy votations! - {url}", "es" : "Votación '{name}' creado ({description}). ¡Emited sus votas! - {url}", - "na'vi": "sìpawm sna'o '{name}' ngìyop ({description}). Nga tìpe'unit Pe'eiun - {url}" + "na'vi": "sìpawm sna'o '{name}' ngìyop ({description}). Nga tìpe'unit Pe'eiun - {url}", + "nl": "Poll '{name}' aangemaakt ({description}). Laat uw stem horen! - {url}" }, "poll_describe": { "en": "{name}: {description} - {url}." @@ -23,65 +26,76 @@ "en": "{user} changed their vote in {poll} to '{vote}' ({count}).", "es" : "{user} cambió su voto en {poll} a '{vote}' ({count}).", "na'vi": "{user} lìyatem ngeyä tìpe'un {poll}mì, ngeyä tìpe'un amip '{vote}'({count}) lu.", - "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}' ({count})." + "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}' ({count}).", + "nl": "{user} heeft zijn stem voor {poll} veranderd in '{vote}' ({count})." }, "voted": { "en": "{user} voted for '{vote}' in {poll} ({count}).", "es" : "{user} votó para '{vote}' en {poll} ({count}).", "na'vi": "'{vote}'ìri {user} pìye'un {poll}mì ({count}).", - "cy": "Pledleisiodd {user} am '{vote}' yn {poll} ({count})." + "cy": "Pledleisiodd {user} am '{vote}' yn {poll} ({count}).", + "nl": "{user} heeft gestemd voor '{vote}' in {poll} ({count})." }, "invalid_vote": { "en": "Invalid vote: {vote}", "es" : "Vota inválida: {vote}", "na'vi": "Ngeyä tìpe'un keyawr lu ({vote}).", - "cy": "Pleidlais annilys: {vote}" + "cy": "Pleidlais annilys: {vote}", + "nl": "Ongeldige stem: {vote}" }, "poll_unexistent": { "en": "Poll '{name}' doesn't exist.", "es" : "Votación '{name}' no existe.", "na'vi": "sìpawm sna'o '{name}' ke fkeytok.", - "cy": "Nid yw pôl '{name}' yn bodoli" + "cy": "Nid yw pôl '{name}' yn bodoli", + "nl": "Poll '{name}' bestaat niet." }, "option_added": { "en": "{user}: '{option}' added to '{name}'.", "es" : "{user}: '{option}' añadido a '{name}'.", "na'vi": "'{name}'ur {user}ìl '{option}'it sung.", - "cy": "{user}: Ychwanegwyd '{option}' i '{name}'" + "cy": "{user}: Ychwanegwyd '{option}' i '{name}'", + "nl": "{user}: '{option}' toegevoegd aan '{name}'." }, "option_exists": { "en": "{user}: '{option}' already exists in '{name}'.", "es" : "{user}: '{option}' ya existe en '{name}'.", "na'vi": "{user}: '{option}' fkeytok srekrr '{name}'mì.", - "cy": "{user}: Mae '{option}' yn bodoli'n barod yn '{name}'." + "cy": "{user}: Mae '{option}' yn bodoli'n barod yn '{name}'.", + "nl": "{user}: '{option}' bestaat al in '{name}'." }, "not_poll_owner": { "en": "{user}: You don't own the '{name}' poll.", "es" : "{user}: La votación '{name}' no es tuyo.", "na'vi": "{user}: ngaru '{name}' sìpawm sna'o ke lu.", - "cy": "{user}: Nid ydech chi'n berchen y pôl '{name}'." + "cy": "{user}: Nid ydech chi'n berchen y pôl '{name}'.", + "nl": "{user}: Je bent niet de eigenaar van de poll '{name}'." }, "option_removed": { "en": "{user}: '{option}' removed from '{name}'", "es" : "{user}: '{option}' eliminado de '{name}'", "na'vi": "{user}: '{option}'it 'aku '{name}'ta", - "cy": "{user}: '{option}' wedi ei ddileu o '{name}'" + "cy": "{user}: '{option}' wedi ei ddileu o '{name}'", + "nl": "{user}: '{option}' verwijderd van '{name}'" }, "av_voted": { "en": "{user} voted '{vote}' in {poll}.", "es": "{user} votó '{vote}' en {poll}.", "na'vi": "{user}ìl '{vote}'it pìye'un '{poll}'mì.", - "cy": "Pledleisiodd {user} am '{vote}' yn {poll}" + "cy": "Pledleisiodd {user} am '{vote}' yn {poll}", + "nl": "{user} heeft '{vote}' gestemd in {poll}." }, "av_changed_vote": { "en": "{user} changed their vote in {poll} to '{vote}'.", "es" : "{user} cambió su voto en {poll} a '{vote}'.", "na'vi": "{user}ìl lìyatem ngeyä tìpa'unit '{poll}'mì, ngeyä tìpe'un '{vote} lu set.", - "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}'" + "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}'", + "nl": "{user} heeft zijn stem veranderd naar '{vote}' in {poll}." }, "count": { "en": "The running-order of poll '{poll}' ({description}) is: {places}.", "na'vi": "Sute tsnì pole'un '{poll}'mì ({description}) lu: {places}.", - "cy": "Trefn yr pôl '{poll}' ({description}) yw: {places}" + "cy": "Trefn yr pôl '{poll}' ({description}) yw: {places}", + "nl": "De volgorde van poll '{poll}' ({description}) is: {places}." } } diff --git a/modules/project/config.json b/modules/project/config.json new file mode 100644 index 0000000..0725dea --- /dev/null +++ b/modules/project/config.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["web", "quotes", "github"] +} diff --git a/modules/project/pages.js b/modules/project/pages.js new file mode 100644 index 0000000..a724636 --- /dev/null +++ b/modules/project/pages.js @@ -0,0 +1,70 @@ +var exec = require('child_process').exec, + request = require('request'); + +var pages = function(dbot) { + var quoteCat = dbot.db.quoteArrs[dbot.config.name], + rev, diff; + + exec("git rev-list --all | wc -l", function(a, b, c) { + rev = b + }); + exec("git log -1", function(a, b, c) { + diff = b + }); + + /* TODO: merge back into github module */ + var milestones; + request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open", function(e, r, b){ + milestones = JSON.parse(b); + }); + + + return { + '/project': function(req, res) { + var quote = dbot.config.name; + if(quoteCat) { + quote = quoteCat[Math.floor(Math.random()*quoteCat.length)]; + } + + res.render('project', { + "name": dbot.config.name, + "intro": dbot.t("dbotintro", { + "botname": dbot.config.name + }), + "curr839": dbot.config.language, + "currver": dbot.config.version, + "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.t("projectstatus"), + "revnum": dbot.t("revnum",{ + "name": dbot.config.name, + "rev": rev, + "ver": "abcdef" // TODO, obviously + }), + "modules": dbot.config.moduleNames, + "loadmod": dbot.t("loadedmodules"), + "debugmode": dbot.t("debugmode-" + dbot.config.debugMode), + "milestones": milestones, + "milestoneprog": dbot.t("milestoneprog"), + "config": dbot.t("configoptions"), + "milestonename": dbot.t("milestonename"), + "openmilestone": dbot.t("openmilestone"), + "closedmilestone": dbot.t("closedmilestone"), + "development": dbot.t("development"), + "dquote": quote, + "diff": diff, + "pagetitle": dbot.t("pagetitle", { + "botname": dbot.config.name + }) + }); + }, + }; +}; + +exports.fetch = function(dbot) { + return pages(dbot); +}; diff --git a/modules/project/project.js b/modules/project/project.js new file mode 100644 index 0000000..25e3e35 --- /dev/null +++ b/modules/project/project.js @@ -0,0 +1,13 @@ +/** + * Module Name: Project + * Description: Web page which shows git status and other various stats about + * the dbot. + */ + +var project = function(dbot) { + // Nothing to see here go away love zuzak +} + +exports.fetch = function(dbot) { + return new project(dbot); +} diff --git a/modules/project/strings.json b/modules/project/strings.json new file mode 100644 index 0000000..4e2407e --- /dev/null +++ b/modules/project/strings.json @@ -0,0 +1,138 @@ +{ + "dbotintro": { + "en": "{botname} lorem ipsum dolor sit amet" + }, + "dbotspeaks": { + "en": "{name} speaks {lang}", + "de": "{name} spricht {lang} ({langen})", + "fr": "{name} parle {lang} ({langen})", + "it": "{name} parla {lang} ({langen})", + "nl": "{name} spreekt {lang} ({langen})" + }, + "pagetitle": { + "en": "{botname} web interface", + "fr": "{botname} interface réseau", + "de": "{botname} Web-Interface", + "it": "{botname} interfaccia web", + }, + "en": { + "en": "English", + "fr": "anglais", + "de": "Englisch", + "it": "inglese", + "cy": "saesneg", + "nl": "Engels" + }, + "fr": { + "en": "French", + "fr": "français", + "de": "Französisch", + "it": "francese", + "nl": "Frans" + }, + "de": { + "en": "German", + "fr": "allemande", + "de": "Deutsch", + "it": "tedesco", + "nl": "Duits" + }, + "it": { + "en": "Italian", + "fr": "italien", + "de": "Italiener", + "it": "italiano", + "nl": "Italiaans" + }, + "cy": { + "en": "Welsh", + "fr": "gallois", + "de": "Walisisch", + "it": "gallese", + "cy": "cymraeg", + "nl": "Welsh" + }, + "na'vi": { + "en": "Na'vi", + "fr": "na'vi", + "de": "Na'vi", + "it": "Na'vi", + "nl": "Na'vi" + }, + "es": { + "en": "Spanish", + "fr": "espagnole", + "de": "Spanisch", + "it": "spagnolo", + "nl": "Spaans" + }, + "revnum": { + "en": "{name} is at revision {rev}", + "fr": "{name} est à révision {rev}", + "de": "{name} ist in der Revision {rev}", + "it": "{name} il numero di revisione {rev}", + "nl": "{name} is bij revisie {rev}" + }, + "loadedmodules": { + "en": "loaded modules", + "fr": "modules chargés", + "it": "moduli caricati", + "nl": "geladen modules" + }, + "configoptions": { + "en": "Configuration", + "fr": "Configuration", + "de": "Konfiguration", + "it": "Configuazione", + "nl": "Configuratie" + }, + "debugmode-true": { + "en": "Debug mode active", + "fr": "debug actif", + "de": "Debug aktiv", + "it": "debug attivo", + "nl": "Debug actief" + }, + "debugmode-false": { + "en": "Debug off", + "fr": "debug éteint", + "de": "Debug ausgeschaltet", + "it": "debug spento", + "nl": "Debug uitgeschakeld" + }, + "milestoneprog": { + "en": "Progress", + "fr": "Progression", + "de": "Fortschritt", + "it": "sviluppo", + "nl": "Voortgang" + }, + "openmilestone": { + "en": "Open", + "fr": "Ouvert", + "de": "Offen", + "it": "Aperto", + "nl": "Open" + }, + "closedmilestone": { + "en": "Closed", + "fr": "Fermé", + "de": "Gesperrt", + "it": "Chiuso", + "nl": "Gesloten" + }, + "milestonename": { + "en": "Name", + "fr": "Nom", + "de": "Name", + "it": "Nome", + "nl": "Naam" + }, + "development": { + "en": "Development", + "fr": "Développement", + "de": "Entwicklung", + "it": "Sviluppo", + "nl": "Ontwikkeling" + } +} diff --git a/modules/quotes/quotes.js b/modules/quotes/quotes.js index d4a9cb3..cc66e18 100644 --- a/modules/quotes/quotes.js +++ b/modules/quotes/quotes.js @@ -110,9 +110,6 @@ var quotes = function(dbot) { }.bind(this)); } }; - - this.api['getQuoteCategory'].external = true; - this.api['getQuoteCategory'].extMap = [ 'name' ]; this.listener = function(event) { if(event.action == 'PRIVMSG') { @@ -128,7 +125,7 @@ var quotes = function(dbot) { }); } } else if(event.action == 'JOIN') { - var userQuote = this.api.addQuote(event.user, function(quote) { + var userQuote = this.api.getQuote(event.user, function(quote) { if(quote) { event.reply(event.user + ': ' + quote); } diff --git a/modules/quotes/strings.json b/modules/quotes/strings.json index c1aac84..bbfaa7a 100644 --- a/modules/quotes/strings.json +++ b/modules/quotes/strings.json @@ -3,132 +3,156 @@ "en": "Nobody loves {category}", "es": "Nadie ama a {category}", "na'vi": "{category} yawne ke lu kawturu.", - "cy": "Does neb yn caru {category}" + "cy": "Does neb yn caru {category}", + "nl": "Niemand houdt van {category}" }, "large_categories": { "en": "Largest categories: ", "es": "Los categorías más grandes: ", "na'vi": "U atsawl: ", - "cy": "Categoriau mwyaf: " + "cy": "Categoriau mwyaf: ", + "nl": "Grootste categoriën: " }, "empty_category": { "en": "That category has no quotes in. Commence incineration.", "es": "Categoría vacía. Iniciar incineración.", "na'vi": "Tsauru upxare lu. Nga skxawng lu.", - "cy": "Nid yw'r categori yna efo dyfyniadau. Cychwyn orfflosgiad" + "cy": "Nid yw'r categori yna efo dyfyniadau. Cychwyn orfflosgiad", + "nl": "Die categorie heeft geen quotes. Bereid het verbrandingsritueel voor." }, "no_results": { "en": "No results found.", "es": "No hubo ningún resultado.", "na'vi": "Oel kea humit rìmun", - "cy": "Dim canlyniadau ar gael" + "cy": "Dim canlyniadau ar gael", + "nl": "Geen resultaten gevonden." }, "locked_category": { "en": "{category} is locked. Commence incineration.", "es": "{category} está cerrada. Comenzar incineración.", "na'vi": "{category} ke fkeytok set. Nga skxawng lu nafì'u", - "cy": "Mae {category} wedi cloi. Cychwyn orfflosgiad" + "cy": "Mae {category} wedi cloi. Cychwyn orfflosgiad", + "nl": "{category} is op slot. Bereid het verbrandingsritueel voor." }, "no_quotes": { "en": "No quotes exist under {category}", "es": "Ninguna cita existe en {category}", "na'vi": "Kea upxare fkeytok {category}mì", - "cy": "Does dim dyfyniadau gan {category}" + "cy": "Does dim dyfyniadau gan {category}", + "nl": "Er zijn geen quotes in {category}" }, "last_removed": { "en": "Last quote removed from {category}.", "es": "Última cita quitado de {category}.", "na'vi": "Oel 'upxareti aham 'aku {category}ta", - "cy": "Dyfyniad olaf wedi ei ddileu o {category}" + "cy": "Dyfyniad olaf wedi ei ddileu o {category}", + "nl": "De laatste quote is verwijderd uit {category}." }, "no_recent_adds": { "en": "No quotes were added recently.", "es": "Ninguna cita fue añadido recientamente.", "na'vi": "Kea upxareti samung nìfkrr", - "cy": "Nid oes unrhyw dyfyniadau wedi ei ychwwanegu'n ddiweddar" + "cy": "Nid oes unrhyw dyfyniadau wedi ei ychwwanegu'n ddiweddar", + "nl": "Er zijn recentelijk geen quotes toegevoegd." }, "rmlast_spam": { "en": "No spamming that shit. Try again in a few minutes...", "es": "No me inundes de mierda. Intenta otra vez en unos minutos...", "na'vi": "Nga Tsasngelit ke zene fpivere'. Sweylu nga fmivi ye'rìn...", - "cy": "Peidiwch a sbamio hwna. Triwch eto mewn ychydyg funudau..." + "cy": "Peidiwch a sbamio hwna. Triwch eto mewn ychydyg funudau...", + "nl": "Dat spammen kun je ook lekker laten. Probeer het zometeen nog eens..." }, "removed_from": { "en": "'{quote}' removed from {category}", "es": "'{quote}' quitado de {category}", "na'vi": "'{quote}'(it/ti) 'ìyaku {category}", - "cy": "'{quote}' wedi ei ddileu o {category}" + "cy": "'{quote}' wedi ei ddileu o {category}", + "nl": "{quote} verwijderd uit {category}" }, "q_not_exist_under": { "en": "'{quote}' doesn't exist under '{category}'.", "es": "'{quote}' no existe en '{category}'.", "na'vi": "'{quote}' ke fkeytok '{category}'ta.", - "cy": "Nid yw '{quote}' yn bodoli yn '{category}'" + "cy": "Nid yw '{quote}' yn bodoli yn '{category}'", + "nl": "{quote} bestaat niet in '{category}'." }, "total_quotes": { "en": "Total quote count: {count}.", "es": "Total de citas: {count}.", "na'vi": "'upxareri holpxay: {count}.", - "cy": "Cyfanswm dyfyniadau: {count}." + "cy": "Cyfanswm dyfyniadau: {count}.", + "nl": "Totaal aantal quotes: {count}." }, "quote_exists": { "en": "Quote already in DB. Initiate incineration.", "es": "Cita ya existe. Iniciar incineración.", "na'vi": "'Upxarel säomumit fìtsengit tok srekrr. Nga skxawng lu.", - "cy": "Dyfyniad yn y gronfa ddata yn barod. Cychwyn orfflosgiad" + "cy": "Dyfyniad yn y gronfa ddata yn barod. Cychwyn orfflosgiad", + "nl": "De quote bestaat al. Bereid het verbrandingsritueel voor." }, "quote_saved": { "en": "Quote saved in '{category}' ({count}).", "es": "Cita guardada en '{category}' ({count}).", "na'vi": "Oe zayerok '{category}'mì ({count}).", - "cy": "Dyfyniad wedi ei gadw yn '{category}' ({count})." + "cy": "Dyfyniad wedi ei gadw yn '{category}' ({count}).", + "nl": "Quote opgeslagen in '{category}' ({count})." }, "quote_replace": { "en": "No replacing arrays, you whore.", "es": "No sustituites arrays, hijo de puta.", "na'vi": "Ngal fìsäomumit ke tsun rivawn. Nga muntxa sayi suteo hrh.", - "cy": "Peidiwch a newid rhestrau, y cachgi" + "cy": "Peidiwch a newid rhestrau, y cachgi", + "nl": "Geen arrays vervangen, slet." }, "quote_count": { "en": "{category} has {count} quotes.", "es": "{category} tiene {count} citas.", "na'vi": "{count}a upxare {category}ur lu.", - "cy": "{count} dyfyniad yn {category}" + "cy": "{count} dyfyniad yn {category}", + "nl": "{category} heeft {count} quotes." }, "quote_link": { "en": "Link to {category} - {url}", "es": "Enlace a {category} - {url}", "na'vi": "Fya'o {category}ne - {url}", - "cy": "Dolen i {category} - {url}" + "cy": "Dolen i {category} - {url}", + "nl": "Link naar {category} - {url}" }, "search_results": { "en": "{category} ({needle}): '{quote}' [{matches} results]", "es" : "{category} ({needle}): '{quote}' [{matches} resultados]", "na'vi": "{category} ({needle}): '{quote}' [kum a{matches}]", - "cy": "{category} ({needle}): '{quote}' [{matches} canlyniad]" + "cy": "{category} ({needle}): '{quote}' [{matches} canlyniad]", + "cy": "{category} ({needle}): '{quote}' [{matches} resultaten]" }, "quote_cache_auto_remove": { "en": "There are {count} quotes in the removal cache, which will be automatically cleared.", - "na'vi": "{count}a 'upxarel sngelit tok, Oel 'ayku sngelit lukenga." + "na'vi": "{count}a 'upxarel sngelit tok, Oel 'ayku sngelit lukenga.", + "nl": "Er staan {count} quotes klaar om verwijderd te worden, wat automatisch zal gebeuren." }, "quote_cache_manual_remove": { "en": "There are {count} quotes in the removal cache, which must be manually cleared.", - "na'vi": "{count}a 'upxarel sngelit tok slä oel ke 'ayku sngelit tafral nga zene 'aivku" + "na'vi": "{count}a 'upxarel sngelit tok slä oel ke 'ayku sngelit tafral nga zene 'aivku", + "nl": "Er staan {count} quotes klaar om verwijderd te worden, wat handmatig zal moeten gebeuren." }, "quote_cache_cleared": { "en": "{count} quotes cleared from the removal cache.", - "na'vi": "Oel 'aìmku {count}a 'upxareti ta sngel." + "na'vi": "Oel 'aìmku {count}a 'upxareti ta sngel.", + "nl": "{count} quotes verwijderd uit de verwijderlijst." }, "quote_cache_reinstated": { "en": "{count} quotes reinstated from the removal cache.", - "na'vi": "{count}a 'upxare tolätxaw ta sngel." + "na'vi": "{count}a 'upxare tolätxaw ta sngel.", + "nl": "{count} quotes hersteld van de verwijderlijst." }, "rm_cache_limit": { "en": "Attention: Too many quotes removed, rmCache must be cleared or reinstated manually with ~rmconfirm or ~rmdeny.", - "na'vi": "Oel zerok 'upxareti apxay set, sweylu txo nga 'aivku upxareti ìlä ~rmconfirm fu ~rmdeny." + "na'vi": "Oel zerok 'upxareti apxay set, sweylu txo nga 'aivku upxareti ìlä ~rmconfirm fu ~rmdeny.", + "nl": "Waarschuwing: Er zijn te veel quotes verwijderd. rmCache moet opgeschoond of herinstalleerd worden met ~rmconfirm of ~rmdeny" }, "web_not_configured": { - "en": "Cannot link to category. Web module is either not loaded or misconfigured." + "en": "Cannot link to category. Web module is either not loaded or misconfigured.", + "nl": "De categorie kan niet gelinkt worden. De web module is niet geladen of onjuist geconfigureerd." }, "category_renamed": { "en": "Category ~{oldName} renamed to ~{newName}." diff --git a/modules/rain/strings.json b/modules/rain/strings.json index 76c765a..a36c319 100644 --- a/modules/rain/strings.json +++ b/modules/rain/strings.json @@ -1,58 +1,72 @@ { "rain-0": { "en" : "It's not raining in {place}.", - "na'vi": "tompa ke zup {place}ur." + "na'vi": "tompa ke zup {place}ur.", + "nl": "Het regent niet in {place}." }, "rain-1": { "en" : "It's raining in {place}.", - "na'vi":"tompa zup {place}ur." + "na'vi":"tompa zup {place}ur.", + "nl": "Het regent in {place}." }, "rain-2": { "en" : "It's raining rather a lot in {place}.", - "na'vi":"tompa zup {place}ur nìhawng." + "na'vi":"tompa zup {place}ur nìhawng.", + "nl": "Het regent tamelijk hard in {place}." }, "rain-3": { "en" : "It's raining shitloads.", - "na'vi":"tompa zup {place}ur nìhawng." + "na'vi":"tompa zup {place}ur nìhawng.", + "nl": "Het regent nu toch wel erg hard." }, "rain-4": { "en" : "It's raining fucktons.", - "na'vi": "tompa zup {place}ur nìhawng." + "na'vi": "tompa zup {place}ur nìhawng.", + "nl": "De regen komt verdorie met bakken uit de lucht." }, "rain-5": { "en" : "It's raining whales (in {place})!", - "na'vi": "payoang zup {place}ur" + "na'vi": "payoang zup {place}ur", + "nl": "Een punker krijgt z'n hanekam niet meer omhoog gehouden." }, "rain-6": { "en" : "IT'S SO FUCKING WET OUT HERE MAN", - "na'vi" : "pey lu oeru nìhawng taluna tok fìtengeti" + "na'vi" : "pey lu oeru nìhawng taluna tok fìtengeti", + "nl": "Dit is dus een inloopdouche." }, "rain-7": { "en" : "I AM SO MOIST RIGHT NOW", - "na'vi":"pey lu oeru nìhawng taluna tok fìtengeti" + "na'vi":"pey lu oeru nìhawng taluna tok fìtengeti", + "nl": "IK VOEL ME NU TOCH ANDERS WEL BEHOORLIJK ONDER GEZEKEN." }, "rain-8": { "en" : "You used a #3 pencil instead of #2, didn't you?", - "na'vi": "Nga pamrel sami hu pencìl a#3 ulte ke pamrel sami pencìl a#2 kefyak?" + "na'vi": "Nga pamrel sami hu pencìl a#3 ulte ke pamrel sami pencìl a#2 kefyak?", + "nl": "PROOST." }, "rain-9": { "en" : "WELCOME TO ATLANTIS", - "na'vi": "ziva'u nìprrte atlantisftu." + "na'vi": "ziva'u nìprrte atlantisftu.", + "nl": "HAD IK GEVRAAGD OM EEN OMMETJE ATLANTIS?!" }, "rain-10": { "en" : "GET INSIDE", - "na'vi": "Sweylu txo nga livatam futa ngal fìtsengeti tok" + "na'vi": "Sweylu txo nga livatam futa ngal fìtsengeti tok", + "nl": "SCHUIL, BITCH! SCHUIL!" }, "rain-11": { "en" : "LOL U PROBABLY DIED", - "na'vi": "hrh kxawm nga tolerkup." + "na'vi": "hrh kxawm nga tolerkup.", + "nl": "HA, NU BEN JE TOCH ZEKER VERZOPEN?!" }, "rain-e": { "en" : "Unable to fetch weather data.", - "na'vi":"Oel ke tsun rivum sänumeti teriyafkeyk." + "na'vi":"Oel ke tsun rivum sänumeti teriyafkeyk.", + "nl": "Geen weerinformatie beschikbaar." }, "rain-u": { - "en": "Location too ambigious to process.", - "na'vi":"tsengeri, yayayr lu oeru." + "en": "Location too ambiguous to process.", + "na'vi":"tsengeri, yayayr lu oeru.", + "nl": "Deze locatie is te onduidelijk." } } diff --git a/modules/report/strings.json b/modules/report/strings.json index 242739a..0e12deb 100644 --- a/modules/report/strings.json +++ b/modules/report/strings.json @@ -1,18 +1,22 @@ { "report": { "en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\"", - "na'vi": "{reporter}ìl fpìl futa {reported} fe' lu taluna {reason}." + "na'vi": "{reporter}ìl fpìl futa {reported} fe' lu taluna {reason}.", + "nl": "Waarschuwing: {reporter} heeft {reported} aangegeven in {channel}. De reden die gegeven werd was: \"{reason}.\"" }, "reported": { "en": "Thank you, {reported} has been reported to the channel administrators.", - "na'vi": "Irayo si ngari, fìtsengìri ayeyktan omum teri {reported}it set." + "na'vi": "Irayo si ngari, fìtsengìri ayeyktan omum teri {reported}it set.", + "nl": "Bedankt, {reported} is aangegeven bij de administrators." }, "user_not_found": { "en": "{reported} isn't a known user in {channel}.", - "na'vi": "Oel ke omum {reported}it mì {channel}." + "na'vi": "Oel ke omum {reported}it mì {channel}.", + "nl": "{reported} is geen bestaande gebruiker in {channel}." }, "not_in_channel": { "en": "I am not present in {channel}.", - "na'vi": "Oel {channel}it ke tok." + "na'vi": "Oel {channel}it ke tok.", + "nl": "Ik ben niet aanwezig in {channel}." } } diff --git a/modules/spelling/strings.json b/modules/spelling/strings.json index d7fc82e..7259611 100644 --- a/modules/spelling/strings.json +++ b/modules/spelling/strings.json @@ -3,12 +3,14 @@ "en": "{correcter} meant: {fix}", "es": "{correcter} quería decir: {fix}", "na'vi": "Sweylu {correcter} pamrel sivi: {fix}", - "cy": "Oedd {correcter} yn feddwl: {fix}" + "cy": "Oedd {correcter} yn feddwl: {fix}", + "nl": "{correcter} bedoelde: {fix}" }, "spelling_other": { "en": "{correcter} thinks {candidate} meant: {fix}", "es": "{correcter} piensa que {candidate} queria decir: {fix}", "na'vi": "{correcter} fpìl futa sweylu {candiate} pamrel sivi: {fix}", - "cy": "Mae {correcter} yn meddwl bod {candidate} yn feddwl: {fix}" + "cy": "Mae {correcter} yn meddwl bod {candidate} yn feddwl: {fix}", + "nl": "{correcter} denkt dat {candidate} bedoelde: {fix}" } } diff --git a/modules/spotify/strings.json b/modules/spotify/strings.json index bb50931..125b7ca 100644 --- a/modules/spotify/strings.json +++ b/modules/spotify/strings.json @@ -13,6 +13,7 @@ }, "not-found": { "en": "{s} No results.", - "na'vi": "{s}, Oel ke tsun rivum ayuoti." + "na'vi": "{s}, Oel ke tsun rivum ayuoti.", + "nl": "{s} Geen resultaten." } } diff --git a/modules/stats b/modules/stats index e5519f3..500a21d 160000 --- a/modules/stats +++ b/modules/stats @@ -1 +1 @@ -Subproject commit e5519f353abf00e4ec25702f8e02231c9b1f5258 +Subproject commit 500a21d78b8882eb206598011ab3a5f30e7113b6 diff --git a/modules/users/strings.json b/modules/users/strings.json index a73263d..e7bbb94 100644 --- a/modules/users/strings.json +++ b/modules/users/strings.json @@ -1,26 +1,32 @@ { "alias": { "en": "{alias} is an alias of {user}", - "na'vi": "ayfko syaw {user} {alias} nìteng" + "na'vi": "ayfko syaw {user} {alias} nìteng", + "nl": "{alias} is een alias van {user}" }, "primary": { - "en": "{user} is a primary user (currently {currentNick}) with {count} aliases, ", - "na'vi": "{user} lu txin ulte {count}a stxo lu poru, " + "en": "{user} ({currentNick}) is a primary user with {count} aliases, ", + "na'vi": "{user} ({currentNick}) lu txin ulte {count}a stxo lu poru, ", + "nl": "{user} ({currentNick}) is een primaire gebruiker met {count} aliassen, " }, "unknown_alias": { "en": "{alias} does not currently exist as an alias or known user.", - "na'vi": "{alias} ke fkeytok nìfkrr" + "na'vi": "{alias} ke fkeytok nìfkrr", + "nl": "{alias} staat momenteel niet bekend als een bestaande gebruiker of alias." }, "aliasparentset": { "en": "{newParent} is now the parent user, and {newAlias} is an alias.", - "na'vi": "{newParent} lu sa'sem set ulte {newAlias} lu stxo set nìteng." + "na'vi": "{newParent} lu sa'sem set ulte {newAlias} lu stxo set nìteng.", + "nl": "{newParent} is nu de bovenliggende gebruiker, en {newAlias} is een alias." }, "unprimary_error": { "en": "One of those users isn't currently recorded as a primary user.", - "na'vi": "fo sute txin ke lu." + "na'vi": "fo sute txin ke lu.", + "nl": "Een van deze gebruikers is nog niet bekend als een primaire gebruiker." }, "merged_users": { "en": "{old_user} and their aliases have been merged into {new_user}.", - "na'vi": "{old_user} ulte stxo alahe {new_user} lu set." + "na'vi": "{old_user} ulte stxo alahe {new_user} lu set.", + "nl": "{old_user} en zijn aliassen zijn samengevoegd met {new_user}." } } diff --git a/modules/web/config.json b/modules/web/config.json index f714ecc..e6b635e 100644 --- a/modules/web/config.json +++ b/modules/web/config.json @@ -1,5 +1,5 @@ { - "webHost": "localhost", + "webHost": "nourishedcloud.com", "webPort": 8080, "externalPath": false, "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" diff --git a/public/imgurr.css b/public/imgurr.css new file mode 100644 index 0000000..f2bbb11 --- /dev/null +++ b/public/imgurr.css @@ -0,0 +1,108 @@ +#container { + text-align:center; +} + +#container,#image { + margin:0; + max-height:100%; + max-width:100%; + padding:0; +} + +#details { + display:none; + font-family:sans-serif; + font-weight:700; + left:25px; + min-width:280px; + padding:20px; + text-align:center; + top:25px; +} + +#history { + left:25px; + margin:0; + max-height:210px; + overflow:hidden; + padding:0; + top:95px; +} + +#history li { + font-family:monospace; + left:25px; + margin-bottom:10px; + opacity:0.1; + text-align:center; + width:168px; +} + +#history li,#loading,#count { + display:block; + font-family:monospace; + font-size:10px; + padding:10px; +} + +#history li:hover,#history li:nth-of-type(1) { + opacity:1!important; +} + +#history li:nth-of-type(2) { + opacity:0.8; +} + +#history li:nth-of-type(3) { + opacity:0.6; +} + +#history li:nth-of-type(4) { + opacity:0.4; +} + +#history li:nth-of-type(5) { + opacity:0.2; +} + +#history,#loading,#details,#count { + position:absolute; +} + +#loading, #count { + font-weight:500; +} +#loading { + top:95px; + left:220px; + min-width:95px; +} + +#count { + bottom:25px; + left:25px; + display:none; +} + +#loading,#details,#history li,#count { + background:rgba(43,43,43,0.8); + border-radius:5px; + color:#85bf25; +} + +a { + color:inherit; +} + +body.crop { + overflow:hidden; +} + +html,body { + background-color:#121211; + border:0; + height:100%; + margin:0; + overflow:auto; + padding:0; +} diff --git a/public/project.css b/public/project.css new file mode 100644 index 0000000..7d382b2 --- /dev/null +++ b/public/project.css @@ -0,0 +1,65 @@ +pre#gitdiff { + text-align:left; + width:80; + margin:auto; +} +div#main { + text-align:inherit; + font-size:18px; +} +h2,h3,h4,h5,h6,.center { + text-align:center; + text-transform:lowercase; +} +table#milestones { + margin:auto; + width:80%; +} +table#milestones td { + padding:5px; +} +p.intro { + text-align:center; + border:1px solid #ccc; + padding:20px; + border-radius:4px; +} +div.progress.open { + background-color: #f4fff4; + background-image: linear-gradient(to bottom,#f4fff4,#f9fff9); +} +div.progress { + margin-top:auto; + margin-bottom:auto; +} +div.progress-inner.open { + width:20%; + background-color: #3fff3f; + background-image: linear-gradient(to bottom,#3fff3f,#7fff7f); +} +div.progress.closed { + background-color: #fff5f5; + background-image: linear-gradient(to bottom,#fff5f5,#fff9f9); +} +div.progress-inner.closed { + background-color: #ff3f3f; + background-image: linear-gradient(to bottom,#ff3f3f,#ff7f7f); + width:20%; +} + +#config { + text-align:center; + text-transform:lowercase; +} + +li { + background-image: linear-gradient(to bottom, #f5ebe2, #f5e6d8); + border:1px solid #f5dcc5; + padding:5px; + margin:5px; + display:inline-block; +} + +#footer { + font-size:80%; +} diff --git a/public/styles.css b/public/styles.css index 50f73bd..5786bcc 100644 --- a/public/styles.css +++ b/public/styles.css @@ -13,7 +13,6 @@ body { margin: 0; font-family: "Source Sans Pro", sans-serif; color: #444; - text-shadow: 1px 1px 2px #2B2B2B; background: url("background.jpg") no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; @@ -133,7 +132,6 @@ li.quote { padding: 6px; font-size: 18px; width: 40%; - text-shadow: 1px 1px 1px black; } img { diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade new file mode 100644 index 0000000..b3e4436 --- /dev/null +++ b/views/imgur/imgurr.jade @@ -0,0 +1,76 @@ +!!! 5 +html(lang='en') + head + meta(charset='utf-8') + script(type="text/javascript", src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js") + link(rel="stylesheet", href="/imgurr.css") + title random imgur + script + var count = 0; + function giveMessage(msg) { + $('