Revision: 6538
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=6538&view=rev
Author:   dnaber
Date:     2012-02-20 22:42:38 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
new optional rule element "url" (optional): an URL to a page that explains the 
rule leading to the error in more detail -- not used yet

Modified Paths:
--------------
    trunk/JLanguageTool/CHANGES.txt
    trunk/JLanguageTool/src/rules/rules.xsd
    trunk/JLanguageTool/src/rules/xx/grammar.xml
    trunk/website/www/development/index.php

Modified: trunk/JLanguageTool/CHANGES.txt
===================================================================
--- trunk/JLanguageTool/CHANGES.txt     2012-02-20 19:27:37 UTC (rev 6537)
+++ trunk/JLanguageTool/CHANGES.txt     2012-02-20 22:42:38 UTC (rev 6538)
@@ -23,10 +23,15 @@
     the rule that checks for uppercase sentence starts (Maksym Davydov)
 
  -bugfix: the "fromx" position in the XML output was wrong sometimes
+
  -bugfix: the "contextoffset" position in the XML output was wrong
   when there were XML-escaped characters in the context
+
  -consecutive tab characters are not considered an error anymore
 
+ -new optional rule element "url" (optional): an URL to a page that explains
+  the rule leading to the error in more detail. Not used yet.
+
  -GUI: errors are now marked with red background instead of red font
   so whitespace problems can easily be spotted
 

Modified: trunk/JLanguageTool/src/rules/rules.xsd
===================================================================
--- trunk/JLanguageTool/src/rules/rules.xsd     2012-02-20 19:27:37 UTC (rev 
6537)
+++ trunk/JLanguageTool/src/rules/rules.xsd     2012-02-20 22:42:38 UTC (rev 
6538)
@@ -105,6 +105,7 @@
                        <xs:sequence>
                                <xs:element ref="pattern" />
                                <xs:element ref="message" />
+        <xs:element ref="url" minOccurs="0" maxOccurs="1" />
                                <xs:element ref="short" minOccurs="0" />        
                                                        
                                <xs:element ref="example" minOccurs="2" 
maxOccurs="unbounded" />
                        </xs:sequence>
@@ -142,7 +143,7 @@
        <xs:annotation>
                <xs:documentation xml:lang="en"> A short description of
                        the error detected by this rule displayed on the
-                       context menu in OOo.
+                       context menu in LibreOffice/OpenOffice.org.
                </xs:documentation>
        </xs:annotation>
        <xs:element name="short" type="xs:token" />
@@ -161,6 +162,12 @@
     </xs:complexType>
   </xs:element>
 
+    <xs:annotation>
+               <xs:documentation xml:lang="en">URL with further information
+                about the rule behind this error.</xs:documentation>
+       </xs:annotation>
+    <xs:element name="url" type="xs:anyURI" />
+
        <xs:annotation>
                <xs:documentation xml:lang="en"> Suggestion displayed to
                        the user. </xs:documentation>

Modified: trunk/JLanguageTool/src/rules/xx/grammar.xml
===================================================================
--- trunk/JLanguageTool/src/rules/xx/grammar.xml        2012-02-20 19:27:37 UTC 
(rev 6537)
+++ trunk/JLanguageTool/src/rules/xx/grammar.xml        2012-02-20 22:42:38 UTC 
(rev 6538)
@@ -80,14 +80,16 @@
       </includephrases>
     </phrase>
   </phrases>
+
   <category name="misc">
-    <!-- a trivialdemo rule that matches "foo" followed by "bar" -->
+    <!-- a trivial demo rule that matches "foo" followed by "bar" -->
     <rule id="DEMO_RULE" name="Find 'foo bar'">
       <pattern case_sensitive="no" mark_from="0">
         <token>foo</token>
         <token>bar</token>
       </pattern>
       <message>Did you mean <suggestion><match no="1"/> fuu 
bah</suggestion>?</message>
+      <url>http://fake-server.org/foo-bar-error-explained</url>
       <example type="correct">This is <marker>fuu bah</marker>.</example>
       <example correction="foo fuu bah" type="incorrect">This is <marker>foo 
bar</marker>.</example>
     </rule>

Modified: trunk/website/www/development/index.php
===================================================================
--- trunk/website/www/development/index.php     2012-02-20 19:27:37 UTC (rev 
6537)
+++ trunk/website/www/development/index.php     2012-02-20 22:42:38 UTC (rev 
6538)
@@ -2,7 +2,7 @@
 $page = "development";
 $title = "LanguageTool";
 $title2 = "Development";
-$lastmod = "2012-02-08 21:05:00 CET";
+$lastmod = "2012-02-20 21:05:00 CET";
 include("../../include/header.php");
 include('../../include/geshi/geshi.php');
 ?>
@@ -105,6 +105,7 @@
     <message>Did you mean
       <suggestion>bad</suggestion>?
     </message>
+    <url>http://some-server.org/the-bed-bad-error</url>
     <example type="correct">
       Sorry for my <marker>bad</marker> English.
     </example>
@@ -128,6 +129,8 @@
                as a regular expression</li>
        <li>element <tt>message</tt>: The text displayed to the user if this 
rule matches.
                Use sub-element <tt>suggestion</tt> to suggest a possible 
replacement that corrects the error.</li>
+    <li>element <tt>url</tt> (optional, since LanguageTool 1.7): An URL to a 
page that explains the rule leading to the error in more
+        detail. <!--Will be displayed in LibreOffice 3.5 or later when the 
user clicks the "More..." button.--></li>
        <li>element <tt>example</tt>: At least two examples that with one 
correct and one incorrect sentence.
                The incorrect sentence is supposed to be matched by this rule. 
The position of the error
                must be marked up with the sub-element <tt>marker</tt>. This is 
used by the 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Languagetool-cvs mailing list
Languagetool-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to