Revision: 9495
http://languagetool.svn.sourceforge.net/languagetool/?rev=9495&view=rev
Author: dnaber
Date: 2013-02-26 20:55:41 +0000 (Tue, 26 Feb 2013)
Log Message:
-----------
i18n on the WikiCheck page
Modified Paths:
--------------
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
trunk/ltcommunity/grails-app/i18n/messages.properties
trunk/ltcommunity/grails-app/i18n/messages_en.properties
trunk/ltcommunity/grails-app/views/homepage/index.gsp
trunk/ltcommunity/grails-app/views/wikiCheck/index.gsp
Modified:
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
===================================================================
---
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2013-02-25 22:43:06 UTC (rev 9494)
+++
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2013-02-26 20:55:41 UTC (rev 9495)
@@ -32,6 +32,13 @@
private String CONVERT_URL_PREFIX =
"http://community.languagetool.org/wikipediatotext/wikiSyntaxConverter/convert?url="
def index = {
+ String langCode
+ try {
+ Language langObj = params.lang ?
Language.getLanguageForShortName(params.lang) : null
+ langCode = langObj ? langObj.getShortName() : 'en'
+ } catch (IllegalArgumentException e) {
+ langCode = 'en'
+ }
if (params.url) {
final Properties langToDisabledRules = new Properties()
langToDisabledRules.load(new
FileInputStream(grailsApplication.config.disabledRulesPropFile))
@@ -69,9 +76,11 @@
realUrl: pageUrl,
realEditUrl: pageEditUrl,
disabledRuleIds: checker.getDisabledRuleIds(),
- plainText: plainText]
+ plainText: plainText,
+ languages: Language.REAL_LANGUAGES,
+ langCode: langCode]
} else {
- []
+ [languages: Language.REAL_LANGUAGES, langCode: langCode]
}
}
Modified: trunk/ltcommunity/grails-app/i18n/messages.properties
===================================================================
--- trunk/ltcommunity/grails-app/i18n/messages.properties 2013-02-25
22:43:06 UTC (rev 9494)
+++ trunk/ltcommunity/grails-app/i18n/messages.properties 2013-02-26
20:55:41 UTC (rev 9495)
@@ -152,3 +152,22 @@
ltc.user.opinion.title=Top Corpus Matches voted as 'useless'
ltc.user.opinion.votes=Votes
ltc.user.opinion.match=Match
+
+ltc.wikicheck.title=Proofreading Wikipedia Pages - LanguageTool WikiCheck
+ltc.wikicheck.headline=LanguageTool WikiCheck
+ltc.wikicheck.intro=Use this form to check Wikipedia pages with <a
href="http://www.languagetool.org">LanguageTool</a>:
+ltc.wikicheck.url=Wikipedia URL:
+ltc.wikicheck.check.page=Check Page
+ltc.wikicheck.random.page=Random Page
+ltc.wikicheck.example.page=Example Page
+ltc.wikicheck.example.page.url=http://en.wikipedia.org/wiki/User_talk:Dnaber
+ltc.wikicheck.bookmarklet=Bookmark this link and call the bookmark on any
Wikipedia page to check it:
+ltc.wikicheck.bookmarklet.link=WikiCheck Bookmarklet
+ltc.wikicheck.result.headline=Result
+ltc.wikicheck.result.url=URL:
+ltc.wikicheck.result.edit=edit
+ltc.wikicheck.rules.intro=Some LanguageTool rules are not activated.
+ltc.wikicheck.rules.message=The spell checking rule and the following rules
have been disabled because they currently cause many false alarms on Wikipedia
text:
+ltc.wikicheck.rules.activate.all=You can add <tt style="background-color:
#eeeeee">&disabled=none</tt> to the URL of this page to activate all rules
except spell checking.
+
+
Modified: trunk/ltcommunity/grails-app/i18n/messages_en.properties
===================================================================
--- trunk/ltcommunity/grails-app/i18n/messages_en.properties 2013-02-25
22:43:06 UTC (rev 9494)
+++ trunk/ltcommunity/grails-app/i18n/messages_en.properties 2013-02-26
20:55:41 UTC (rev 9495)
@@ -123,3 +123,22 @@
ltc.user.opinion.title=Top Corpus Matches voted as 'useless'
ltc.user.opinion.votes=Votes
ltc.user.opinion.match=Match
+
+ltc.wikicheck.title=Proofreading Wikipedia Pages - LanguageTool WikiCheck
+ltc.wikicheck.headline=LanguageTool WikiCheck
+ltc.wikicheck.intro=Use this form to check Wikipedia pages with <a
href="http://www.languagetool.org">LanguageTool</a>:
+ltc.wikicheck.url=Wikipedia URL:
+ltc.wikicheck.check.page=Check Page
+ltc.wikicheck.random.page=Random Page
+ltc.wikicheck.example.page=Example Page
+ltc.wikicheck.example.page.url=http://en.wikipedia.org/wiki/User_talk:Dnaber
+ltc.wikicheck.bookmarklet=Bookmark this link and call the bookmark on any
Wikipedia page to check it:
+ltc.wikicheck.bookmarklet.link=WikiCheck Bookmarklet
+ltc.wikicheck.result.headline=Result
+ltc.wikicheck.result.url=URL:
+ltc.wikicheck.result.edit=edit
+ltc.wikicheck.rules.intro=Some LanguageTool rules are not activated.
+ltc.wikicheck.rules.message=The spell checking rule and the following rules
have been disabled because they currently cause many false alarms on Wikipedia
text:
+ltc.wikicheck.rules.activate.all=You can add <tt style="background-color:
#eeeeee">&disabled=none</tt> to the URL of this page to activate all rules
except spell checking.
+
+
Modified: trunk/ltcommunity/grails-app/views/homepage/index.gsp
===================================================================
--- trunk/ltcommunity/grails-app/views/homepage/index.gsp 2013-02-25
22:43:06 UTC (rev 9494)
+++ trunk/ltcommunity/grails-app/views/homepage/index.gsp 2013-02-26
20:55:41 UTC (rev 9495)
@@ -49,7 +49,7 @@
<br />
- <h2><g:link controller="wikiCheck"><g:message
code="ltc.wiki.check"/></g:link></h2>
+ <h2><g:link controller="wikiCheck" params="${[lang: params.lang ?
params.lang : 'en']}"><g:message code="ltc.wiki.check"/></g:link></h2>
<br />
Modified: trunk/ltcommunity/grails-app/views/wikiCheck/index.gsp
===================================================================
--- trunk/ltcommunity/grails-app/views/wikiCheck/index.gsp 2013-02-25
22:43:06 UTC (rev 9494)
+++ trunk/ltcommunity/grails-app/views/wikiCheck/index.gsp 2013-02-26
20:55:41 UTC (rev 9495)
@@ -4,7 +4,7 @@
<html>
<head>
- <title>Proofreading Wikipedia Pages - LanguageTool WikiCheck</title>
+ <title><g:message code="ltc.wikicheck.title"/></title>
<meta name="layout" content="main" />
<meta name="robots" content="noindex" />
<script type="text/javascript">
@@ -21,38 +21,38 @@
<div class="body">
+ <g:render template="/languageSelection"/>
+
<div class="dialog">
- <h1>LanguageTool WikiCheck</h1>
+ <h1><g:message code="ltc.wikicheck.headline"/></h1>
<p>
- Use this form to check Wikipedia pages with <a
href="http://www.languagetool.org">LanguageTool</a>:
+ <g:message code="ltc.wikicheck.intro"/>
</p>
<div style="margin-top:10px;margin-bottom:10px;">
<g:form action="index" method="get">
- Wikipedia URL: <input style="width:350px" name="url"
value="${url?.encodeAsHTML()}"/>
- <input type="submit" value="Check Page"/>
+ <g:message code="ltc.wikicheck.url"/> <input
style="width:350px" name="url" value="${url?.encodeAsHTML()}"/>
+ <input type="submit"
value="${message(code:'ltc.wikicheck.check.page')}"/>
</g:form>
</div>
- <g:link action="index" params="${[url:
'http://en.wikipedia.org/wiki/User_talk:Dnaber']}">English example</g:link>
- · <g:link action="index" params="${[url:
'http://de.wikipedia.org/wiki/Benutzer_Diskussion:Dnaber']}">German
example</g:link>
- · <g:link action="index" params="${[url:
'random:en']}">Random English page</g:link>
- · <g:link action="index" params="${[url:
'random:de']}">Random German page</g:link>
+ <g:link action="index" params="${[url:
message(code:'ltc.wikicheck.example.page.url'), lang: langCode]}"><g:message
code="ltc.wikicheck.example.page"/></g:link>
+ · <g:link action="index" params="${[url: 'random:' +
langCode, lang: langCode]}"><g:message
code="ltc.wikicheck.random.page"/></g:link>
<p style="margin-top: 10px">
- Bookmark and call on any Wikipedia page to check it:
- <a
href="javascript:(function(){%20window.open('http://community.languagetool.org/wikiCheck/index?url='+escape(location.href));%20})();">WikiCheck
Bookmarklet</a></p>
+ <g:message code="ltc.wikicheck.bookmarklet"/>
+ <a
href="javascript:(function(){%20window.open('http://community.languagetool.org/wikiCheck/index?url='+escape(location.href));%20})();"><g:message
code="ltc.wikicheck.bookmarklet.link"/></a></p>
<br />
<g:if test="${result}">
- <h2 style="margin-top:10px;margin-bottom:10px">Result</h2>
+ <h2 style="margin-top:10px;margin-bottom:10px"><g:message
code="ltc.wikicheck.result.headline"/></h2>
- <p>URL: <a
href="${realUrl.encodeAsHTML()}">${realUrl.encodeAsHTML()}</a> (<a
href="${realEditUrl}">edit</a>)</p>
+ <p><g:message code="ltc.wikicheck.result.url"/> <a
href="${realUrl.encodeAsHTML()}">${realUrl.encodeAsHTML()}</a> (<a
href="${realEditUrl}"><g:message code="ltc.wikicheck.result.edit"/></a>)</p>
<br />
@@ -60,24 +60,24 @@
<br /><br />
<div style="color:#555555;">
- Some LanguageTool rules are not activated.
+ <g:message code="ltc.wikicheck.rules.intro"/>
<a style="color: #555555"
href="javascript:toggleId('disabledRuleInfo');">Details</a>.
<div id="disabledRuleInfo" style="margin-top: 5px;
display: none;color:#444444;">
- The spell checking rule and the following rules have
been disabled because they currently
- cause many false alarms on Wikipedia text:
+ <g:message code="ltc.wikicheck.rules.message"/>
<g:each in="${disabledRuleIds}" var="ruleId"
status="i">
<g:if test="${i > 0}">
·
</g:if>
<a style="color:#444444;font-weight:normal"
href="http://community.languagetool.org/rule/show/${ruleId.encodeAsURL()}?lang=${lang.encodeAsHTML()}">${ruleId.encodeAsHTML()}</a>
</g:each>
- <div style="margin-top: 5px">You can add <tt
style="background-color: #eeeeee">&disabled=none</tt>
- to the URL of this page to activate all rules
except spell checking.</div>
+ <div style="margin-top: 5px">
+ <g:message
code="ltc.wikicheck.rules.activate.all"/>
+ </div>
</div>
</div>
</g:if>
- <div style="margin-top:10px;color:#888888">LanguageTool Version:
${JLanguageTool.VERSION} from ${(new
JLanguageTool(Language.DEMO)).getBuildDate()}</div>
+ <div style="margin-top:10px;color:#888888">LanguageTool
${JLanguageTool.VERSION} (${(new
JLanguageTool(Language.DEMO)).getBuildDate()})</div>
</div>
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_feb
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits