From 7d0162afff61abf1e5b9bc8949222eaa4b9edcd5 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sat, 13 Apr 2013 22:40:35 +0000 Subject: [PATCH 1/4] slim down the normal announcement Specifying that images are non-animated each time isn't really required, and causes the string to be rather long. Stripping this implicit property makes it look a bit nicer. --- 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 b68f8ef..27209c1 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -20,7 +20,7 @@ var imgur = function(dbot) { if(imgData.animated) { info += 'an animated ' + imgData.type.split('/')[1] + ' with '; } else { - info += 'a non-animated ' + imgData.type.split('/')[1] + ' with '; + info += 'a ' + imgData.type.split('/')[1] + ' with '; } } else { info += 'an image with '; From 541e6a1798078f73b2f4e832c849780dd35a7792 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 14 Apr 2013 01:35:04 +0000 Subject: [PATCH 2/4] add color to up/downvotes; move NSFW to strings Orange isn't a color widely available on IRC clients, so green has been substituted. "NSFW" is fairly transcendal when it comes to languages; Catalan, French, and German generally do not seem to localise the abbreviation. However, it has been moved to strings.json on the off chance that a better translation arises. This commit has not been tested. Merge at your own risk. --- modules/reddit/reddit.js | 6 +++--- modules/reddit/strings.json | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/reddit/reddit.js b/modules/reddit/reddit.js index 009a913..9250d31 100644 --- a/modules/reddit/reddit.js +++ b/modules/reddit/reddit.js @@ -69,7 +69,7 @@ var reddit = function(dbot) { 'up': info.ups, 'down': info.downs }); - if(info.over_18) infoString += ' [NSFW]'; + if(info.over_18) infoString += " " + dbot.t("nsfw"); event.reply(infoString); } }); @@ -85,7 +85,7 @@ var reddit = function(dbot) { 'down': info.downs, 'url': this.ApiRoot + matches[4] }); - if(info.over_18) infoString += ' [NSFW]'; + if(info.over_18) infoString += " " + dbot.t("nsfw"); event.reply(infoString); } }.bind(this)); @@ -97,7 +97,7 @@ var reddit = function(dbot) { 'subscribers': info.subscribers, 'active': info.accounts_active }); - if(info.over18) infoString += ' [NSFW]'; + if(info.over18) infoString += dbot.t("nsfw"); event.reply(infoString); } }); diff --git a/modules/reddit/strings.json b/modules/reddit/strings.json index bef4de0..a6984e1 100644 --- a/modules/reddit/strings.json +++ b/modules/reddit/strings.json @@ -3,9 +3,12 @@ "en": "[{display_name} has {subscribers} subscribers ({active} active)]" }, "about_post": { - "en": "[Post by {poster} in {subreddit} - Comments: {comments}, Score: {score} ({up}|{down})] - {url}" + "en": "[Post by {poster} in {subreddit} — Comments: {comments}, Score: {score} (\u00039▲{up}\u0015|\u000312{down}▼\u0015)] — {url}" }, "about_comment": { - "en": "[Comment by {poster} in {subreddit} - Score: {score} ({up}|{down})]" + "en": "[Comment by {poster} in {subreddit} — Score: {score} (\u00039▲{up}\u0015|\u000312{down}▼\u0015)]" + } + "nsfw": { + "en": "[NSFW]" } } From b24a9b56b12650efa3294ba6e02b6af15e11b284 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 14 Apr 2013 01:39:13 +0000 Subject: [PATCH 3/4] Update strings.json --- modules/reddit/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/reddit/strings.json b/modules/reddit/strings.json index a6984e1..6148652 100644 --- a/modules/reddit/strings.json +++ b/modules/reddit/strings.json @@ -7,7 +7,7 @@ }, "about_comment": { "en": "[Comment by {poster} in {subreddit} — Score: {score} (\u00039▲{up}\u0015|\u000312{down}▼\u0015)]" - } + }, "nsfw": { "en": "[NSFW]" } From 1a9f2d47eeda6365441348c87c2c93695540b407 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 14 Apr 2013 01:46:39 +0000 Subject: [PATCH 4/4] Update strings.json --- modules/reddit/strings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/reddit/strings.json b/modules/reddit/strings.json index 6148652..7a4d692 100644 --- a/modules/reddit/strings.json +++ b/modules/reddit/strings.json @@ -3,10 +3,10 @@ "en": "[{display_name} has {subscribers} subscribers ({active} active)]" }, "about_post": { - "en": "[Post by {poster} in {subreddit} — Comments: {comments}, Score: {score} (\u00039▲{up}\u0015|\u000312{down}▼\u0015)] — {url}" + "en": "[Post by {poster} in {subreddit} — Comments: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}" }, "about_comment": { - "en": "[Comment by {poster} in {subreddit} — Score: {score} (\u00039▲{up}\u0015|\u000312{down}▼\u0015)]" + "en": "[Comment by {poster} in {subreddit} — Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)]" }, "nsfw": { "en": "[NSFW]"