From ce4e69bdd3409690322d0b79526092cc12d4f84a Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 16:34:26 +0000 Subject: [PATCH 1/5] bought project module back up to speed * Added check that ``dent`` was loaded before looking for related configuration settings. * Fixed ``h3``s that should have been ``h2``s, and ``h4``s that should have been ``h3``s * Added larger margins for headings * Forced the ``td``s of the translations table to be their normal capitalisation * Readded some translations * Fixed links to repos * Fixed links to issues * Reimplemented configList --- modules/project/pages.js | 2 +- modules/project/project.js | 6 +++--- public/project.css | 11 +++++++++++ views/project/project.jade | 32 ++++++++++++++++++-------------- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index ed94690..f248dcd 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -92,7 +92,7 @@ var pages = function(dbot) { "languageeng": dbot.t("en"), "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), - "languagetranshead": dbot.t("translations") + "languagetranshead": dbot.t("translations"), }); }, }; diff --git a/modules/project/project.js b/modules/project/project.js index 59a2fbe..5bb291e 100644 --- a/modules/project/project.js +++ b/modules/project/project.js @@ -16,9 +16,9 @@ var project = function(dbot) { list.push(dbot.t("dent-account", { "username": dbot.config.dent.username })); - } - if(_.has(dbot.config.dent.dentQuotes)) { - list.push(dbot.t("dent-push")); + if(_.has(dbot.config.dent.dentQuotes)) { + list.push(dbot.t("dent-push")); + } } if(_.has(dbot.modules,'link')){ if(dbot.config.link.autoTitle){ diff --git a/public/project.css b/public/project.css index 3e71250..736b633 100644 --- a/public/project.css +++ b/public/project.css @@ -63,3 +63,14 @@ li { #footer { font-size:80%; } +h2 { + margin-top:40px; + margin-bottom:30px; +} +h3 { + margin-top:30px; + margin-bottom:20px; +} +#translations td { + text-transform:none; +} diff --git a/views/project/project.jade b/views/project/project.jade index fa865d7..22d5c93 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -22,12 +22,12 @@ html(lang='#{curr839}') p.intro #{dquote} section#git - h3 #{development} + h2 #{development} p.center #{revnum} pre#gitdiff #{diff} - h4 #{milestoneprog} + h3 #{milestonehead} table#milestones.center tr th #{milestonename} @@ -38,7 +38,7 @@ html(lang='#{curr839}') - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) tr(id=mstone+milestone.number) td - a(href=milestone.url) + a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} td div.progress(class=milestone.state) @@ -47,8 +47,10 @@ html(lang='#{curr839}') print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} - h4 #{languagetranshead} - table + a(#href="https://github.com/"+repo+"/") + #{propaganda} + h3 #{languagetranshead} + table#translations tr th #{languagecurr} th #{languagenati} @@ -75,21 +77,23 @@ html(lang='#{curr839}')   print #{Math.round(w)+"%"} td #{language.count} / #{translation.en.count} - h4 #{credits} + h3 #{credits} #{thanks} ul each author in authors li #{author} section#config - h3 #{config} - ul - li #{currlang} - li #{debugmode} - h4 #{loadmod} - ul#modules - each module in modules - li #{module} + h2 #{config} + ul + li #{currlang} + li #{debugmode} + each config in configList + li #{config} + h3 #{loadmod} + ul#modules + each module in modules + li #{module} section#footer p #{currver} From 5322ec52bf38a5565c2ec8c5b2d2a3432fbaf663 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:14:37 +0000 Subject: [PATCH 2/5] Add pull request notification * Add message when there are pull requests with client side javascript * Add string for OAOSIDL, for future usage * Title cased credits * Removed text transform from random quote * Shoved commit count to left * Added lines to top and bottom of ``h2`` * Removed redundant CSS * Added JQuery --- modules/project/pages.js | 1 + modules/project/strings.json | 6 ++++++ public/project.css | 30 ++++++++++++++++++++++++++++++ views/project/project.jade | 21 ++++++++++++--------- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index f248dcd..5578d68 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -93,6 +93,7 @@ var pages = function(dbot) { "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), "languagetranshead": dbot.t("translations"), + "pullreqs": dbot.t("outstanding-pullreq") }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 8960da3..be11111 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -189,5 +189,11 @@ }, "langhead-native": { "en": "Native" + }, + "outstanding-pullreq": { + "en": "There are outstanding pull requests" + }, + "oaosidl": { + "en": "The Official Aberystwyth Open Source International Development League" } } diff --git a/public/project.css b/public/project.css index 736b633..95ff2d4 100644 --- a/public/project.css +++ b/public/project.css @@ -3,6 +3,10 @@ pre#gitdiff { width:80; margin:auto; text-transform:none; + clear:both; +} +ul#credits { + text-transform:capitalize; } div#main { font-size:18px; @@ -19,6 +23,7 @@ p.intro { border:1px solid #ccc; padding:20px; border-radius:4px; + text-transform:none; } div.progress.open { background-color: #f4fff4; @@ -74,3 +79,28 @@ h3 { #translations td { text-transform:none; } +p#pullreq { + float:right; + border-left:1px solid #ccc; + border-top:1px solid #ccc; + border-top-left-radius:5px; + padding:10px; + margin:5px; + display:none; +} +p#revnum { + float:left; + border-right:1px solid #ccc; + border-top:1px solid #ccc; + border-top-right-radius: 5px; + margin:5px; + padding:10px; + margin-bottom:0px; +} +h2 { + border-bottom: 1px solid #ccc; + border-top:1px solid #ccc; + margin-left:auto; + margin-right:auto; + width:40%; +} diff --git a/views/project/project.jade b/views/project/project.jade index 22d5c93..560de26 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -8,12 +8,13 @@ html(lang='#{curr839}') link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") title #{pagetitle} - - 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% } + script + $(document).ready(function() { + $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { + if ($.parseJSON(data).length) { $("#pullreq").show();} + }); + }); + body div.container div#page @@ -23,7 +24,9 @@ html(lang='#{curr839}') #{dquote} section#git h2 #{development} - p.center + p#pullreq + a(href="https://github.com/"+repo+"/pulls") #{pullreqs} + p#revnum #{revnum} pre#gitdiff #{diff} @@ -36,7 +39,7 @@ html(lang='#{curr839}') th #{closedmilestone} each milestone in milestones - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) - tr(id=mstone+milestone.number) + tr(id="milestone"+milestone.number) td a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} @@ -79,7 +82,7 @@ html(lang='#{curr839}') td #{language.count} / #{translation.en.count} h3 #{credits} #{thanks} - ul + ul#credits each author in authors li #{author} From af8c11fd86223e3044fc575498f873f70e7f47c2 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:28:51 +0000 Subject: [PATCH 3/5] fix missing string --- modules/project/strings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/project/strings.json b/modules/project/strings.json index be11111..58fb470 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -195,5 +195,8 @@ }, "oaosidl": { "en": "The Official Aberystwyth Open Source International Development League" + }, + "link-autotitle": { + "en": "Automatically titling links in channels" } } From 09120f06dbf747a905d8f8bcac84a08d28d92a66 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:44:41 +0000 Subject: [PATCH 4/5] add french translations --- modules/project/strings.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index 58fb470..daa07b0 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -1,7 +1,4 @@ { - "dbotintro": { - "en": "{botname} lorem ipsum dolor sit amet" - }, "dbotspeaks": { "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", @@ -10,10 +7,12 @@ "nl": "{name} spreekt {lang} ({langen})" }, "thanks": { - "en": "With thanks to:" + "en": "With thanks to:", + "fr": "Merci à:" }, "credits": { - "en": "Authors" + "en": "Authors", + "fr": "Développeurs" }, "pagetitle": { "en": "{botname} web interface", @@ -115,6 +114,7 @@ }, "milestones": { "en": "Milestones" + "fr": "étapes" }, "milestoneprog": { "en": "Progress", @@ -173,22 +173,32 @@ "en": "{branch}" }, "git": { - "en": "version control" + "en": "version control", + "de": "Versionsverwaltung", + "es": "Control de versiones", + "fr": "Festion de versions", + "it": "Controllo versione", + "nl": "Versiebeheersysteem" }, "langhead-current": { - "en": "Current" + "en": "Current", + "fr": "Courant" }, "langhead-translations": { - "en": "Completion" + "en": "Completion", + "fr": "Achèvement" }, "translations": { - "en": "Translations" + "en": "Translations", + "fr": "Traductions" }, "langhead-progress": { - "en": "Translation Progress" + "en": "Translation Progress", + "fr": "Avancement de la Traduction" }, "langhead-native": { - "en": "Native" + "en": "Native", + "fr": "Natale" }, "outstanding-pullreq": { "en": "There are outstanding pull requests" From e4b543c30259e72de70fbecc8a15190872ab47a7 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 22 Apr 2013 19:36:13 +0000 Subject: [PATCH 5/5] GPL --- LICENCE | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/LICENCE b/LICENCE index 627898c..205b8c1 100644 --- a/LICENCE +++ b/LICENCE @@ -1,18 +1,14 @@ Copyright (c) 2012-2013 Luke Slater (tinmachin3@gmail.com) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +You should have received a copy of the GNU General Public License +along with this program. If not, see .