SF.net SVN: languagetool:[8514] trunk/JLanguageTool/CHANGES.txt

2012-12-08 Thread dnaber
Revision: 8514
  
http://languagetool.svn.sourceforge.net/languagetool/?rev=8514view=rev
Author:   dnaber
Date: 2012-12-08 11:38:52 + (Sat, 08 Dec 2012)
Log Message:
---
re-format changes

Modified Paths:
--
trunk/JLanguageTool/CHANGES.txt

Modified: trunk/JLanguageTool/CHANGES.txt
===
--- trunk/JLanguageTool/CHANGES.txt 2012-12-08 11:34:14 UTC (rev 8513)
+++ trunk/JLanguageTool/CHANGES.txt 2012-12-08 11:38:52 UTC (rev 8514)
@@ -34,41 +34,39 @@
  -English:
   -uses the same word tokenizer again as other European languages
 
- -OpenOffice/LibreOffice: Fixed ConcurrentModificationException (Sourceforge 
bug #3572536)
+ -OpenOffice/LibreOffice integration:
+  -Fixed ConcurrentModificationException (Sourceforge bug #3572536)
 
- -API: Language.getLanguageForShortName() now consistently throws an exception
-  if the given language code is not known
+ -stand-alone GUI:
+  -the tray icon menu (reachable with the right mouse button on the tray
+   icon) now has a checkbox to enable the embedded HTTP server
+  -the tray icon will show a small S symbol when the server is running
+  -fixed bug Tray icon too big sometimes (Sourceforge #3573078)
 
- -API: Tools.median() is now private (it was accidentally made public)
+ -API:
+  -Language.getLanguageForShortName() now consistently throws an exception
+   if the given language code is not known
+  -Tools.median() is now private (it was accidentally made public)
+  -the Java API of HTTPServer has been modified in incompatible ways. You 
might get
+   compile errors if you have used this class from your Java code.
 
- -HTTP API: the XML we return now contains a new attribute 
locqualityissuetype, which
-  is the Localization Quality Issue Type in the upcoming 
Internationalization Tag Set (ITS)
-  Version 2.0 standard from W3C. This means errors are now categorized 
according to
-  a standard, additionally to LanguageTool's own categories. Useful values are 
only
-  returned for English for now.
-  *** Please consider this to be a prototypical implementation for now ***
-  For the values and their meanings, please see
-  
http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#lqissue-typevalues.
-  For rule developers: specify this using the new 'type' attribute. It is
-  inherited from category to rulegroup, and from rulegroup to rule. If a rule 
also
-  has the 'type' it overwrites the rulegroup's and category's 'type'.
+ -HTTP API:
+  -support for auto-detecting text language (parameter autodetect=1)
+  -added HTTPSServer, a lightweight embedded HTTPS server which works like 
HTTPServer
+   but supports SSL encryption. This server supports *only* https, not http.
+  -the XML we return now contains a new attribute locqualityissuetype, which
+   is the Localization Quality Issue Type in the upcoming 
Internationalization Tag Set (ITS)
+   Version 2.0 standard from W3C. This means errors are now categorized 
according to
+   a standard, additionally to LanguageTool's own categories. Useful values 
are only
+   returned for English for now.
+   *** Please consider this to be a prototypical implementation for now ***
+   For the values and their meanings, please see
+   
http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#lqissue-typevalues.
+   For rule developers: specify this using the new 'type' attribute. It is
+   inherited from category to rulegroup, and from rulegroup to rule. If a rule 
also
+   has the 'type' it overwrites the rulegroup's and category's 'type'.
 
- -HTTP API: support for auto-detecting text language (parameter autodetect=1)
 
- -HTTP API: added HTTPSServer, a lightweight embedded HTTPS server which works 
like HTTPServer
-  but supports SSL encryption. This server supports *only* https, not http.
-
- -HTTP API: the Java API of HTTPServer has been modified in incompatible ways. 
You might get
-  compile errors if you have used this class from your Java code.
-
- -stand-alone GUI: the tray icon menu (reachable with the right mouse button 
on the tray
-  icon) now has a checkbox to enable the embedded HTTP server
-
- -stand-alone GUI: the tray icon will show a small S symbol when the server 
is running
-
- -stand-alone GUI: Fixed bug Tray icon too big sometimes (Sourceforge 
#3573078)
-
-
 1.9 (2012-09-30)
 
  -Breton:

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


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Languagetool-commits mailing list

SF.net SVN: languagetool:[8516] trunk/JLanguageTool/src/main/java/org/ languagetool/gui/MainMenuBar.java

2012-12-08 Thread dnaber
Revision: 8516
  
http://languagetool.svn.sourceforge.net/languagetool/?rev=8516view=rev
Author:   dnaber
Date: 2012-12-08 13:47:49 + (Sat, 08 Dec 2012)
Log Message:
---
a bit more code cleanup; use InputEvent instead of Event to calm down IDEA 
warning

Modified Paths:
--
trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java

Modified: 
trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java
===
--- trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java 
2012-12-08 13:39:54 UTC (rev 8515)
+++ trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java 
2012-12-08 13:47:49 UTC (rev 8516)
@@ -18,9 +18,9 @@
  */
 package org.languagetool.gui;
 
-import java.awt.Event;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.util.ResourceBundle;
 
@@ -65,44 +65,44 @@
 helpMenu.setMnemonic(getMnemonic(guiMenuHelp));
 // Open:
 final JMenuItem openItem = new JMenuItem(openText);
-openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, 
Event.CTRL_MASK));
+openItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_O));
 openItem.setMnemonic(getMnemonic(guiMenuOpen));
 openItem.addActionListener(this);
 fileMenu.add(openItem);
 // Check Text in Clipboard:
 final JMenuItem checkClipboardItem = new JMenuItem(checkClipboardText);
-checkClipboardItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, 
Event.CTRL_MASK));
+checkClipboardItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_Y));
 checkClipboardItem.setMnemonic(getMnemonic(guiMenuCheckClipboard));
 checkClipboardItem.addActionListener(this);
 fileMenu.add(checkClipboardItem);
 // Hide to System Tray:
 final JMenuItem dockToTrayItem = new JMenuItem(dockToTrayText);
 dockToTrayItem.setMnemonic(getMnemonic(guiMenuHide));
-dockToTrayItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, 
Event.CTRL_MASK));
+dockToTrayItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_D));
 dockToTrayItem.addActionListener(this);
 fileMenu.add(dockToTrayItem);
 // Add Language:
 final JMenuItem addLanguageItem = new JMenuItem(addLanguageText);
 addLanguageItem.setMnemonic(getMnemonic(guiMenuAddRules));
-addLanguageItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, 
Event.CTRL_MASK));
+addLanguageItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_A));
 addLanguageItem.addActionListener(this);
 fileMenu.add(addLanguageItem);
 // Tag Text
 final JMenuItem tagItem = new JMenuItem(tagText);
 tagItem.addActionListener(this);
 tagItem.setMnemonic(getMnemonic(guiTagText));
-tagItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, 
Event.CTRL_MASK));
+tagItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_T));
 fileMenu.add(tagItem);
 // Options:
 final JMenuItem optionsItem = new JMenuItem(optionsText);
 optionsItem.setMnemonic(getMnemonic(guiMenuOptions));
-optionsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, 
Event.CTRL_MASK));
+optionsItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_S));
 optionsItem.addActionListener(this);
 fileMenu.add(optionsItem);
 // Quit:
 final JMenuItem quitItem = new JMenuItem(quitText);
 quitItem.setMnemonic(getMnemonic(guiMenuQuit));
-quitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, 
Event.CTRL_MASK));
+quitItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_Q));
 quitItem.addActionListener(this);
 fileMenu.add(quitItem);
 // About:
@@ -131,6 +131,10 @@
 aboutText = getLabel(guiMenuAbout);
   }
 
+  private KeyStroke getCtrlKeyStroke(int keyEvent) {
+return KeyStroke.getKeyStroke(keyEvent, InputEvent.CTRL_MASK);
+  }
+
   private char getMnemonic(String key) {
 return StringTools.getMnemonic(messages.getString(key));
   }

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


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Languagetool-commits mailing list
Languagetool-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-commits


SF.net SVN: languagetool:[8517] trunk/JLanguageTool/src/main

2012-12-08 Thread dnaber
Revision: 8517
  
http://languagetool.svn.sourceforge.net/languagetool/?rev=8517view=rev
Author:   dnaber
Date: 2012-12-08 14:13:55 + (Sat, 08 Dec 2012)
Log Message:
---
more code cleanup; add separators to the menu; improve order of menu items

Modified Paths:
--
trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java

trunk/JLanguageTool/src/main/resources/org/languagetool/MessagesBundle.properties

trunk/JLanguageTool/src/main/resources/org/languagetool/MessagesBundle_en.properties

Modified: 
trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java
===
--- trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java 
2012-12-08 13:47:49 UTC (rev 8516)
+++ trunk/JLanguageTool/src/main/java/org/languagetool/gui/MainMenuBar.java 
2012-12-08 14:13:55 UTC (rev 8517)
@@ -39,110 +39,69 @@
 class MainMenuBar extends JMenuBar implements ActionListener {
 
   private static final long serialVersionUID = -7160998682243081767L;
+  private static final int NO_KEY_EVENT = -1;
 
   private final ResourceBundle messages;
-  
+  private final Main prg;
+
   // File:
-  private String openText;
-  private String checkClipboardText;
-  private String dockToTrayText;
-  private String addLanguageText;
-  private String optionsText;
-  private String tagText;
-  private String quitText;  
+  private final String openText;
+  private final String checkClipboardText;
+  private final String dockToTrayText;
+  private final String addLanguageText;
+  private final String optionsText;
+  private final String tagText;
+  private final String quitText;
   // Help:
-  private String aboutText;
+  private final String aboutText;
 
-  private final Main prg;
-  private JMenu fileMenu;
-  private JMenu helpMenu;
-  
   MainMenuBar(Main prg, ResourceBundle messages) {
 this.prg = prg;
 this.messages = messages;
-initStrings();
+final JMenu fileMenu = new JMenu(getLabel(guiMenuFile));
 fileMenu.setMnemonic(getMnemonic(guiMenuFile));
+final JMenu helpMenu = new JMenu(getLabel(guiMenuHelp));
 helpMenu.setMnemonic(getMnemonic(guiMenuHelp));
-// Open:
-final JMenuItem openItem = new JMenuItem(openText);
-openItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_O));
-openItem.setMnemonic(getMnemonic(guiMenuOpen));
-openItem.addActionListener(this);
-fileMenu.add(openItem);
-// Check Text in Clipboard:
-final JMenuItem checkClipboardItem = new JMenuItem(checkClipboardText);
-checkClipboardItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_Y));
-checkClipboardItem.setMnemonic(getMnemonic(guiMenuCheckClipboard));
-checkClipboardItem.addActionListener(this);
-fileMenu.add(checkClipboardItem);
-// Hide to System Tray:
-final JMenuItem dockToTrayItem = new JMenuItem(dockToTrayText);
-dockToTrayItem.setMnemonic(getMnemonic(guiMenuHide));
-dockToTrayItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_D));
-dockToTrayItem.addActionListener(this);
-fileMenu.add(dockToTrayItem);
-// Add Language:
-final JMenuItem addLanguageItem = new JMenuItem(addLanguageText);
-addLanguageItem.setMnemonic(getMnemonic(guiMenuAddRules));
-addLanguageItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_A));
-addLanguageItem.addActionListener(this);
-fileMenu.add(addLanguageItem);
-// Tag Text
-final JMenuItem tagItem = new JMenuItem(tagText);
-tagItem.addActionListener(this);
-tagItem.setMnemonic(getMnemonic(guiTagText));
-tagItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_T));
-fileMenu.add(tagItem);
-// Options:
-final JMenuItem optionsItem = new JMenuItem(optionsText);
-optionsItem.setMnemonic(getMnemonic(guiMenuOptions));
-optionsItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_S));
-optionsItem.addActionListener(this);
-fileMenu.add(optionsItem);
-// Quit:
-final JMenuItem quitItem = new JMenuItem(quitText);
-quitItem.setMnemonic(getMnemonic(guiMenuQuit));
-quitItem.setAccelerator(getCtrlKeyStroke(KeyEvent.VK_Q));
-quitItem.addActionListener(this);
-fileMenu.add(quitItem);
-// About:
-final JMenuItem helpItem = new JMenuItem(aboutText);
-helpItem.addActionListener(this);
-helpItem.setMnemonic(getMnemonic(guiMenuAbout));
-helpMenu.add(helpItem);   
-
-// add menus:
+
+openText = addMenuItem(guiMenuOpen, KeyEvent.VK_O, fileMenu);
+checkClipboardText = addMenuItem(guiMenuCheckClipboard, KeyEvent.VK_Y, 
fileMenu);
+tagText = addMenuItem(guiTagText, KeyEvent.VK_T, fileMenu);
+addLanguageText = addMenuItem(guiMenuAddRules, NO_KEY_EVENT, fileMenu);
+optionsText = addMenuItem(guiMenuOptions, KeyEvent.VK_S, fileMenu);
+fileMenu.addSeparator();
+dockToTrayText = addMenuItem(guiMenuHide, KeyEvent.VK_D, fileMenu);
+fileMenu.addSeparator();
+quitText = 

SF.net SVN: languagetool:[8519] trunk/extension

2012-12-08 Thread gulp21-1
Revision: 8519
  
http://languagetool.svn.sourceforge.net/languagetool/?rev=8519view=rev
Author:   gulp21-1
Date: 2012-12-08 20:19:07 + (Sat, 08 Dec 2012)
Log Message:
---
[extension] escape every dynamicly created strings
update ui strings + descriptions to reflect latest changes

Modified Paths:
--
trunk/extension/common/locales/en-US/description.txt
trunk/extension/firefox/TODO
trunk/extension/firefox/lib/main.js
trunk/extension/firefox/locale/de-DE.properties
trunk/extension/firefox/locale/en-US.properties
trunk/extension/firefox/package.json

Modified: trunk/extension/common/locales/en-US/description.txt
===
--- trunk/extension/common/locales/en-US/description.txt2012-12-08 
16:19:29 UTC (rev 8518)
+++ trunk/extension/common/locales/en-US/description.txt2012-12-08 
20:19:07 UTC (rev 8519)
@@ -24,18 +24,18 @@
 liSelect “Customize…”./li
 liDrag and drop the icon to wherever you want./li
 liClick on “Done”./li
-liYou might want to close add-on bar by clicking on the close icon on the 
left./li
+liYou might want to close the add-on bar by clicking on the close icon on 
the left./li
 /ol
 
 bKnown Issues/b
 
 ul
 liIt is not possible to check texts on websites which were loaded before the 
installation of the extension./li
-liIf you select a headline and the following paragraph, you might get a 
warning about wrong case because LanguageTool doesn't consider the 
paragraph./li
+liIf you select a headline and the following paragraph, you might get a 
warning about wrong case because LanguageTool doesn't consider the paragraph. 
It might also happen that the last word of the first paragraph and the first 
word of the second paragraph are joined together./li
 li“Text” between script-HTML-tags is checked, if it is part of the 
selection./li
 /ul
 
-bWhere can I report whishes, problems, or false alarms?/b
+bWhere can I report wishes, problems, or false alarms?/b
 
 If you have any suggestion or problems, or you want to report a false alarm, 
you can leave a message in the a 
href=http://languagetool.org/forum/;LanguageTool foruma or on the a 
href=https://lists.sourceforge.net/lists/listinfo/languagetool-devel;mailing 
list/a. Bug reports can also be added to the a 
href=http://sourceforge.net/tracker/?group_id=110216;bug tracker/a. 
bPlease do not use the rating feature if you want to report a problem./b
 

Modified: trunk/extension/firefox/TODO
===
--- trunk/extension/firefox/TODO2012-12-08 16:19:29 UTC (rev 8518)
+++ trunk/extension/firefox/TODO2012-12-08 20:19:07 UTC (rev 8519)
@@ -1,7 +1,7 @@
 - password fields (type=password) should probably not be send to the server 
at all,
   for privacy reasons and because it doesn't make sense anyway
 
-- possibility to undock the panel (overlay webpage)
+- possibility to undock the panel (overlay webpage or sidebar)
 
 - bug: CTRL-A and check on languagetool.org and you'll get Javascript code 
checked.
   Text in between script.../script should probably be ignored.

Modified: trunk/extension/firefox/lib/main.js
===
--- trunk/extension/firefox/lib/main.js 2012-12-08 16:19:29 UTC (rev 8518)
+++ trunk/extension/firefox/lib/main.js 2012-12-08 20:19:07 UTC (rev 8519)
@@ -8,6 +8,7 @@
 var widgets=require(widget);
 var _=require(l10n).get;
 
+var EMPTYTEXTWARNING=div class=\status\+_(emptyText)+/div;
 var PLEASEWAITWHILECHECKING=div 
class=\status\+_(pleaseWaitWhileChecking)+/div;
 var MAXCONTEXTLENGTH=20;
 var MAXLENGTHWEBSERVICE=5;
@@ -46,6 +47,7 @@
if(error.indexOf(language code)!=-1) {
prepend=_(checkLanguageCode)+br/;
}
+   error=escapeXml(error);
return prepend
   + error.replace(/(\r\n|\n|\r)/, a id=\unhidelink\ 
href=\javascript:unhide();\…/abr/)
  .replace(/\br\/\/,div class=\hidden\)
@@ -73,8 +75,8 @@
var returnTextGrammar=;
var returnTextSpelling=;

-   var lang=getLanguage(response, name);
-   var mothertongue=getLanguage(response, mothertonguename);
+   var lang=escapeXml(getLanguage(response, name));
+   var mothertongue=escapeXml(getLanguage(response, mothertonguename));

if(lang!=) {
returnLanguage=div class=\status\+_(textLanguage)+ 
+lang+/div;
@@ -114,7 +116,7 @@
}
returnText+=div class=\context\+l+span 
class=\+spanclass+\+m+/span+r+/div;

-   url=getAttributeValue(response[i],url);
+   url=escapeXml(getAttributeValue(response[i],url));
if(url!=) {
returnText+=div class=\url\a targer=\_blank\ 
href=\+url+\+_(moreInformation)+/a/div;
}
@@ -147,8 +149,6 @@
 });
 
 function widgetClicked() 

SF.net SVN: languagetool:[8520] trunk/JLanguageTool/src/main/dev/tools/ ltdiff/en.txt

2012-12-08 Thread gulp21-1
Revision: 8520
  
http://languagetool.svn.sourceforge.net/languagetool/?rev=8520view=rev
Author:   gulp21-1
Date: 2012-12-08 20:52:17 + (Sat, 08 Dec 2012)
Log Message:
---
[ltdiff] better translation note

Modified Paths:
--
trunk/JLanguageTool/src/main/dev/tools/ltdiff/en.txt

Modified: trunk/JLanguageTool/src/main/dev/tools/ltdiff/en.txt
===
--- trunk/JLanguageTool/src/main/dev/tools/ltdiff/en.txt2012-12-08 
20:19:07 UTC (rev 8519)
+++ trunk/JLanguageTool/src/main/dev/tools/ltdiff/en.txt2012-12-08 
20:52:17 UTC (rev 8520)
@@ -6,4 +6,4 @@
 IMPROVED RULE
 finds error in:
 does not find error in:
-#TRANSLATION NOTE: replace the language in the first string with your 
language. 0VERSION is a variable which is replaced with a version number.
\ No newline at end of file
+#TRANSLATION NOTE: Replace the language in the first two strings with your 
language (e.g. Changes for English becomes Änderungen für Deutsch [Changes 
for German] in the German translation). 0VERSION is a variable which is 
replaced with a version number. The translations are used for the sub-pages of 
http://www.languagetool.org/changes/V_1_8_to_V_1_9/.
\ No newline at end of file

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


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Languagetool-commits mailing list
Languagetool-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-commits