Revision: 8999
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=8999&view=rev
Author:   dnaber
Date:     2013-01-13 14:14:20 +0000 (Sun, 13 Jan 2013)
Log Message:
-----------
online check: allow translation of the missing strings

Modified Paths:
--------------
    trunk/website/include/header.php
    trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
    
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js

Modified: trunk/website/include/header.php
===================================================================
--- trunk/website/include/header.php    2013-01-13 13:16:31 UTC (rev 8998)
+++ trunk/website/include/header.php    2013-01-13 14:14:20 UTC (rev 8999)
@@ -66,6 +66,29 @@
              });
          },
     
+         /* translations: */
+         languagetool_i18n_no_errors : 
+            {
+             // "No errors were found.":
+             'de-DE': 'Keine Fehler gefunden.'
+            },
+         languagetool_i18n_explain : 
+            {
+             // "Explain..." - shown if there's an URL with a more detailed 
description:
+             'de-DE': 'Mehr Informationen...'
+            },
+         languagetool_i18n_ignore_once : 
+            {
+             // "Ignore suggestion":
+             'de-DE': 'Hier ignorieren'
+            },
+         languagetool_i18n_ignore_all : 
+            {
+             // "Ignore this kind of error":
+             'de-DE': 'Fehler dieses Typs ignorieren'
+            },
+            
+         languagetool_i18n_current_lang :    function() { return 
document.checkform.lang.value; },
          /* the URL of your proxy file: */
          languagetool_rpc_url                 : "<?php print $rootUrl 
?>/online-check/tiny_mce/plugins/atd-tinymce/server/proxy.php?url=",
          /* edit this file to customize how LanguageTool shows errors: */

Modified: 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
===================================================================
--- 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js    
    2013-01-13 13:16:31 UTC (rev 8998)
+++ 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js    
    2013-01-13 14:14:20 UTC (rev 8999)
@@ -469,7 +469,9 @@
                var results = core.processXML(request.responseXML);
 
                if (results.length == 0) {
-                  
ed.windowManager.alert(plugin.editor.getLang('AtD.message_no_errors_found', 'No 
errors were found.'));
+                  var lang = 
plugin.editor.getParam('languagetool_i18n_current_lang')();
+                  var noErrorsText = 
plugin.editor.getParam('languagetool_i18n_no_errors')[lang] || "No errors were 
found.";
+                  ed.windowManager.alert(noErrorsText);
                }
                else {
                   plugin.markMyWords();
@@ -639,12 +641,17 @@
                m.addSeparator();
             }
              
+            var lang = 
plugin.editor.getParam('languagetool_i18n_current_lang')();
+            var explainText = 
plugin.editor.getParam('languagetool_i18n_explain')[lang] || "No errors were 
found.";
+            var ignoreThisText = 
plugin.editor.getParam('languagetool_i18n_ignore_once')[lang] || "Ignore 
suggestion";
+            var ignoreThisKindOfErrorText = 
plugin.editor.getParam('languagetool_i18n_ignore_all')[lang] || "Ignore this 
kind of error";
+             
             if (errorDescription != undefined && errorDescription["moreinfo"] 
!= null)
             {
                (function(url)
                 {
                    m.add({
-                     title : plugin.editor.getLang('AtD.menu_option_explain', 
'Explain...'),
+                     title : explainText,
                      onclick : function() { window.open(url, '_errorExplain'); 
}
                   });
                })(errorDescription["moreinfo"]);
@@ -653,7 +660,7 @@
             }
 
             m.add({
-               title : plugin.editor.getLang('AtD.menu_option_ignore_once', 
'Ignore suggestion'),
+               title : ignoreThisText,
                onclick : function() 
                {
                   dom.remove(e.target, 1);
@@ -662,7 +669,7 @@
             });
 
             m.add({
-              title : plugin.editor.getLang('menu_option_ignore_all', 'Ignore 
this kind of error'),
+              title : ignoreThisKindOfErrorText,
               onclick : function() 
               {
                  var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);

Modified: 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
===================================================================
--- 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
    2013-01-13 13:16:31 UTC (rev 8998)
+++ 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
    2013-01-13 14:14:20 UTC (rev 8999)
@@ -149,7 +149,9 @@
                var results = core.processXML(request.responseXML);
 
                if (results.length == 0) {
-                  
ed.windowManager.alert(plugin.editor.getLang('AtD.message_no_errors_found', 'No 
errors were found.'));
+                  var lang = 
plugin.editor.getParam('languagetool_i18n_current_lang')();
+                  var noErrorsText = 
plugin.editor.getParam('languagetool_i18n_no_errors')[lang] || "No errors were 
found.";
+                  ed.windowManager.alert(noErrorsText);
                }
                else {
                   plugin.markMyWords();
@@ -319,12 +321,17 @@
                m.addSeparator();
             }
              
+            var lang = 
plugin.editor.getParam('languagetool_i18n_current_lang')();
+            var explainText = 
plugin.editor.getParam('languagetool_i18n_explain')[lang] || "No errors were 
found.";
+            var ignoreThisText = 
plugin.editor.getParam('languagetool_i18n_ignore_once')[lang] || "Ignore 
suggestion";
+            var ignoreThisKindOfErrorText = 
plugin.editor.getParam('languagetool_i18n_ignore_all')[lang] || "Ignore this 
kind of error";
+             
             if (errorDescription != undefined && errorDescription["moreinfo"] 
!= null)
             {
                (function(url)
                 {
                    m.add({
-                     title : plugin.editor.getLang('AtD.menu_option_explain', 
'Explain...'),
+                     title : explainText,
                      onclick : function() { window.open(url, '_errorExplain'); 
}
                   });
                })(errorDescription["moreinfo"]);
@@ -333,7 +340,7 @@
             }
 
             m.add({
-               title : plugin.editor.getLang('AtD.menu_option_ignore_once', 
'Ignore suggestion'),
+               title : ignoreThisText,
                onclick : function() 
                {
                   dom.remove(e.target, 1);
@@ -342,7 +349,7 @@
             });
 
             m.add({
-              title : plugin.editor.getLang('menu_option_ignore_all', 'Ignore 
this kind of error'),
+              title : ignoreThisKindOfErrorText,
               onclick : function() 
               {
                  var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);

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


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to