Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi All,

I have created 3 patches for the Bugzilla-assistant:

- I have the moved the files created while building to a sub-directory, except the bug.html. And removed 2 useless files.

- The 2nd patch removes the components with small first-letter from the checks. It checks that those won't be added. When this patch is accepted I'll change the wiki-page so that the <div class="component"> will be changed to <div class="component_noview"> for the components that don't need to be shown in the BSA. Then the BSA will need to be rebuild and updated on the website. Then I'll also update the documentation.

- The 3th patch removes the contrib-icon from the component-icons as due to patch 2 that component doesn't work anymore.

--
Greetings,
Rob Snelders
From 18f09f45aa034a8515058f056a9a446bfa9d216a Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Sun, 15 Jul 2012 19:09:47 +0200
Subject: [PATCH] - use build-directory for temperary files while building -
 removed some un-used files

---
 bug/Makefile              |   23 ++++---
 bug/bug.xhtml             |    8 +--
 bug/bug/2011-02-form.html |  150 ---------------------------------------------
 bug/index.html            |    3 -
 4 files changed, 15 insertions(+), 169 deletions(-)
 delete mode 100644 bug/bug/2011-02-form.html
 delete mode 100644 bug/index.html

diff --git a/bug/Makefile b/bug/Makefile
index bd846fc..0cc49a7 100644
--- a/bug/Makefile
+++ b/bug/Makefile
@@ -15,24 +15,23 @@
 #     along with this program.  If not, see <http:www.gnu.org/licenses/>.
 #
 all: extract compose
-       #jscoverage --no-instrument=jquery-validation-1.8.1 bug bug-cover
 
 extract:
-       curl --silent http://wiki.documentfoundation.org/BugReport_Details | tidy 
--numeric-entities yes -asxhtml 2>/dev/null | perl -pe 's|xmlns="http://www.w3.org/1999/xhtml";||' > 
BugReport_Details.xhtml
-       xsltproc --encoding UTF-8 --novalid component_comments.xsl BugReport_Details.xhtml > 
component_comments.xhtml
-       xsltproc --encoding UTF-8 --novalid subcomponents.xsl BugReport_Details.xhtml > 
subcomponents.xhtml
-       xsltproc --encoding UTF-8 --novalid components.xsl BugReport_Details.xhtml > 
components.xhtml
-       curl --silent 
'https://bugs.freedesktop.org/query.cgi?product=LibreOffice&query_format=advanced' > query.xhtml
-       perl query.pl < query.xhtml > versions.xhtml
-       perl sanity.pl query.xhtml components.xhtml
+       mkdir -p build
+       curl --silent http://wiki.documentfoundation.org/BugReport_Details | tidy 
--numeric-entities yes -asxhtml 2>/dev/null | perl -pe 's|xmlns="http://www.w3.org/1999/xhtml";||' > 
build/BugReport_Details.xhtml
+       xsltproc --encoding UTF-8 --novalid component_comments.xsl build/BugReport_Details.xhtml > 
build/component_comments.xhtml
+       xsltproc --encoding UTF-8 --novalid subcomponents.xsl build/BugReport_Details.xhtml > 
build/subcomponents.xhtml
+       xsltproc --encoding UTF-8 --novalid components.xsl build/BugReport_Details.xhtml > 
build/components.xhtml
+       curl --silent 
'https://bugs.freedesktop.org/query.cgi?product=LibreOffice&query_format=advanced' > 
build/query.xhtml
+       perl query.pl < build/query.xhtml > build/versions.xhtml
+       perl sanity.pl build/query.xhtml build/components.xhtml
 
 compose:
-       xsltproc --encoding UTF-8 --novalid \
-               --stringparam serial `date +%s` \
-               bug.xsl bug.xhtml > bug/bug.html
+       xsltproc --encoding UTF-8 --novalid --stringparam serial `date +%s` bug.xsl bug.xhtml > 
bug/bug.html
 
 check:
        perl sanity.pl TEST
 
 clean:
-       rm -f BugReport_Details.xhtml component_comments.xhtml subcomponents.xhtml components.xhtml 
query.xhtml versions.xhtml bug/bug.html
+       rm -f build/BugReport_Details.xhtml build/component_comments.xhtml 
build/subcomponents.xhtml build/components.xhtml build/query.xhtml build/versions.xhtml bug/bug.html
+       rmdir build
diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index 615d3a3..c5d056c 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -1,10 +1,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
          [
-         <!ENTITY component_comments SYSTEM "component_comments.xhtml">
-         <!ENTITY components SYSTEM "components.xhtml">
-         <!ENTITY subcomponents SYSTEM "subcomponents.xhtml">
-         <!ENTITY versions SYSTEM "versions.xhtml">
+         <!ENTITY component_comments SYSTEM "build/component_comments.xhtml">
+         <!ENTITY components SYSTEM "build/components.xhtml">
+         <!ENTITY subcomponents SYSTEM "build/subcomponents.xhtml">
+         <!ENTITY versions SYSTEM "build/versions.xhtml">
          ]
          >
 <html >
diff --git a/bug/bug/2011-02-form.html b/bug/bug/2011-02-form.html
deleted file mode 100644
index 577d268..0000000
--- a/bug/bug/2011-02-form.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml";>
-  <head>
-    <title>Bug Filing Form</title>
-    <script type="text/javascript">
-    // Note that in all of these functions, an argument of '1' refers to
-    // the 'Yes' radio button, and a '0' to the 'No' button
-
-    function doc_specific(yesorno)
-    // Asks the user to attach the document if bug is doc-specific.
-    // If not, clears all radio button questions since they are irrelevant
-    {
-        if (yesorno == 1)
-        {
-            document.getElementById("popup").innerHTML="Can you attach the document to this bug 
report? <input type='radio' name='attachable' value='yes' onclick='can_attach(1)'>Yes<input 
type='radio' name='attachable' value='no' onclick='can_attach(0)'>No";
-        }
-        else if (yesorno == 0)
-        {
-            document.getElementById("popup").innerHTML="";
-            document.getElementById("popup2").innerHTML="";
-            document.getElementById("popup3").innerHTML="";
-        }
-    }
-
-    function can_attach(canorcant)
-    // Asks if the user is able to attach their document
-    {
-        if (canorcant == 1)
-        {
-            document.getElementById("popup2").innerHTML="Can you trim the document down to 
reproduce the bug only, and attach that document? <input type='radio' name='can_trim' value='yes' 
onclick='can_trim(1)'>Yes <input type='radio' name='can_trim' value='no' onclick='can_trim(0)'>No";
-        }
-        else if (canorcant == 0)
-        {
-            document.getElementById("popup2").innerHTML="Without the document related to your bug 
it will be difficult or impossible for us to solve your problem.";
-            document.getElementById("popup3").innerHTML="";
-        }
-    }
-
-    function can_trim(trimmable)
-    // Asks if the user can trim the bug's document, and explains the consequences of trimming or 
not
-    {
-        if (trimmable == 1)
-        {
-            document.getElementById("popup3").innerHTML="Great! Please make the file as small as 
possible, making sure to reproduce only the intended bug and attach it to the bug report.";
-        }
-        else if (trimmable == 0)
-        {
-            document.getElementById("popup3").innerHTML="Without trimming the document down it 
will be difficult for us to diagnose the problem and fix it. However, we might be able to fix it 
regardless.";
-        }
-    }
-
-    function crashes()
-    // Asks the user if the crash occurs on a Linux system
-    {
-    if (document.getElementById("crashesoption").checked == true)
-        {
-        document.getElementById("crashes").innerHTML="<h3>Crashes the program:</h3>Does the crash 
occur on a Linux-based system? <input type='radio' name='crashes_linux' value='yes' 
onclick='crashes_linux(1)' >Yes<input type='radio' name='crashes_linux' value='no' 
onclick='crashes_linux(0)' >No";
-        }
-    else if (document.getElementById("crashesoption").checked == false)
-        {
-        document.getElementById("crashes").innerHTML="";
-        document.getElementById("crashes_linux").innerHTML="";
-        }
-    }
-
-    function crashes_linux(crashesonlinux)
-    // Explains how to get a backtrace if the user runs a Linux system
-    {
-    if (crashesonlinux == 1)
-        {
-        document.getElementById("crashes_linux").innerHTML="Please follow <a 
href='http://wiki.documentfoundation.org/BugReport#How_to_get_backtrace_.28on_Linux.29'>these 
instructions</a> to obtain a backtrace for your crash and attach it to your bug report. Doing so 
will help us understand and fix your bug.";
-        }
-    else if (crashesonlinux == 0)
-        {
-        document.getElementById("crashes_linux").innerHTML="";
-        }
-    }
-
-    function loses_content()
-    // Displays info if the user's bug causes a loss of content
-    {
-    if (document.getElementById("losescontentoption").checked == true)
-        {
-        document.getElementById("losescontent").innerHTML="<h3>Causes loss of content</h3>The 
document does lose content. Add helpful info.";
-        }
-    else if (document.getElementById("losescontentoption").checked == false)
-        {
-        document.getElementById("losescontent").innerHTML="";
-        }
-    }
-
-    function loses_layout()
-    // Displays info if the user's bug causes a loss of layout
-    {
-    if (document.getElementById("loseslayoutoption").checked == true)
-        {
-        document.getElementById("loseslayout").innerHTML="<h3>Causes loss of layout</h3>The 
document does lose layout. Add helpful info.";
-        }
-    else if (document.getElementById("loseslayoutoption").checked == false)
-        {
-        document.getElementById("loseslayout").innerHTML="";
-        }
-    }
-
-    function etc()
-    // Displays info if the user clicks the etc option
-    {
-    if (document.getElementById("etcoption").checked == true)
-        {
-        document.getElementById("etc").innerHTML="<h3>etc...</h3>etc... Add helpful info.";
-        }
-    else if (document.getElementById("etcoption").checked == false)
-        {
-        document.getElementById("etc").innerHTML="";
-        }
-    }
-    </script>
-  </head>
-
-  <body>
-    <h1>Before You File Your Bug</h1>
-
-    <p>Is this bug specific to a certain document? <input type="radio" name="docspecific" 
value="yes" onclick="doc_specific(1)" />Yes<input type="radio" name="docspecific" value="no" 
onclick="doc_specific(0)" />No</p>
-
-    <!--Empty paragraphs become filled with content, depending on answers to questions-->
-    <p id="popup"></p>
-    <p id="popup2"></p>
-    <p id="popup3"></p>
-
-    <h2>Extra information:</h2>
-    <table>
-      <tr>
-        <td><input type="checkbox" id="crashesoption" onclick="crashes()"/>Crashes the program</td>
-        <td><input type="checkbox" id="losescontentoption" onclick="loses_content()" />Causes loss 
of content</td>
-        <td><input type="checkbox" id="loseslayoutoption" onclick="loses_layout()" />Causes loss 
of layout</td>
-        <td><input type="checkbox" id="etcoption" onclick="etc()" />etc.</td>
-      </tr>
-    </table>
-    
-    <!--Paragraphs to display extra info to the user, depending on what parts are relevant to 
their bug-->
-    <p id="crashes"></p>
-    <p id="crashes_linux"></p>
-    <p id="losescontent"></p>
-    <p id="loseslayout"></p>
-    <p id="etc"></p>
-    <p><a href="https://bugs.freedesktop.org/enter_bug.cgi?product=LibreOffice";><input 
type="submit" value="Continue" /></a></p>
-    <p>Or skip straight to a fresh bug report <a 
href="https://bugs.freedesktop.org/enter_bug.cgi?product=LibreOffice";>here</a>.</p>
-  </body>
-</html>
\ No newline at end of file
diff --git a/bug/index.html b/bug/index.html
deleted file mode 100644
index f0a24c7..0000000
--- a/bug/index.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<p><a href="bug/bug.html">draft bug report helper</a></p>
-<p><a href="bug-cover/jscoverage.html?url=test.html">tests of the draft bug report helper</a></p>
-
-- 
1.7.9.5

From 4028ebfdd054db6b200bf0a74678b13d51abc891 Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Mon, 16 Jul 2012 22:12:56 +0200
Subject: [PATCH] Sanity-test now ignores components with lower-case in
 bugzilla. So for the modules where the <div
 class="component"> is changed to <div
 class="components_noview"> on the wiki-page won't be added
 to the bugzilla

---
 bug/sanity-query.xhtml |    2 +-
 bug/sanity.pl          |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bug/sanity-query.xhtml b/bug/sanity-query.xhtml
index 6ab3dfa..5342d2d 100644
--- a/bug/sanity-query.xhtml
+++ b/bug/sanity-query.xhtml
@@ -1,4 +1,4 @@
-cpts[0] = ['BASIC', 'BugAssistant', 'Chart', 'contrib', 'Database', 'Documentation', 'Drawing', 
'Extensions', 'Formula editor', 'Installation', 'Libreoffice', 'Linguistic', 'Localization', 
'Printing and PDF export', 'Presentation', 'Spreadsheet', 'UI', 'Writer', 'WWW' ];
+cpts[0] = ['BASIC', 'BugAssistant', 'Chart', 'contrib', 'Database', 'Documentation', 'Drawing', 
'Extensions', 'Formula editor', 'Installation', 'Libreoffice', 'Linguistic', 'Localisation', 
'Printing and PDF export', 'Presentation', 'Spreadsheet', 'UI', 'Writer', 'WWW' ];
 <select name="product" multiple="multiple" size="5" id="product"
                       <option value="LibreOffice" selected>LibreOffice</option>
 </select>
diff --git a/bug/sanity.pl b/bug/sanity.pl
index 284eb99..1976d6d 100644
--- a/bug/sanity.pl
+++ b/bug/sanity.pl
@@ -64,9 +64,12 @@ sub analyze {
         if($value == -1) {
             print "component $key found in the wiki but not in the bugzilla\n";
             $status++;
-        } elsif($value == 0) {
+        } elsif($value == 0 && ($key =~ /^\p{isUpper}/) ) {
             print "component $key found in bugzilla but not in the wiki\n";
             $status++;
+       } elsif($value >= 1 && ($key =~ /^\p{isLower}/) ) {
+           print "component $key found in wiki but is a lower-case module\n";
+           $status++;
         } elsif($value > 1) {
             print "component $key found $value times in the wiki\n";
             $status++;
@@ -99,7 +102,7 @@ sub tests {
     }
 
     my($status) = analyze($bugzilla2wiki, 'sanity-query.xhtml', 'sanity-components.xhtml');
-    ok($status == 4, "analyze $status");
+    ok($status == 5, "analyze $status");
 
     done_testing(21);
 }
-- 
1.7.9.5

From 728877c5ee87b986a4a9d7d04f8acb13f00660a0 Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Mon, 16 Jul 2012 23:07:33 +0200
Subject: [PATCH] Remove the contrib-icon from the components-icons.

---
 bug/bug.xhtml |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index c5d056c..f4c4e05 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -124,7 +124,9 @@
               </div>
               <div>
                 <div class="components_icons">
-                  <div><img src="icons/WRITER.png" title="Text Document" data="Writer" alt="Text 
Document" /><img src="icons/Spreadsheet.png" title="Spreadsheet" data="Spreadsheet" 
alt="Spreadsheet" /><img src="icons/Presentation.png" title="Presentation" data="Presentation" 
alt="Presentation" /><img src="icons/Drawing.png" title="Drawing" data="Drawing" alt="Drawing" 
/><img src="icons/Database.png" title="Database" data="Database" alt="Database" /><img 
src="icons/Chart.png" title="Chart" data="Chart" alt="Chart" /></div><div><img 
src="icons/Libreoffice.png" title="Localization" data="Localization" alt="Localization" /><img 
src="icons/Documentation.png" title="Documentation" data="Documentation" alt="Documentation" /><img 
src="icons/Extensions.png" title="Extensions" data="Extensions" alt="Extensions" /><img 
src="icons/WWW.png" title="Web Pages" data="WWW" alt="Web Pages" /><img src="icons/Libreoffice.png" 
title="Contrib" data="contrib" alt="Contrib" /><img src="icons/Libreoffice.png" title="Linguistic" 
data="Linguistic" alt="Linguistic" /></div><div><img src="icons/Installation.png" 
title="Installation" data="Installation" alt="Installation" /><img src="icons/Libreoffice.png" 
title="BASIC" data="BASIC" alt="BASIC" /><img src="icons/Formula_editor.png" title="Formula Editor" 
data="Formula_Editor" alt="Formula Editor" /><img src="icons/PDF_export.png" title="Printing and 
PDF export" data="Printing_and_PDF_export" alt="Printing and PDF export" /><img 
src="icons/Libreoffice.png" title="User Interface" data="UI" alt="User Interface" /><img 
src="icons/Libreoffice.png" title="Unspecified" data="Libreoffice" alt="Unspecified" /></div>
+                  <div><img src="icons/WRITER.png" title="Text Document" data="Writer" alt="Text 
Document" /><img src="icons/Spreadsheet.png" title="Spreadsheet" data="Spreadsheet" 
alt="Spreadsheet" /><img src="icons/Presentation.png" title="Presentation" data="Presentation" 
alt="Presentation" /><img src="icons/Drawing.png" title="Drawing" data="Drawing" alt="Drawing" 
/><img src="icons/Database.png" title="Database" data="Database" alt="Database" /><img 
src="icons/Chart.png" title="Chart" data="Chart" alt="Chart" /></div>
+                 <div><img src="icons/Libreoffice.png" title="Localization" data="Localization" 
alt="Localization" /><img src="icons/Documentation.png" title="Documentation" data="Documentation" 
alt="Documentation" /><img src="icons/Extensions.png" title="Extensions" data="Extensions" 
alt="Extensions" /><img src="icons/WWW.png" title="Web Pages" data="WWW" alt="Web Pages" /><img 
src="icons/Libreoffice.png" title="Linguistic" data="Linguistic" alt="Linguistic" /><img 
src="icons/Installation.png" title="Installation" data="Installation" alt="Installation" /></div>
+                 <div><img src="icons/Libreoffice.png" title="BASIC" data="BASIC" alt="BASIC" 
/><img src="icons/Formula_editor.png" title="Formula Editor" data="Formula_Editor" alt="Formula 
Editor" /><img src="icons/PDF_export.png" title="Printing and PDF export" 
data="Printing_and_PDF_export" alt="Printing and PDF export" /><img src="icons/Libreoffice.png" 
title="User Interface" data="UI" alt="User Interface" /><img src="icons/Libreoffice.png" 
title="Unspecified" data="Libreoffice" alt="Unspecified" /></div>
                 </div>
                 <div class="component_comments_container">&component_comments;</div>
               </div>
-- 
1.7.9.5


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.