From b7dad66a2649650038aea5711b34d5e30fe35624 Mon Sep 17 00:00:00 2001 From: Thomas Menari Date: Mon, 15 Apr 2013 02:10:29 +0100 Subject: [PATCH 01/52] random imgur --- modules/imgur/pages.js | 14 ++++++++++++++ views/imgur/imgurr.jade | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 modules/imgur/pages.js create mode 100644 views/imgur/imgurr.jade diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js new file mode 100644 index 0000000..e257b40 --- /dev/null +++ b/modules/imgur/pages.js @@ -0,0 +1,14 @@ +var _ = require('underscore')._; + +var pages = function(dbot) { + return { + '/imgur/random': function(req, res) { + res.render('imgurr', { + }); + } + }; +}; + +exports.fetch = function(dbot) { + return pages(dbot); +}; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade new file mode 100644 index 0000000..cf84303 --- /dev/null +++ b/views/imgur/imgurr.jade @@ -0,0 +1,15 @@ +!!! 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") + title random imgur + script + function wat() { + $.get("/api/imgur/getRandomImage", function(d) {$('#image').attr('src', d.data[0])}, "json"); + }; + $(wat()); + $(document).keypress(wat); + body + div#container + img#image(style='width: 100%') From af1e357df4ae9f06efb68942e24e26000695a64e Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Mon, 15 Apr 2013 02:50:50 +0100 Subject: [PATCH 02/52] Improved HCI --- public/imgurr.css | 15 +++++++++++++++ views/imgur/imgurr.jade | 8 ++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 public/imgurr.css diff --git a/public/imgurr.css b/public/imgurr.css new file mode 100644 index 0000000..5f169a5 --- /dev/null +++ b/public/imgurr.css @@ -0,0 +1,15 @@ +html, body { margin: 0; padding: 0; height: 100%; } +#container, #image { + margin: 0; padding: 0; + max-height: 100%; +} +#container { text-align: center; } +#loading { + background: rgba(255, 0, 0, 0.8); + display: none; + position: absolute; + top: 50px; + left: 30px; + padding: 10px; + color: #EFEFEF; +} diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index cf84303..63148cb 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -3,13 +3,17 @@ 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 function wat() { + $('#loading').show(); + $('#image').load(function(){$('#loading').hide(); console.log('loaded')}); $.get("/api/imgur/getRandomImage", function(d) {$('#image').attr('src', d.data[0])}, "json"); }; $(wat()); - $(document).keypress(wat); + $(document).on('keydown', function(e){(e.which==32)&&(wat()) }); body + div#loading Loading Image div#container - img#image(style='width: 100%') + img#image From 0f9da5c40e2e91ed14d7efe0ddcac5afe51af3ca Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Mon, 15 Apr 2013 01:59:00 +0000 Subject: [PATCH 03/52] replace "is" with pair of brackets (imgur) What imgur calls "title" is possibly better described as a caption. Most titles in imgur's gallery are full sentences, making the current behaviour of "xxx is yyy" fall flat, as the resulting string does not have satisfactory grammar. This commit changes the functionality from "[foo is bar]" to "[foo][bar]". Untested. --- modules/imgur/imgur.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index 90f091b..e84a4a9 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -14,7 +14,7 @@ var imgur = function(dbot) { imgData = imgData.data; info = '['; if(imgData.title) { - info += imgData.title + ' is '; + info += imgData.title + ']['; } if(imgData.type) { if(imgData.animated) { From 6a416f40879349c5ac0bc71aba7b8beaa5216cd9 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Mon, 15 Apr 2013 05:17:55 +0000 Subject: [PATCH 04/52] Give random image page an imgur colour scheme * Sorted and formatted CSS * Pushed "Loading..." callout to left * Gave callout a curved edge * Coloured the background black * Coloured the callout text green * Coloured the callout background grey * Changed callout font to sans-serif * Increased callout padding --- public/imgurr.css | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index 5f169a5..58b668d 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -1,15 +1,30 @@ -html, body { margin: 0; padding: 0; height: 100%; } -#container, #image { - margin: 0; padding: 0; - max-height: 100%; +#container { + text-align:center; } -#container { text-align: center; } -#loading { - background: rgba(255, 0, 0, 0.8); - display: none; - position: absolute; - top: 50px; - left: 30px; - padding: 10px; - color: #EFEFEF; + +#container,#image { + margin:0; + max-height:100%; + padding:0; +} + +#loading { + background:rgba(43,43,43,0.8); + border-bottom-right-radius:5px; + border-top-right-radius:5px; + color:#85bf25; + display:none; + font-family:sans-serif; + font-weight:700; + left:0; + padding:20px; + position:absolute; + top:50px; +} + +html,body { + background-color:#121211; + height:100%; + margin:0; + padding:0; } From 37a37c97b9f5f608f465380a7d882367c5c42fb3 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 15 Apr 2013 21:55:50 +0000 Subject: [PATCH 05/52] img count --- views/imgur/imgurr.jade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 63148cb..517e9fe 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -6,7 +6,10 @@ html(lang='en') link(rel="stylesheet", href="/imgurr.css") title random imgur script + var count = 0; function wat() { + count += 1; + $('#loading').text('Loading image ' + count); $('#loading').show(); $('#image').load(function(){$('#loading').hide(); console.log('loaded')}); $.get("/api/imgur/getRandomImage", function(d) {$('#image').attr('src', d.data[0])}, "json"); From 3b5ef9f55e61bf1c7a3eab3e93d3173ee8f2d2bb Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 16:42:57 +0000 Subject: [PATCH 06/52] Show info about the imgur url on the random page --- modules/imgur/imgur.js | 19 +++++++++++++------ public/imgurr.css | 1 - views/imgur/imgurr.jade | 20 ++++++++++++-------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index e84a4a9..11ea1c3 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -9,12 +9,11 @@ var _ = require('underscore')._, var imgur = function(dbot) { this.internalAPI = { 'infoString': function(imgData) { - info = null; + info = ''; if(imgData && _.has(imgData, 'data')) { imgData = imgData.data; - info = '['; if(imgData.title) { - info += imgData.title + ']['; + info += imgData.title + ' - '; } if(imgData.type) { if(imgData.animated) { @@ -26,7 +25,7 @@ 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; @@ -55,6 +54,12 @@ 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', @@ -69,13 +74,15 @@ var imgur = function(dbot) { }; 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,7 +93,7 @@ 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); diff --git a/public/imgurr.css b/public/imgurr.css index 58b668d..f2a0cff 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -13,7 +13,6 @@ border-bottom-right-radius:5px; border-top-right-radius:5px; color:#85bf25; - display:none; font-family:sans-serif; font-weight:700; left:0; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 517e9fe..1a1440b 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -7,15 +7,19 @@ html(lang='en') title random imgur script var count = 0; - function wat() { + function getNewImage() { count += 1; - $('#loading').text('Loading image ' + count); - $('#loading').show(); - $('#image').load(function(){$('#loading').hide(); console.log('loaded')}); - $.get("/api/imgur/getRandomImage", function(d) {$('#image').attr('src', d.data[0])}, "json"); - }; - $(wat()); - $(document).on('keydown', function(e){(e.which==32)&&(wat()) }); + $('#loading').text('Loading image ' + count + '...'); + $('#image').load(function(){}); + $.get("/api/imgur/getRandomImage", function(d) { + $('#image').attr('src', d.data[0]); + $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { + $("#loading").text(count + ': ' + info.data[0]); + }, "json"); + }, "json"); + } + $(getNewImage()); + $(document).on('keydown', function(e){(e.which==32)&&(getNewImage()) }); body div#loading Loading Image div#container From 1a2595aaf26fdcc8862be7aa71d53895970248ab Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 17:22:09 +0000 Subject: [PATCH 07/52] increment size with image count This commit adds functionality to the loading callout in the imgur module. The size of the font used in the loading callout now increases in a linear fashion in proportion to the number of images viewed in a row. The size starts at 12px, and will increase to 72px at image 2000, with round figures at most "standard" font sizes. This is largely an experiment to see what it looks like: it might not be as nice looking now that the callout contains extra information (such as the view count). It may be worth experimenting with just increasing the count number and leaving the "a w with x views (y*z)" message at a static size, or perhaps by editing the colour variant, or even the position on the screen. I really just wanted some feedback to make it a bit more interesting for a heavy user that has reached high numbers of images. Some figures: * 12px is reached after 0 images * 14px is reached after 66 images * 16px is reached after 133 images * 18px is reached after 200 images * 21px is reached after 300 images * 24px is reached after 400 images * 36px is reached after 800 images * 48px is reached after 1,200 images * 60px is reached after 1,600 images * 72px is reached after 2,000 images * 144px is reached after 4,400 images. --- public/imgurr.css | 1 + views/imgur/imgurr.jade | 1 + 2 files changed, 2 insertions(+) diff --git a/public/imgurr.css b/public/imgurr.css index f2a0cff..7d54561 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -14,6 +14,7 @@ border-top-right-radius:5px; color:#85bf25; font-family:sans-serif; + font-size:12px; font-weight:700; left:0; padding:20px; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 1a1440b..2271135 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -10,6 +10,7 @@ html(lang='en') function getNewImage() { count += 1; $('#loading').text('Loading image ' + count + '...'); + $('#loading').css('font-size', ((count * 0.03) + 12)); $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); From 9b191bc89a4081740a6e59a885908c6150e2a35d Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 17:47:01 +0000 Subject: [PATCH 08/52] Add new "details" box to random imgur page This commit adds a new box to the imgur page, separating the "Loading..." box with a new "details" box, which contains the information found via the API. The loading box appears on the left, and disappears when an image is loaded, to be replaced with a box on the right. API operations, such as a "report" or "submit to gallery" option, could appear below the current right-aligned box, in a smaller font. I'm undecided as to whether this commit is an improvement or not. --- public/imgurr.css | 19 +++++++++++++++---- views/imgur/imgurr.jade | 7 ++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index 7d54561..daaf1d7 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -8,20 +8,31 @@ padding:0; } -#loading { +#loading, #details{ background:rgba(43,43,43,0.8); - border-bottom-right-radius:5px; - border-top-right-radius:5px; color:#85bf25; font-family:sans-serif; font-size:12px; font-weight:700; - left:0; padding:20px; position:absolute; top:50px; } +#details { + right:0; + text-align:right; + border-bottom-left-radius:5px; + border-top-left-radius:5px + display:none; +} + +#loading { + left:0; + border-bottom-right-radius:5px; + border-top-right-radius:5px; +} + html,body { background-color:#121211; height:100%; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 2271135..2818bc0 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -9,13 +9,17 @@ html(lang='en') var count = 0; function getNewImage() { count += 1; + $('#details').hide(); $('#loading').text('Loading image ' + count + '...'); $('#loading').css('font-size', ((count * 0.03) + 12)); + $('#loading').show(); $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { - $("#loading").text(count + ': ' + info.data[0]); + $("#details").text(count + ': ' + info.data[0]); + $('#details').show(); + $('#loading').hide(); }, "json"); }, "json"); } @@ -23,5 +27,6 @@ html(lang='en') $(document).on('keydown', function(e){(e.which==32)&&(getNewImage()) }); body div#loading Loading Image + div#details Press [SPACE] to load a new image div#container img#image From 3cdaa4b9a6fb0357f5b8387b0ff53ac01434591c Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 17:51:03 +0000 Subject: [PATCH 09/52] move css around This commit moves the font-size declaration from the common box CSS to only affecting the "loading" box. --- public/imgurr.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/imgurr.css b/public/imgurr.css index daaf1d7..e9d43cd 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -12,7 +12,6 @@ background:rgba(43,43,43,0.8); color:#85bf25; font-family:sans-serif; - font-size:12px; font-weight:700; padding:20px; position:absolute; @@ -29,6 +28,7 @@ #loading { left:0; + font-size:12px; border-bottom-right-radius:5px; border-top-right-radius:5px; } From 2f11e9fa0ecbfde937938c4b7d90c3cfe5bd62c3 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 17:58:37 +0000 Subject: [PATCH 10/52] count api/http/images generated by imgur --- modules/imgur/imgur.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index 11ea1c3..40910a8 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -7,6 +7,7 @@ var _ = require('underscore')._, request = require('request'); var imgur = function(dbot) { + this.db = dbot.db.imgur; this.internalAPI = { 'infoString': function(imgData) { info = ''; @@ -29,7 +30,7 @@ var imgur = function(dbot) { } return info; - } + }.bind(this) }; this.api = { @@ -44,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); @@ -68,8 +71,9 @@ var imgur = function(dbot) { 'Authorization': 'Client-ID 86fd3a8da348b65' } }, function(err, response, body) { + this.db.totalApiRequests += 1; callback(body); - }); + }.bind(this)); } }; this.api['getRandomImage'].external = true; @@ -99,6 +103,9 @@ var imgur = function(dbot) { }.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); }; From dcf03287f8238652bd4d3e1a898f0add98abb893 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 17:59:41 +0000 Subject: [PATCH 11/52] forgit config file --- modules/imgur/config.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 modules/imgur/config.json diff --git a/modules/imgur/config.json b/modules/imgur/config.json new file mode 100644 index 0000000..33cc3fa --- /dev/null +++ b/modules/imgur/config.json @@ -0,0 +1,4 @@ +{ + "dbKeys": [ "imgur" ], + "dependencies": [ "web", "api" ] +} From 52e6561f51efa7bce301df96da4c432fe7fe3c40 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 18:06:03 +0000 Subject: [PATCH 12/52] dirty hack til i sort the thing thing out --- modules/web/config.json | 4 ++-- views/imgur/imgurr.jade | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/web/config.json b/modules/web/config.json index f714ecc..1b7646b 100644 --- a/modules/web/config.json +++ b/modules/web/config.json @@ -1,6 +1,6 @@ { - "webHost": "localhost", - "webPort": 8080, + "webHost": "nourishedcloud.com", + "webPort": 9001, "externalPath": false, "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" } diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 1a1440b..3bcc1e8 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -9,12 +9,17 @@ html(lang='en') var count = 0; function getNewImage() { count += 1; + $('#loading').show(); $('#loading').text('Loading image ' + count + '...'); $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { - $("#loading").text(count + ': ' + info.data[0]); + if(info.data[0].indexOf('undefined') == -1) { + $("#loading").text(count + ': ' + info.data[0]); + } else { + $("#loading").hide(); + } }, "json"); }, "json"); } From 9b3e3ec48e72419311c4fa9ad37e78ea76e56844 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 18:07:11 +0000 Subject: [PATCH 13/52] fuck web/config.json --- modules/web/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/web/config.json b/modules/web/config.json index 1b7646b..e6b635e 100644 --- a/modules/web/config.json +++ b/modules/web/config.json @@ -1,6 +1,6 @@ { "webHost": "nourishedcloud.com", - "webPort": 9001, + "webPort": 8080, "externalPath": false, "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" } From e7540a35078134ae7aa0c7d43f1d7ad05a6000a9 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 18:59:29 +0000 Subject: [PATCH 14/52] stats on web --- modules/imgur/pages.js | 10 +++++++++- views/imgur/imgurstats.jade | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 views/imgur/imgurstats.jade diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js index e257b40..42b7d0d 100644 --- a/modules/imgur/pages.js +++ b/modules/imgur/pages.js @@ -3,7 +3,15 @@ var _ = require('underscore')._; var pages = function(dbot) { return { '/imgur/random': function(req, res) { - res.render('imgurr', { + res.render('imgurr', { }); + }, + + '/imgur/stats': function(req, res) { + res.render('imgurstats', { + 'name': dbot.config.name, + 'totalHttpRequests': this.db.totalHttpRequests, + 'totalApiRequests': this.db.totalApiRequests, + 'totalImages': this.db.totalImages }); } }; diff --git a/views/imgur/imgurstats.jade b/views/imgur/imgurstats.jade new file mode 100644 index 0000000..0ede32d --- /dev/null +++ b/views/imgur/imgurstats.jade @@ -0,0 +1,9 @@ +extends ../layout + +block content + div#http + Total Imgur HTTP requests made: #{totalHttpRequests} + div#api + Total Imgur API requests made: #{totalApiRequests} + div#images + Total Images generated: #{totalImages} From 2b9dbea855ece511f792e8d927574247df16a751 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 21:03:50 +0000 Subject: [PATCH 15/52] improve imgur module * Added config.json to the party * Moved API key (client ID) to the configuration file * Added image link to random imgur image page * Minimised loading message * Added fade to loading message * Added count to title attribute of webpage * Removed font-size increase * Added placeholders --- modules/imgur/config.json | 5 +++ modules/imgur/imgur.js | 2 +- public/imgurr.css | 64 +++++++++++++++++++++++---------------- views/imgur/imgurr.jade | 13 +++++--- 4 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 modules/imgur/config.json diff --git a/modules/imgur/config.json b/modules/imgur/config.json new file mode 100644 index 0000000..ac6af71 --- /dev/null +++ b/modules/imgur/config.json @@ -0,0 +1,5 @@ +{ + "imagelength": 5, + "nsfwwarn": true, + "apikey": "xxxxxxxxx" +} diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index 11ea1c3..16c9f2c 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -65,7 +65,7 @@ var imgur = function(dbot) { '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) { callback(body); diff --git a/public/imgurr.css b/public/imgurr.css index e9d43cd..f7ad728 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -1,41 +1,53 @@ #container { - text-align:center; + text-align:center; } #container,#image { - margin:0; - max-height:100%; - padding:0; -} - -#loading, #details{ - background:rgba(43,43,43,0.8); - color:#85bf25; - font-family:sans-serif; - font-weight:700; - padding:20px; - position:absolute; - top:50px; + margin:0; + max-height:100%; + padding:0; } #details { - right:0; - text-align:right; - border-bottom-left-radius:5px; - border-top-left-radius:5px display:none; + font-weight:700; + left:25px; + min-width:280px; + padding:20px; + text-align:center; + top:25px; +} + +#link { + left:25px; + text-align:center; + width:168px; +} + +#link,#loading { + font-family:monospace; + font-size:10px; + padding:10px; + top:95px; } #loading { - left:0; - font-size:12px; - border-bottom-right-radius:5px; - border-top-right-radius:5px; + font-weight:500; + left:220px; + min-width:95px; +} + +#loading,#details,#link { + background:rgba(43,43,43,0.8); + border-radius:5px; + color:#85bf25; + font-family:sans-serif; + position:absolute; } html,body { - background-color:#121211; - height:100%; - margin:0; - padding:0; + background-color:#121211; + height:100%; + margin:0; + padding:0; } diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 2818bc0..79a671a 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -9,24 +9,27 @@ html(lang='en') var count = 0; function getNewImage() { count += 1; - $('#details').hide(); $('#loading').text('Loading image ' + count + '...'); - $('#loading').css('font-size', ((count * 0.03) + 12)); - $('#loading').show(); + document.title = 'random imgur (' + count + ')'; + $('#loading').fadeIn(); $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); + $('#details').text("Fetching info..."); + $('#link').text(d.data[0]); + $('#link').attr('href',d.data[0]); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { $("#details").text(count + ': ' + info.data[0]); $('#details').show(); - $('#loading').hide(); + $('#loading').fadeOut(); }, "json"); }, "json"); } $(getNewImage()); $(document).on('keydown', function(e){(e.which==32)&&(getNewImage()) }); body - div#loading Loading Image + div#loading Loading image 1... div#details Press [SPACE] to load a new image + a#link [SPACE] for next div#container img#image From 33e2e12086efe67afbbd53d74ab6b78b16c1454b Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 21:08:00 +0000 Subject: [PATCH 16/52] recommit api key --- modules/imgur/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgur/config.json b/modules/imgur/config.json index ac6af71..d8cf5a3 100644 --- a/modules/imgur/config.json +++ b/modules/imgur/config.json @@ -1,5 +1,5 @@ { "imagelength": 5, "nsfwwarn": true, - "apikey": "xxxxxxxxx" + "apikey": "86fd3a8da348b65 " } From 06054bdbf14d308588b9e4fd4f8d221ef3b59727 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 21:19:52 +0000 Subject: [PATCH 17/52] revert web again --- modules/web/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/web/config.json b/modules/web/config.json index 1b7646b..e6b635e 100644 --- a/modules/web/config.json +++ b/modules/web/config.json @@ -1,6 +1,6 @@ { "webHost": "nourishedcloud.com", - "webPort": 9001, + "webPort": 8080, "externalPath": false, "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" } From 4b935bcd9bb88f9e64d04a8cda06b201dcba0cc0 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 21:22:23 +0000 Subject: [PATCH 18/52] config syntax --- modules/imgur/config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgur/config.json b/modules/imgur/config.json index a311754..0cf674b 100644 --- a/modules/imgur/config.json +++ b/modules/imgur/config.json @@ -1,7 +1,7 @@ { "dbKeys": [ "imgur" ], - "dependencies": [ "web", "api" ] - "imagelength": 5, - "nsfwwarn": true, - "apikey": "86fd3a8da348b65" + "dependencies": [ "web", "api" ], + "imagelength": 5, + "nsfwwarn": true, + "apikey": "86fd3a8da348b65" } From cd6678f12b3ee2457f4528909e0708359ee6b0b9 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 16 Apr 2013 21:30:07 +0000 Subject: [PATCH 19/52] change link to be monospace The proportional font on a centred piece of text with a predictable number of letters annoyed me a bit. --- public/imgurr.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/imgurr.css b/public/imgurr.css index f7ad728..650a02e 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -22,6 +22,7 @@ left:25px; text-align:center; width:168px; + font-family:monospace } #link,#loading { From 4c26a0fc3a61394ecad0e88d2edafd81728f2dfd Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 17 Apr 2013 20:02:36 +0000 Subject: [PATCH 20/52] add history --- public/imgurr.css | 45 ++++++++++++++++++++++++++++++++++++----- views/imgur/imgurr.jade | 22 ++++++++++---------- 2 files changed, 51 insertions(+), 16 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index 650a02e..0ec21f2 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -18,31 +18,36 @@ top:25px; } -#link { +#history a { left:25px; text-align:center; width:168px; font-family:monospace + margin-bottom:15px; } -#link,#loading { +#history a,#loading { font-family:monospace; font-size:10px; padding:10px; - top:95px; + display:block; } + #loading { font-weight:500; left:220px; min-width:95px; + top:95px; } -#loading,#details,#link { +#loading,#details,#history a { background:rgba(43,43,43,0.8); border-radius:5px; color:#85bf25; - font-family:sans-serif; +} + +#history,#loading,#details { position:absolute; } @@ -52,3 +57,33 @@ html,body { margin:0; padding:0; } + +#history { + top:95px; + left:25px; + max-height:210x; + overflow:hidden; +} +#history a { + margin-bottom:10px; + opacity:0.05; +} + +#details { + font-family:sans-serif; +} +#history a:hover, #history a:nth-of-type(1) { + opacity:1 !important; +} +#history a:nth-of-type(2) { + opacity:0.8; +} +#history a:nth-of-type(3) { + opacity:0.6; +} +#history a:nth-of-type(4) { + opacity:0.4; +} +#history a:nth-of-type(5) { + opacity:0.2; +} diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 0db41a2..0cb8154 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -9,7 +9,7 @@ html(lang='en') var count = 0; function getNewImage() { count += 1; - $('#loading').show(); + $('#loading').fadeIn(); $('#loading').text('Loading image ' + count + '...'); document.title = 'random imgur (' + count + ')'; $('#loading').fadeIn(); @@ -17,16 +17,15 @@ html(lang='en') $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); $('#details').text("Fetching info..."); - $('#link').text(d.data[0]); - $('#link').attr('href',d.data[0]); + $('' + d.data[0] + '').prependTo('#history').hide().slideDown(); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { - if(info.data[0].indexOf('undefined') == -1) { - $("#details").text(count + ': ' + info.data[0]); - $('#details').show(); - } else { - $("#details").hide(); - } - $('#loading').fadeOut(); + if(info.data[0].indexOf('undefined') == -1) { + $("#details").text(count + ': ' + info.data[0]); + $('#details').show(); + } else { + $("#details").hide(); + } + $('#loading').fadeOut(); }, "json"); }, "json"); } @@ -35,6 +34,7 @@ html(lang='en') body div#loading Loading image 1... div#details Press [SPACE] to load a new image - a#link [SPACE] for next + div#history + a Press [SPACE] for next div#container img#image From 46932f458c45583444aef01824f5516f537dad27 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 17 Apr 2013 20:04:02 +0000 Subject: [PATCH 21/52] fix cap of 5 --- public/imgurr.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index 0ec21f2..d4620ba 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -61,12 +61,12 @@ html,body { #history { top:95px; left:25px; - max-height:210x; + max-height:210px; overflow:hidden; } #history a { margin-bottom:10px; - opacity:0.05; + opacity:0.1; /* won't display anyway due to #history max height */ } #details { From bbece26213c6fb4d8498302f54e1794084768962 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 17 Apr 2013 20:55:34 +0000 Subject: [PATCH 22/52] Convert history to list; add toggle for scrollbars * Added function to display message * Added ``s`` hotkey to toggle the scrollbar * Added ``max-width`` --- public/imgurr.css | 32 +++++++++++++++++++++++--------- views/imgur/imgurr.jade | 21 +++++++++++++++++---- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index d4620ba..e7ed0b1 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -2,11 +2,23 @@ text-align:center; } +body.crop { + overflow:hidden; +} + +#history { + padding:0; + margin:0; +} #container,#image { margin:0; max-height:100%; + max-width:100%; padding:0; } +a { + color:inherit; +} #details { display:none; @@ -18,7 +30,7 @@ top:25px; } -#history a { +#history li { left:25px; text-align:center; width:168px; @@ -26,7 +38,7 @@ margin-bottom:15px; } -#history a,#loading { +#history li,#loading { font-family:monospace; font-size:10px; padding:10px; @@ -41,7 +53,7 @@ top:95px; } -#loading,#details,#history a { +#loading,#details,#history li { background:rgba(43,43,43,0.8); border-radius:5px; color:#85bf25; @@ -56,6 +68,8 @@ html,body { height:100%; margin:0; padding:0; + border:0; + overflow:auto; } #history { @@ -64,7 +78,7 @@ html,body { max-height:210px; overflow:hidden; } -#history a { +#history li { margin-bottom:10px; opacity:0.1; /* won't display anyway due to #history max height */ } @@ -72,18 +86,18 @@ html,body { #details { font-family:sans-serif; } -#history a:hover, #history a:nth-of-type(1) { +#history li:hover, #history li:nth-of-type(1) { opacity:1 !important; } -#history a:nth-of-type(2) { +#history li:nth-of-type(2) { opacity:0.8; } -#history a:nth-of-type(3) { +#history li:nth-of-type(3) { opacity:0.6; } -#history a:nth-of-type(4) { +#history li:nth-of-type(4) { opacity:0.4; } -#history a:nth-of-type(5) { +#history li:nth-of-type(5) { opacity:0.2; } diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 0cb8154..fd7d7d0 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -7,6 +7,9 @@ html(lang='en') title random imgur script var count = 0; + function giveMessage(msg) { + $('
  • '+msg+'
  • ').prependTo('#history').hide().slideDown(); + } function getNewImage() { count += 1; $('#loading').fadeIn(); @@ -17,7 +20,7 @@ html(lang='en') $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); $('#details').text("Fetching info..."); - $('' + d.data[0] + '').prependTo('#history').hide().slideDown(); + giveMessage('' + d.data[0] + ''); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { if(info.data[0].indexOf('undefined') == -1) { $("#details").text(count + ': ' + info.data[0]); @@ -30,11 +33,21 @@ html(lang='en') }, "json"); } $(getNewImage()); - $(document).on('keydown', function(e){(e.which==32)&&(getNewImage()) }); + $(document).on('keydown', function(e){ + switch(e.which){ + case 13: // enter + case 32: // space + getNewImage(); + break; + case 83: // s + $('body').toggleClass('crop'); + giveMessage("Toggled scrollbars.") + }; + }); body div#loading Loading image 1... div#details Press [SPACE] to load a new image - div#history - a Press [SPACE] for next + ul#history + li Press [SPACE] for next div#container img#image From c9fd314ba4d56fbf45bf3e649ffb19f6f1b6205e Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 17 Apr 2013 21:03:40 +0000 Subject: [PATCH 23/52] tidy css --- public/imgurr.css | 95 +++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/public/imgurr.css b/public/imgurr.css index e7ed0b1..a5ceae0 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -2,26 +2,16 @@ text-align:center; } -body.crop { - overflow:hidden; -} - -#history { - padding:0; - margin:0; -} #container,#image { margin:0; max-height:100%; max-width:100%; padding:0; } -a { - color:inherit; -} #details { display:none; + font-family:sans-serif; font-weight:700; left:25px; min-width:280px; @@ -30,21 +20,54 @@ a { top:25px; } -#history li { +#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; - font-family:monospace - margin-bottom:15px; } #history li,#loading { + display:block; font-family:monospace; font-size:10px; padding:10px; - display:block; } +#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 { + position:absolute; +} #loading { font-weight:500; @@ -59,45 +82,19 @@ a { color:#85bf25; } -#history,#loading,#details { - position:absolute; +a { + color:inherit; +} + +body.crop { + overflow:hidden; } html,body { background-color:#121211; + border:0; height:100%; margin:0; - padding:0; - border:0; overflow:auto; -} - -#history { - top:95px; - left:25px; - max-height:210px; - overflow:hidden; -} -#history li { - margin-bottom:10px; - opacity:0.1; /* won't display anyway due to #history max height */ -} - -#details { - font-family:sans-serif; -} -#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; + padding:0; } From 5d41cc633c1ea368519ff959d30c82d1f1521811 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 17 Apr 2013 21:30:05 +0000 Subject: [PATCH 24/52] calm down, man Add throttle to the spacebar, so you can no longer load another image whilst the old one is loading. Hopefully this'll negate some of the API failures we've been getting. --- views/imgur/imgurr.jade | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index fd7d7d0..a5f4f4d 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -10,8 +10,10 @@ html(lang='en') function giveMessage(msg) { $('
  • '+msg+'
  • ').prependTo('#history').hide().slideDown(); } + var lock = false function getNewImage() { count += 1; + lock = true; $('#loading').fadeIn(); $('#loading').text('Loading image ' + count + '...'); document.title = 'random imgur (' + count + ')'; @@ -19,6 +21,7 @@ html(lang='en') $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); + lock = false; $('#details').text("Fetching info..."); giveMessage('' + d.data[0] + ''); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { @@ -37,7 +40,13 @@ html(lang='en') switch(e.which){ case 13: // enter case 32: // space - getNewImage(); + if (lock) { + $('#loading').text(function(index, text){ + return text.replace(/\.(?=[^.]*$)/, "!"); + }); + } else { + getNewImage(); + } break; case 83: // s $('body').toggleClass('crop'); From d87d6eeeb0b31693f37329f2e5b2aef6efae4d25 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 08:37:30 +0000 Subject: [PATCH 25/52] update gitignore --- .gitignore | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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/ From 2a4698c982e586e2bb0c792f5dc8c05c9f41d6a8 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 11:06:13 +0000 Subject: [PATCH 26/52] push out WIP --- modules/project/pages.js | 44 ++++++++++++++++++++++++++++++++++++ modules/project/project.js | 14 ++++++++++++ modules/project/strings.json | 36 +++++++++++++++++++++++++++++ views/project/project.jade | 19 ++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 modules/project/pages.js create mode 100644 modules/project/project.js create mode 100644 modules/project/strings.json create mode 100644 views/project/project.jade diff --git a/modules/project/pages.js b/modules/project/pages.js new file mode 100644 index 0000000..c35ac54 --- /dev/null +++ b/modules/project/pages.js @@ -0,0 +1,44 @@ +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, + "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], + "name": dbot.config.name + }), + "projectstatus": dbot.strings["projectstatus"][lang], + "revnum": dbot.strings["revnum"][lang].format({ + "name": dbot.config.name, + "rev": rev, + "ver": "abcdef" // TODO, obviously + }), + "modules": dbot.config.moduleNames, + "loadmod": dbot.strings["loadedmodules"][lang] + }); + }, + }; +}; + +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..7f4c498 --- /dev/null +++ b/modules/project/project.js @@ -0,0 +1,14 @@ +/** + * Module Name: imgur + * Description: Various imgur functionality + */ + +var _ = require('underscore')._, + request = require('request'); + +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..6c8119f --- /dev/null +++ b/modules/project/strings.json @@ -0,0 +1,36 @@ +{ + "dbotspeaks": { + "en": "{name} speaks {lang} ({langen})", + "de": "{name} spricht {lang} ({langen})", + "fr": "{name} parle {lang} ({langen})" + }, + "en": { + "en": "English", + "fr": "anglais", + "de": "Englisch" + }, + "fr": { + "en": "French", + "fr": "français", + "de": "Französisch" + }, + "de": { + "en": "German", + "fr": "allemande", + "de": "Deutsch" + }, + "projectstatus": { + "en": "Project Status", + "fr": "Situation du Projet", + "de": "Projektstatus" + }, + "revnum": { + "en": "{name} is at revision {rev} ({ver})", + "fr": "{name} est à révision {rev} ({ver})", + "de": "{name} ist in der Revision {rev} ({ver})" + }, + "loadedmodules": { + "en": "Loaded modules", + "fr": "Modules chargés" + } +} diff --git a/views/project/project.jade b/views/project/project.jade new file mode 100644 index 0000000..70a81ee --- /dev/null +++ b/views/project/project.jade @@ -0,0 +1,19 @@ +extends ../layout + +block content + h2 #{projectstatus} + section#git + h3 Git + p + #{revnum} + section#config + h3 Configuration + ul + li #{currlang} + h4 #{loadmod} + ul + each module in modules + li #{module} + section#footer + p + #{currver} From d3f8e295beff8a14a2b92ce67d7967398e122208 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 11:45:15 +0000 Subject: [PATCH 27/52] convert to dbot.t; add Italian; add debugMode --- modules/project/pages.js | 28 +++++++------------- modules/project/strings.json | 51 +++++++++++++++++++++++++++++------- views/project/project.jade | 1 + 3 files changed, 51 insertions(+), 29 deletions(-) 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 From 985b53c768dcbe1eb42b3119699f295b451fc5c7 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 14:30:00 +0000 Subject: [PATCH 28/52] Add milestone + Bump github + Fix Italian translation of revision count + Add translation of git to strings.json (bonus points if you find a language that needs it) --- modules/github | 2 +- modules/project/pages.js | 25 ++++++++++++++++++++++--- modules/project/strings.json | 36 +++++++++++++++++++++++++++++++++--- views/project/project.jade | 15 +++++++++++++-- 4 files changed, 69 insertions(+), 9 deletions(-) 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/project/pages.js b/modules/project/pages.js index eb6149c..c5b64ca 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -1,8 +1,19 @@ -var exec = require('child_process').exec; +var exec = require('child_process').exec, + request = require('request'); var pages = function(dbot) { var rev; - exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); + exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); + var gstatus; + dbot.api.github.githubStatus(function(a){gstatus = a}); + + /* TODO: merge back into github module */ + var milestones; + request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones", function(e, r, b){ + milestones = JSON.parse(b); + }); + + return { '/project': function(req, res) { res.render('project', { @@ -23,7 +34,15 @@ var pages = function(dbot) { }), "modules": dbot.config.moduleNames, "loadmod": dbot.t("loadedmodules"), - "debugmode": dbot.t("debugmode-" + dbot.config.debugMode) + "debugmode": dbot.t("debugmode-" + dbot.config.debugMode), + "githubstatus": gstatus, + "milestones": milestones, + "milestoneprog": dbot.t("milestoneprog"), + "config": dbot.t("configoptions"), + "milestonename": dbot.t("milestonename"), + "openmilestone": dbot.t("openmilestone"), + "closedmilestone": dbot.t("closedmilestone") + }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 592ba0c..1214a67 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -39,18 +39,18 @@ "en": "{name} is at revision {rev} ({ver})", "fr": "{name} est à révision {rev} ({ver})", "de": "{name} ist in der Revision {rev} ({ver})", - "it": "{name} è il numero di revisione {rev} ({ver})" + "it": "{name} il numero di revisione {rev} ({ver})" }, "loadedmodules": { "en": "loaded modules", "fr": "modules chargés", "it": "moduli caricati" }, - "configuration": { + "configoptions": { "en": "Configuration", "fr": "Configuration", "de": "Konfiguration", - "it": "configuazione" + "it": "Configuazione" }, "debugmode-true": { "en": "Debug mode active", @@ -63,5 +63,35 @@ "fr": "debug éteint", "de": "Debug ausgeschaltet", "it": "debug spento" + }, + "milestoneprog": { + "en": "Progress", + "fr": "Progression", + "de": "Fortschritt", + "it": "sviluppo" + }, + "openmilestone": { + "en": "Open", + "fr": "Ouvert", + "de": "Offen", + "it": "Aperto" + }, + "closedmilestone": { + "en": "Closed", + "fr": "Fermé", + "de": "Gesperrt", + "it": "Chiuso" + }, + "milestonename": { + "en": "Name", + "fr": "Nom", + "de": "Name", + "it": "Nome" + }, + "git": { + "en": "Git", + "fr": "Git", + "de": "Git", + "it": "Git" } } diff --git a/views/project/project.jade b/views/project/project.jade index ecfe3f7..2f1c7ed 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -5,9 +5,20 @@ block content section#git h3 Git p - #{revnum} + #{revnum} + h4 #{milestoneprog} + table + tr + th #{milestonename} + th #{openmilestone} + th #{closedmilestone} + each milestone in milestones + tr + td #{milestone.title} + td #{milestone.open_issues} + td #{milestone.closed_issues} section#config - h3 Configuration + h3 #{config} ul li #{currlang} li #{debugmode} From f7dbe778389e4a539d5105971522b997b7ad1b0c Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 16:12:01 +0000 Subject: [PATCH 29/52] Format stuff ## Changelog: - Remove Github status call. + Closed issues + Localised

    + Add introductory paragraph + Add last diff to page - Remove jade include to layout.jade + Dynamic language metadata + CSS + Progress bars ## Known issues: * Loading the closed milestones raises an exception for some reason; in a try-catch for now, unsure how to fix. ## Still to do: * Style loaded modules section (columns?) * Shrink footer * Do we need a shorthand hash by the revision? * Pull req count? (low priority) --- modules/project/pages.js | 24 ++++++--- modules/project/strings.json | 15 +++--- views/project/project.jade | 96 ++++++++++++++++++++++++------------ 3 files changed, 92 insertions(+), 43 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index c5b64ca..d39444b 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -3,14 +3,21 @@ var exec = require('child_process').exec, var pages = function(dbot) { var rev; - exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); - var gstatus; - dbot.api.github.githubStatus(function(a){gstatus = a}); + exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); + var diff; + 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", function(e, r, b){ milestones = JSON.parse(b); + request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=closed", function (a, c, d){ + var milestones2 = []; + try{ + milestones2 = JSON.parse(c); + } catch(e){} + milestones = milestones.concat(milestones2) + }); }); @@ -18,6 +25,9 @@ var pages = function(dbot) { '/project': function(req, res) { 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",{ @@ -35,14 +45,16 @@ var pages = function(dbot) { "modules": dbot.config.moduleNames, "loadmod": dbot.t("loadedmodules"), "debugmode": dbot.t("debugmode-" + dbot.config.debugMode), - "githubstatus": gstatus, "milestones": milestones, "milestoneprog": dbot.t("milestoneprog"), "config": dbot.t("configoptions"), "milestonename": dbot.t("milestonename"), "openmilestone": dbot.t("openmilestone"), - "closedmilestone": dbot.t("closedmilestone") - + "closedmilestone": dbot.t("closedmilestone"), + "diff": diff, + "pagetitle": dbot.t("pagetitle", { + "botname": dbot.config.name + }) }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 1214a67..fcbd253 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -1,10 +1,19 @@ { + "dbotintro": { + "en": "{botname} lorem ipsum dolor sit amet" + }, "dbotspeaks": { "en": "{name} speaks {lang} ({langen})", "de": "{name} spricht {lang} ({langen})", "fr": "{name} parle {lang} ({langen})", "it": "{name} parla {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", @@ -29,12 +38,6 @@ "de": "Italienier", "it": "italiano" }, - "projectstatus": { - "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})", diff --git a/views/project/project.jade b/views/project/project.jade index 2f1c7ed..e822db3 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -1,31 +1,65 @@ -extends ../layout - -block content - h2 #{projectstatus} - section#git - h3 Git - p - #{revnum} - h4 #{milestoneprog} - table - tr - th #{milestonename} - th #{openmilestone} - th #{closedmilestone} - each milestone in milestones - tr - td #{milestone.title} - td #{milestone.open_issues} - td #{milestone.closed_issues} - section#config - h3 #{config} - ul - li #{currlang} - li #{debugmode} - h4 #{loadmod} - ul - each module in modules - li #{module} - section#footer - p - #{currver} +!!! +html(lang='#{curr839}') + 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", type="text/css", href="http://fonts.googleapis.com/css?family=Source+Sans+Pro") + link(rel="stylesheet", type="text/css", href="/bootstrap/css/bootstrap.min.css") + link(rel='stylesheet', type='text/css', href='/styles.css') + link(rel="stylesheet", href="/project.css") + title #{pagetitle} + script(type="text/javascript", src="/project.js") + - var mstone = "milestone" + style(type="text/css") + each milestone in milestones + - current = mstone+milestone.number + - wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100) + .current { width: wdth% } + body + div.container + div#page + div#title #{pagetitle} + div.container#main + p.intro + #{intro} + section#git + h3 Git + p.center + #{revnum} + pre#gitdiff + #{diff} + h4 #{milestoneprog} + table#milestones.center + tr + th #{milestonename} + th #{milestoneprog} + th #{openmilestone} + th #{closedmilestone} + each milestone in milestones + - var mstone = "milestone" + - var wd = "width:" + - var pc = "%" + - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) + tr(id=mstone+milestone.number) + td #{milestone.title} + td + div.progress(class=milestone.state) + div.progress-inner(style=wd+wdth+pc)(class=milestone.state) +   + td #{milestone.open_issues} + td #{milestone.closed_issues} + section#config + h3 #{config} + ul + li #{currlang} + li #{debugmode} + h4 #{loadmod} + ul + each module in modules + li #{module} + section#footer + p + #{currver} + script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js") + script(type="text/javascript", src="/d3/d3.v3.min.js") + script(type="text/javascript", src="/script.js") From ef2b50863c19bd4b99dc3c151f765f8d4e1fb275 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 16:27:07 +0000 Subject: [PATCH 30/52] Renamed "git" "development" (because I thought having "Development" / "Configuration" would look cool. --- modules/project/pages.js | 1 + modules/project/strings.json | 10 +++++----- views/project/project.jade | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index d39444b..fc5e281 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -51,6 +51,7 @@ var pages = function(dbot) { "milestonename": dbot.t("milestonename"), "openmilestone": dbot.t("openmilestone"), "closedmilestone": dbot.t("closedmilestone"), + "development": dbot.t("development"), "diff": diff, "pagetitle": dbot.t("pagetitle", { "botname": dbot.config.name diff --git a/modules/project/strings.json b/modules/project/strings.json index fcbd253..b130b3d 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -91,10 +91,10 @@ "de": "Name", "it": "Nome" }, - "git": { - "en": "Git", - "fr": "Git", - "de": "Git", - "it": "Git" + "development": { + "en": "Development", + "fr": "Développement", + "de": "Entwicklung", + "it": "Sviluppo" } } diff --git a/views/project/project.jade b/views/project/project.jade index e822db3..bf19ab5 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -23,7 +23,7 @@ html(lang='#{curr839}') p.intro #{intro} section#git - h3 Git + h3 #{development} p.center #{revnum} pre#gitdiff From c157ddf08c51f79e58bef0d87ea64c581433c797 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 16:54:09 +0000 Subject: [PATCH 31/52] Added random quote to header --- modules/project/pages.js | 3 +++ views/project/project.jade | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index fc5e281..637a284 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -2,6 +2,8 @@ var exec = require('child_process').exec, request = require('request'); var pages = function(dbot) { + var depression = dbot.db.quoteArrs[dbot.config.project.quotecat]; + var rev; exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); var diff; @@ -52,6 +54,7 @@ var pages = function(dbot) { "openmilestone": dbot.t("openmilestone"), "closedmilestone": dbot.t("closedmilestone"), "development": dbot.t("development"), + "dquote": depression[Math.floor(Math.random()*depression.length)], "diff": diff, "pagetitle": dbot.t("pagetitle", { "botname": dbot.config.name diff --git a/views/project/project.jade b/views/project/project.jade index bf19ab5..a648b02 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -21,7 +21,7 @@ html(lang='#{curr839}') div#title #{pagetitle} div.container#main p.intro - #{intro} + #{dquote} section#git h3 #{development} p.center From 54beca150191e970b8603727fa5595535922bd7a Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:06:25 +0000 Subject: [PATCH 32/52] Add config options; remove closed milestone count --- modules/project/config.json | 4 ++++ modules/project/pages.js | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 modules/project/config.json diff --git a/modules/project/config.json b/modules/project/config.json new file mode 100644 index 0000000..f31a1c9 --- /dev/null +++ b/modules/project/config.json @@ -0,0 +1,4 @@ +{ + "quotecat":"depressionbot", + "dependencies": ["web", "quotes", "github"] +} diff --git a/modules/project/pages.js b/modules/project/pages.js index 637a284..e2dfd3c 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -11,15 +11,8 @@ var pages = function(dbot) { /* TODO: merge back into github module */ var milestones; - request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones", function(e, r, b){ + request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open", function(e, r, b){ milestones = JSON.parse(b); - request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=closed", function (a, c, d){ - var milestones2 = []; - try{ - milestones2 = JSON.parse(c); - } catch(e){} - milestones = milestones.concat(milestones2) - }); }); From abac2fd97a72b26e84dbd781e0d4fb730503bb3c Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:33:46 +0000 Subject: [PATCH 33/52] Commit CSS. Remove text shadow. --- public/project.css | 63 ++++++++++++++++++++++++++++++++++++++ public/styles.css | 2 -- views/project/project.jade | 2 +- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 public/project.css diff --git a/public/project.css b/public/project.css new file mode 100644 index 0000000..7f769ef --- /dev/null +++ b/public/project.css @@ -0,0 +1,63 @@ +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; +} +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-image: linear-gradient(to bottom,#f4fff4,#f9fff9); +} +div.progress { + margin-top:auto; + margin-bottom:auto; +} +div.progress-inner.open { + width:20%; + background-image: linear-gradient(to bottom,#3fff3f,#7fff7f); +} +div.progress.closed { + background-image: linear-gradient(to bottom,#fff5f5,#fff9f9); +} +div.progress-inner.closed { + background-image: linear-gradient(to bottom,#ff3f3f,#ff7f7f); + width:20%; +} + +#config { + text-align:center; +} + +li { + background-image: linear-gradient(to bottom, #f5ebe2, #f5e6d8); + border:1px solid #f5dcc5; + padding:5px; + margin:5px; + display:inline-block; +} + +* { + text-shadow:none; +} + +#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/project/project.jade b/views/project/project.jade index a648b02..903eb3c 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -54,7 +54,7 @@ html(lang='#{curr839}') li #{currlang} li #{debugmode} h4 #{loadmod} - ul + ul#modules each module in modules li #{module} section#footer From 1534d1451c648989866442010f5b48d7dc5862cf Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:36:43 +0000 Subject: [PATCH 34/52] Remove cruft. - Removed abcdef placeholder from revision total (as the commit is on the line below (in longform). - Removed the English translation of English. --- modules/project/strings.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index b130b3d..a720281 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -3,7 +3,7 @@ "en": "{botname} lorem ipsum dolor sit amet" }, "dbotspeaks": { - "en": "{name} speaks {lang} ({langen})", + "en": "{name} speaks {lang})", "de": "{name} spricht {lang} ({langen})", "fr": "{name} parle {lang} ({langen})", "it": "{name} parla {lang} ({langen})" @@ -39,10 +39,10 @@ "it": "italiano" }, "revnum": { - "en": "{name} is at revision {rev} ({ver})", - "fr": "{name} est à révision {rev} ({ver})", - "de": "{name} ist in der Revision {rev} ({ver})", - "it": "{name} il numero di revisione {rev} ({ver})" + "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}" }, "loadedmodules": { "en": "loaded modules", From 6cf19669676b80e42a20a3e1b6f37f3861c8976a Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:53:13 +0000 Subject: [PATCH 35/52] rm overlooked .js call --- views/project/project.jade | 1 - 1 file changed, 1 deletion(-) diff --git a/views/project/project.jade b/views/project/project.jade index 903eb3c..d86f06a 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -8,7 +8,6 @@ html(lang='#{curr839}') link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") title #{pagetitle} - script(type="text/javascript", src="/project.js") - var mstone = "milestone" style(type="text/css") each milestone in milestones From fd61f09654c389dfe47d4e16bc3b9174ac0ce008 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:59:01 +0000 Subject: [PATCH 36/52] remove errant punctuation --- modules/project/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index a720281..a78ac7d 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -3,7 +3,7 @@ "en": "{botname} lorem ipsum dolor sit amet" }, "dbotspeaks": { - "en": "{name} speaks {lang})", + "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", "fr": "{name} parle {lang} ({langen})", "it": "{name} parla {lang} ({langen})" From c1693a768f59168d8d39b054d8d4d79333e70409 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 18:20:58 +0000 Subject: [PATCH 37/52] Translations, progress bar fallback, lowercasing + Added translations into English for ``cy``, ``es`` and ``na'vi``, to ensure that all possible current languages are catered for. + Added ``background-color`` rule to progress bars on ``project`` to ensure that they are always visible. + Forced lowercase for more of the ``project`` page 'cos it looks nice (although that's an opinion). - Removed redundant text shadow rule. --- modules/project/strings.json | 24 ++++++++++++++++++++++-- public/project.css | 10 ++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index a78ac7d..5afa320 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -18,7 +18,8 @@ "en": "English", "fr": "anglais", "de": "Englisch", - "it": "inglese" + "it": "inglese", + "cy": "saesneg" }, "fr": { "en": "French", @@ -35,9 +36,28 @@ "it": { "en": "Italian", "fr": "italien", - "de": "Italienier", + "de": "Italiener", "it": "italiano" }, + "cy": { + "en": "Welsh", + "fr": "gallois", + "de": "Walisisch", + "it": "gallese", + "cy": "cymraeg" + }, + "na'vi": { + "en": "Na'vi", + "fr": "na'vi", + "de": "Na'vi", + "it": "Na'vi" + }, + "es": { + "en": "Spanish", + "fr": "espagnole", + "de": "Spanisch", + "it": "spagnolo" + }, "revnum": { "en": "{name} is at revision {rev}", "fr": "{name} est à révision {rev}", diff --git a/public/project.css b/public/project.css index 7f769ef..7d382b2 100644 --- a/public/project.css +++ b/public/project.css @@ -9,6 +9,7 @@ div#main { } h2,h3,h4,h5,h6,.center { text-align:center; + text-transform:lowercase; } table#milestones { margin:auto; @@ -24,6 +25,7 @@ p.intro { border-radius:4px; } div.progress.open { + background-color: #f4fff4; background-image: linear-gradient(to bottom,#f4fff4,#f9fff9); } div.progress { @@ -32,18 +34,22 @@ div.progress { } 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 { @@ -54,10 +60,6 @@ li { display:inline-block; } -* { - text-shadow:none; -} - #footer { font-size:80%; } From 93a483a4b3d3f102262012457574a4ee1a9fee82 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 18 Apr 2013 18:57:04 +0000 Subject: [PATCH 38/52] Fix comments in project, make quotes use bot name & not fail if no quotes, reformatting[#379] --- modules/project/config.json | 1 - modules/project/pages.js | 20 ++++++++++++++------ modules/project/project.js | 11 +++++------ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/modules/project/config.json b/modules/project/config.json index f31a1c9..0725dea 100644 --- a/modules/project/config.json +++ b/modules/project/config.json @@ -1,4 +1,3 @@ { - "quotecat":"depressionbot", "dependencies": ["web", "quotes", "github"] } diff --git a/modules/project/pages.js b/modules/project/pages.js index e2dfd3c..a724636 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -2,12 +2,15 @@ var exec = require('child_process').exec, request = require('request'); var pages = function(dbot) { - var depression = dbot.db.quoteArrs[dbot.config.project.quotecat]; + var quoteCat = dbot.db.quoteArrs[dbot.config.name], + rev, diff; - var rev; - exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); - var diff; - exec("git log -1", function(a, b, c){diff = b}); + 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; @@ -18,6 +21,11 @@ var pages = function(dbot) { 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", { @@ -47,7 +55,7 @@ var pages = function(dbot) { "openmilestone": dbot.t("openmilestone"), "closedmilestone": dbot.t("closedmilestone"), "development": dbot.t("development"), - "dquote": depression[Math.floor(Math.random()*depression.length)], + "dquote": quote, "diff": diff, "pagetitle": dbot.t("pagetitle", { "botname": dbot.config.name diff --git a/modules/project/project.js b/modules/project/project.js index 7f4c498..25e3e35 100644 --- a/modules/project/project.js +++ b/modules/project/project.js @@ -1,14 +1,13 @@ /** - * Module Name: imgur - * Description: Various imgur functionality + * Module Name: Project + * Description: Web page which shows git status and other various stats about + * the dbot. */ -var _ = require('underscore')._, - request = require('request'); - var project = function(dbot) { - // nothing to see here go away love zuzak + // Nothing to see here go away love zuzak } + exports.fetch = function(dbot) { return new project(dbot); } From 940af07b78d5d5e691a20c7863a3eecf37c130c2 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 21:37:17 +0000 Subject: [PATCH 39/52] add links to milestones --- views/project/project.jade | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/views/project/project.jade b/views/project/project.jade index d86f06a..dcf7141 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -40,7 +40,9 @@ html(lang='#{curr839}') - var pc = "%" - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) tr(id=mstone+milestone.number) - td #{milestone.title} + td + a(href=milestone.url) + #{milestone.title} td div.progress(class=milestone.state) div.progress-inner(style=wd+wdth+pc)(class=milestone.state) @@ -59,6 +61,3 @@ html(lang='#{curr839}') section#footer p #{currver} - script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js") - script(type="text/javascript", src="/d3/d3.v3.min.js") - script(type="text/javascript", src="/script.js") From 5108b811a1c3b92a992d0112e07f52c24a97b4db Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 18 Apr 2013 23:10:59 +0000 Subject: [PATCH 40/52] bump stats --- modules/stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stats b/modules/stats index e5519f3..518fccc 160000 --- a/modules/stats +++ b/modules/stats @@ -1 +1 @@ -Subproject commit e5519f353abf00e4ec25702f8e02231c9b1f5258 +Subproject commit 518fcccbe6503eb3ee02346d01005b67f16cce40 From eb1d12ec8382be713bfa421e29578cc608315567 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Fri, 19 Apr 2013 00:02:39 +0000 Subject: [PATCH 41/52] Add hidden counter to imgur + Add a counter to the random imgur page. + Added functionality to the ``c`` key to toggle the counter display. + Added functionality to the ``r`` key to reset the counter to default. + Added a new configuration option for a quote category to get the default 'highscore' from. This commit adds a small decreasing counter to the corner of the screen. Hidden by default, press ``c`` to toggle it. The counter will begin at highscore + 1, and will decrease with every new image. This is intended to be used during contests to see how many images one can cycle through before, for example, finding a picture of a cat. The counter can be reset using the ``r`` key. The highscore is automatically set at page load to the most recent quote added to the category specified in the configuration option. Therefore it is important that only numeric data is placed in that particular quote. The score will not reset to a new highscore automatically, and nor will a new highscore update the quote category. --- modules/imgur/config.json | 3 ++- modules/imgur/pages.js | 4 +++- modules/stats | 2 +- public/imgurr.css | 18 +++++++++++++----- views/imgur/imgurr.jade | 14 ++++++++++++++ 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/modules/imgur/config.json b/modules/imgur/config.json index 0cf674b..cc20a5d 100644 --- a/modules/imgur/config.json +++ b/modules/imgur/config.json @@ -3,5 +3,6 @@ "dependencies": [ "web", "api" ], "imagelength": 5, "nsfwwarn": true, - "apikey": "86fd3a8da348b65" + "apikey": "86fd3a8da348b65", + "highscore": "ricount" } diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js index 42b7d0d..0d43f25 100644 --- a/modules/imgur/pages.js +++ b/modules/imgur/pages.js @@ -3,7 +3,9 @@ var _ = require('underscore')._; var pages = function(dbot) { return { '/imgur/random': function(req, res) { - res.render('imgurr', { }); + var hs = dbot.db.quoteArrs[dbot.config.imgur.highscore]; + hs = hs[hs.length-1]; + res.render('imgurr', {"highscore" : hs }); }, '/imgur/stats': function(req, res) { diff --git a/modules/stats b/modules/stats index 518fccc..e5519f3 160000 --- a/modules/stats +++ b/modules/stats @@ -1 +1 @@ -Subproject commit 518fcccbe6503eb3ee02346d01005b67f16cce40 +Subproject commit e5519f353abf00e4ec25702f8e02231c9b1f5258 diff --git a/public/imgurr.css b/public/imgurr.css index a5ceae0..f2bbb11 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -38,7 +38,7 @@ width:168px; } -#history li,#loading { +#history li,#loading,#count { display:block; font-family:monospace; font-size:10px; @@ -65,18 +65,26 @@ opacity:0.2; } -#history,#loading,#details { +#history,#loading,#details,#count { position:absolute; } -#loading { +#loading, #count { font-weight:500; +} +#loading { + top:95px; left:220px; min-width:95px; - top:95px; } -#loading,#details,#history li { +#count { + bottom:25px; + left:25px; + display:none; +} + +#loading,#details,#history li,#count { background:rgba(43,43,43,0.8); border-radius:5px; color:#85bf25; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index a5f4f4d..b3e4436 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -11,6 +11,9 @@ html(lang='en') $('
  • '+msg+'
  • ').prependTo('#history').hide().slideDown(); } var lock = false + var highscore = #{highscore} + 1; + var score = highscore; + $('#count').text(score); function getNewImage() { count += 1; lock = true; @@ -22,6 +25,8 @@ html(lang='en') $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); lock = false; + score -= 1; + $('#count').text(score); $('#details').text("Fetching info..."); giveMessage('' + d.data[0] + ''); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { @@ -38,6 +43,10 @@ html(lang='en') $(getNewImage()); $(document).on('keydown', function(e){ switch(e.which){ + case 82: // r + score = highscore; + $('#count').text(highscore); + giveMessage("Score reset."); case 13: // enter case 32: // space if (lock) { @@ -48,6 +57,9 @@ html(lang='en') getNewImage(); } break; + case 67: + $('#count').fadeToggle(); + break; case 83: // s $('body').toggleClass('crop'); giveMessage("Toggled scrollbars.") @@ -56,6 +68,8 @@ html(lang='en') body div#loading Loading image 1... div#details Press [SPACE] to load a new image + div#count + #{highscore} ul#history li Press [SPACE] for next div#container From f57a91e48174ecbda9716941bef9fc2b26b45773 Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 19 Apr 2013 11:42:00 +0000 Subject: [PATCH 42/52] remove stats [#382] --- .gitmodules | 3 --- modules/stats | 1 - 2 files changed, 4 deletions(-) delete mode 160000 modules/stats diff --git a/.gitmodules b/.gitmodules index 365ed83..cf2f023 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [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 diff --git a/modules/stats b/modules/stats deleted file mode 160000 index 518fccc..0000000 --- a/modules/stats +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 518fcccbe6503eb3ee02346d01005b67f16cce40 From 65302765f06be8656840057990a8b9732da1a80d Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 19 Apr 2013 11:44:33 +0000 Subject: [PATCH 43/52] readd statos [Close #382] --- .gitmodules | 3 +++ modules/stats | 1 + 2 files changed, 4 insertions(+) create mode 160000 modules/stats diff --git a/.gitmodules b/.gitmodules index cf2f023..d47e162 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [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/modules/stats b/modules/stats new file mode 160000 index 0000000..11143fa --- /dev/null +++ b/modules/stats @@ -0,0 +1 @@ +Subproject commit 11143fa7f613698e6e36e97ab28527b659d8454e From 146e7afa5be7a28bd8b238cd2eba3a2778e802cf Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 19 Apr 2013 17:06:19 +0000 Subject: [PATCH 44/52] Don't shit out if there's no highscore quote category --- modules/imgur/pages.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js index 0d43f25..314dfee 100644 --- a/modules/imgur/pages.js +++ b/modules/imgur/pages.js @@ -3,9 +3,14 @@ var _ = require('underscore')._; var pages = function(dbot) { return { '/imgur/random': function(req, res) { - var hs = dbot.db.quoteArrs[dbot.config.imgur.highscore]; - hs = hs[hs.length-1]; - res.render('imgurr', {"highscore" : hs }); + 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) { From ff52d7e6f15a7b32f45deced181b9d2d6dd86ad7 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 20 Apr 2013 00:05:46 +0200 Subject: [PATCH 45/52] Added Dutch translations. --- modules/admin/strings.json | 45 ++++++++++++++-------- modules/command/strings.json | 21 ++++++---- modules/dns/strings.json | 11 ++++-- modules/ignore/strings.json | 65 ++++++++++++++++++++----------- modules/imgur/strings.json | 3 +- modules/kick/strings.json | 6 ++- modules/link/strings.json | 6 ++- modules/poll/strings.json | 42 +++++++++++++------- modules/quotes/strings.json | 72 +++++++++++++++++++++++------------ modules/rain/strings.json | 44 +++++++++++++-------- modules/report/strings.json | 12 ++++-- modules/spelling/strings.json | 6 ++- modules/spotify/strings.json | 3 +- modules/users/strings.json | 18 ++++++--- 14 files changed, 234 insertions(+), 120 deletions(-) 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..e9a9532 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}" + "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/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/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 5c11a74..cedae83 100644 --- a/modules/kick/strings.json +++ b/modules/kick/strings.json @@ -3,12 +3,14 @@ "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}", "es": "No expulsás {botname}", "na'vi": "Ngal {botname}it ke tsun tsrive'i", - "cy": "Ni ddylech cicio {botname}" + "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/quotes/strings.json b/modules/quotes/strings.json index 2622f68..c877237 100644 --- a/modules/quotes/strings.json +++ b/modules/quotes/strings.json @@ -3,131 +3,155 @@ "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." } } diff --git a/modules/rain/strings.json b/modules/rain/strings.json index 76c765a..8850772 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 ambigiuous 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/users/strings.json b/modules/users/strings.json index a46e7dc..cb54b3a 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 with {count} aliases, ", - "na'vi": "{user} lu txin ulte {count}a stxo lu poru, " + "na'vi": "{user} lu txin ulte {count}a stxo lu poru, ", + "nl": "{user} 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}." } } From b857eaf4269c8028fafa15c64a3eed5b4becbbed Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 20 Apr 2013 00:13:42 +0200 Subject: [PATCH 46/52] Fixed JSON syntax threat. --- modules/dns/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dns/strings.json b/modules/dns/strings.json index e9a9532..2a94e72 100644 --- a/modules/dns/strings.json +++ b/modules/dns/strings.json @@ -8,7 +8,7 @@ "nl": "{domain} is \u000305BEZET! \u000314({address})" }, "rdns": { - "en": "{ip} \u2192 {domain}", + "en": "{ip} \u2192 {domain}" }, "rdns-error": { "en": "Unable to lookup {ip}. \u000314({error})", From cc0e2030f05414b712a205ab4a4d0496b9c7e232 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 20 Apr 2013 00:16:58 +0200 Subject: [PATCH 47/52] Fixed incorrect spelling correction. --- modules/rain/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rain/strings.json b/modules/rain/strings.json index 8850772..a36c319 100644 --- a/modules/rain/strings.json +++ b/modules/rain/strings.json @@ -65,7 +65,7 @@ "nl": "Geen weerinformatie beschikbaar." }, "rain-u": { - "en": "Location too ambigiuous to process.", + "en": "Location too ambiguous to process.", "na'vi":"tsengeri, yayayr lu oeru.", "nl": "Deze locatie is te onduidelijk." } From 1e30fcfac371d89b0b632866a8d3c9da67b04498 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 20 Apr 2013 01:59:48 +0200 Subject: [PATCH 48/52] Added Dutch translations for project module. --- modules/project/strings.json | 56 ++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index 5afa320..4e2407e 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -6,115 +6,133 @@ "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", "fr": "{name} parle {lang} ({langen})", - "it": "{name} parla {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" + "it": "{botname} interfaccia web", }, "en": { "en": "English", "fr": "anglais", "de": "Englisch", "it": "inglese", - "cy": "saesneg" + "cy": "saesneg", + "nl": "Engels" }, "fr": { "en": "French", "fr": "français", "de": "Französisch", - "it": "francese" + "it": "francese", + "nl": "Frans" }, "de": { "en": "German", "fr": "allemande", "de": "Deutsch", - "it": "tedesco" + "it": "tedesco", + "nl": "Duits" }, "it": { "en": "Italian", "fr": "italien", "de": "Italiener", - "it": "italiano" + "it": "italiano", + "nl": "Italiaans" }, "cy": { "en": "Welsh", "fr": "gallois", "de": "Walisisch", "it": "gallese", - "cy": "cymraeg" + "cy": "cymraeg", + "nl": "Welsh" }, "na'vi": { "en": "Na'vi", "fr": "na'vi", "de": "Na'vi", - "it": "Na'vi" + "it": "Na'vi", + "nl": "Na'vi" }, "es": { "en": "Spanish", "fr": "espagnole", "de": "Spanisch", - "it": "spagnolo" + "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}" + "it": "{name} il numero di revisione {rev}", + "nl": "{name} is bij revisie {rev}" }, "loadedmodules": { "en": "loaded modules", "fr": "modules chargés", - "it": "moduli caricati" + "it": "moduli caricati", + "nl": "geladen modules" }, "configoptions": { "en": "Configuration", "fr": "Configuration", "de": "Konfiguration", - "it": "Configuazione" + "it": "Configuazione", + "nl": "Configuratie" }, "debugmode-true": { "en": "Debug mode active", "fr": "debug actif", "de": "Debug aktiv", - "it": "debug attivo" + "it": "debug attivo", + "nl": "Debug actief" }, "debugmode-false": { "en": "Debug off", "fr": "debug éteint", "de": "Debug ausgeschaltet", - "it": "debug spento" + "it": "debug spento", + "nl": "Debug uitgeschakeld" }, "milestoneprog": { "en": "Progress", "fr": "Progression", "de": "Fortschritt", - "it": "sviluppo" + "it": "sviluppo", + "nl": "Voortgang" }, "openmilestone": { "en": "Open", "fr": "Ouvert", "de": "Offen", - "it": "Aperto" + "it": "Aperto", + "nl": "Open" }, "closedmilestone": { "en": "Closed", "fr": "Fermé", "de": "Gesperrt", - "it": "Chiuso" + "it": "Chiuso", + "nl": "Gesloten" }, "milestonename": { "en": "Name", "fr": "Nom", "de": "Name", - "it": "Nome" + "it": "Nome", + "nl": "Naam" }, "development": { "en": "Development", "fr": "Développement", "de": "Entwicklung", - "it": "Sviluppo" + "it": "Sviluppo", + "nl": "Ontwikkeling" } } From 0f6a486fe747d57d7e3ab5d676a9132217eca0f0 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 20 Apr 2013 00:04:28 +0000 Subject: [PATCH 49/52] bump stats lang --- modules/stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stats b/modules/stats index 11143fa..500a21d 160000 --- a/modules/stats +++ b/modules/stats @@ -1 +1 @@ -Subproject commit 11143fa7f613698e6e36e97ab28527b659d8454e +Subproject commit 500a21d78b8882eb206598011ab3a5f30e7113b6 From 44d42c50355375f2d5adad5c986449556a591418 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 20 Apr 2013 00:09:47 +0000 Subject: [PATCH 50/52] load strings first --- run.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/run.js b/run.js index 78cc69d..fa584e7 100644 --- a/run.js +++ b/run.js @@ -212,6 +212,15 @@ DBot.prototype.reloadModules = function() { } }, this); + // Load string data for the module + _.each([ 'usage', 'strings' ], function(property) { + var propertyData = {}; + try { + propertyData = JSON.parse(fs.readFileSync(moduleDir + property + '.json', 'utf-8')); + } catch(err) {}; + _.extend(this[property], propertyData); + }, this); + // Load the module itself var rawModule = require(moduleDir + name); var module = rawModule.fetch(this); @@ -262,16 +271,7 @@ DBot.prototype.reloadModules = function() { this.instance.addListener(on, module.name, module.listener); }, this); } - - // Load string data for the module - _.each([ 'usage', 'strings' ], function(property) { - var propertyData = {}; - try { - propertyData = JSON.parse(fs.readFileSync(moduleDir + property + '.json', 'utf-8')); - } catch(err) {}; - _.extend(this[property], propertyData); - }, this); - + // Provide toString for module name module.toString = function() { return this.name; From 11230719527f1587e794e61f107d107f4a172538 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Sat, 20 Apr 2013 02:23:44 +0200 Subject: [PATCH 51/52] Add timers to config --- config.json.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json.sample b/config.json.sample index be6de54..fb89866 100644 --- a/config.json.sample +++ b/config.json.sample @@ -13,7 +13,7 @@ }, "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, "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)." From 8d8d32fcc9a8e48860076a219de984f0adeb7efc Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 20 Apr 2013 10:26:04 +0000 Subject: [PATCH 52/52] debugMode should be false by default --- config.json.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json.sample b/config.json.sample index fb89866..e982e5e 100644 --- a/config.json.sample +++ b/config.json.sample @@ -15,6 +15,6 @@ "moderators": [ "whatever" ], "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)." }