Revision: 9275
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9275&view=rev
Author:   dnaber
Date:     2013-01-30 22:28:25 +0000 (Wed, 30 Jan 2013)
Log Message:
-----------
fix link to sourcecode

Modified Paths:
--------------
    trunk/ltcommunity/grails-app/views/rule/show.gsp

Modified: trunk/ltcommunity/grails-app/views/rule/show.gsp
===================================================================
--- trunk/ltcommunity/grails-app/views/rule/show.gsp    2013-01-30 22:00:34 UTC 
(rev 9274)
+++ trunk/ltcommunity/grails-app/views/rule/show.gsp    2013-01-30 22:28:25 UTC 
(rev 9275)
@@ -32,7 +32,18 @@
                                    </g:if>
                                    <g:else>
                                        <span class="javaRule"><g:message 
code="ltc.rule.show.java.rule" /></span>
-                            <a 
href="http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLanguageTool/src/main/java/${rule.class.getName().replace(".",
 "/")}.java?view=markup">Sourcecode</a>
+                            <g:set var="langCode" value="${params.lang}"/>
+                            <g:if test="${params.lang.contains('-')}">
+                                <g:set var="langCode" 
value="${params.lang.substring(0, params.lang.indexOf('-'))}"/>
+                            </g:if>
+                            <g:if test="${rule.class.getName().contains('.' + 
langCode  + '.')}">
+                                <%-- language-specific rule --%>
+                                <a 
href="http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/languagetool/languagetool-language-modules/${langCode.encodeAsHTML()}/src/main/java/${rule.class.getName().replace(".",
 "/")}.java?view=markup">Sourcecode</a>
+                            </g:if>
+                            <g:else>
+                                <%-- generic rule --%>
+                                <a 
href="http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/languagetool/languagetool-core/src/main/java/${rule.class.getName().replace(".",
 "/")}.java?view=markup">Sourcecode</a>
+                            </g:else>
                             <br/>
                                    </g:else>
                     </td>

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


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to