svn commit: r4247 - branches/translation: . src/net/java/sip/communicator/plugin/translation src/net/java/sip/communicator/plugin/translation/service

ernipiggy at dev.java.net ernipiggy at dev.java.net
Thu Aug 14 09:30:13 CEST 2008


Author: ernipiggy
Date: 2008-08-14 07:30:10+0000
New Revision: 4247

Modified:
   branches/translation/SIP Branch.ipr
   branches/translation/SIP Branch.iws
   branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java
   branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java

Log:
Translation module beta 4
-Documenting and cleaning finished
-Only text encoding bug left (known bugs)

Modified: branches/translation/SIP Branch.ipr
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/SIP%20Branch.ipr?view=diff&rev=4247&p1=branches/translation/SIP%20Branch.ipr&p2=branches/translation/SIP%20Branch.ipr&r1=4246&r2=4247
==============================================================================
--- branches/translation/SIP Branch.ipr	(original)
+++ branches/translation/SIP Branch.ipr	2008-08-14 07:30:10+0000
@@ -84,7 +84,7 @@
     <option name="MAXIMUM_HEAP_SIZE" value="128" />
   </component>
   <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY" />
+    <option name="OUTPUT_DIRECTORY" value="/Users/rivera/javadoc" />
     <option name="OPTION_SCOPE" value="protected" />
     <option name="OPTION_HIERARCHY" value="true" />
     <option name="OPTION_NAVIGATOR" value="true" />
@@ -95,7 +95,7 @@
     <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
     <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
     <option name="OPTION_DEPRECATED_LIST" value="true" />
-    <option name="OTHER_OPTIONS" value="" />
+    <option name="OTHER_OPTIONS" />
     <option name="HEAP_SIZE" />
     <option name="LOCALE" />
     <option name="OPEN_IN_BROWSER" value="true" />

Modified: branches/translation/SIP Branch.iws
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/SIP%20Branch.iws?view=diff&rev=4247&p1=branches/translation/SIP%20Branch.iws&p2=branches/translation/SIP%20Branch.iws&r1=4246&r2=4247
==============================================================================
--- branches/translation/SIP Branch.iws	(original)
+++ branches/translation/SIP Branch.iws	2008-08-14 07:30:10+0000
@@ -26,7 +26,21 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/SIP Branch.ipr" afterPath="$PROJECT_DIR$/SIP Branch.ipr" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/Languages.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/Languages.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/SIP Branch.iws" afterPath="$PROJECT_DIR$/SIP Branch.iws" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java" afterPath="$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java" />
     </list>
     <ignored path="SIP Branch.iws" />
     <ignored path=".idea/workspace.xml" />
@@ -101,83 +115,80 @@
     </subPane>
   </component>
   <component name="FileEditorManager">
-    <splitter split-orientation="horizontal" split-proportion="0.6039604">
+    <splitter split-orientation="horizontal" split-proportion="0.5205092">
       <split-first>
         <leaf>
           <file leaf-file-name="TranslationActivator.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="132" column="22" selection-start="5129" selection-end="5129" vertical-scroll-proportion="0.5111402">
+                <state line="22" column="13" selection-start="741" selection-end="741" vertical-scroll-proportion="0.34501845">
                   <folding>
-                    <marker date="1218682021000" expanded="true" signature="6988:8166" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="8172:8403" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="8464:9714" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="9720:10034" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="10097:11763" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="11769:12077" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="12150:12233" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="12286:13080" placeholder="{...}" />
+                    <element signature="imports" expanded="true" />
+                    <marker date="1218697007000" expanded="true" signature="4756:5934" placeholder="{...}" />
+                    <marker date="1218697007000" expanded="true" signature="5940:6300" placeholder="/**...*/" />
+                    <marker date="1218697007000" expanded="true" signature="6365:7479" placeholder="{...}" />
+                    <marker date="1218697007000" expanded="true" signature="7485:7927" placeholder="/**...*/" />
+                    <marker date="1218697007000" expanded="true" signature="7994:9792" placeholder="{...}" />
+                    <marker date="1218697007000" expanded="true" signature="9798:10106" placeholder="/**...*/" />
+                    <marker date="1218697007000" expanded="true" signature="10183:10215" placeholder="{...}" />
+                    <marker date="1218697007000" expanded="true" signature="10408:11209" placeholder="{...}" />
                   </folding>
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="Resources.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/Resources.java">
+          <file leaf-file-name="All.xml" pinned="false" current="false" current-in-tab="true">
+            <entry file="file://$PROJECT_DIR$/resources/translationservices/All.xml">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="27" column="13" selection-start="664" selection-end="664" vertical-scroll-proportion="-0.15809768">
+                <state line="34" column="78" selection-start="1478" selection-end="1478" vertical-scroll-proportion="0.7756654">
                   <folding />
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="WhiteboardActivator.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java">
+          <file leaf-file-name="Languages.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/Languages.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="21" column="13" selection-start="522" selection-end="522" vertical-scroll-proportion="-0.3277635">
+                <state line="9" column="17" selection-start="178" selection-end="178" vertical-scroll-proportion="0.19389588">
                   <folding />
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="WhiteboardMenuItem.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java">
+          <file leaf-file-name="TranslationUtil.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="121" column="18" selection-start="3292" selection-end="3292" vertical-scroll-proportion="0.47429305">
-                  <folding />
+                <state line="247" column="30" selection-start="7664" selection-end="7677" vertical-scroll-proportion="1.5608857">
+                  <folding>
+                    <element signature="imports" expanded="true" />
+                  </folding>
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="WhiteboardSessionManager.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java">
+          <file leaf-file-name="TranslationService.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="25" column="13" selection-start="797" selection-end="797" vertical-scroll-proportion="-8.826478">
+                <state line="38" column="52" selection-start="1236" selection-end="1236" vertical-scroll-proportion="0.84132844">
                   <folding />
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="TranslationGUI.java" pinned="false" current="true" current-in-tab="true">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java">
+          <file leaf-file-name="TranslationServiceException.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="213" column="29" selection-start="7889" selection-end="7889" vertical-scroll-proportion="0.4587156">
+                <state line="29" column="0" selection-start="615" selection-end="615" vertical-scroll-proportion="0.6247756">
                   <folding />
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="TranslationService.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java">
+          <file leaf-file-name="TranslationServiceNotAvailableException.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="13" column="18" selection-start="329" selection-end="329" vertical-scroll-proportion="0.20445609">
-                  <folding>
-                    <marker date="1218682021000" expanded="true" signature="186:310" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="352:496" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="537:915" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="1017:1561" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="1726:2376" placeholder="/**...*/" />
-                  </folding>
+                <state line="7" column="13" selection-start="160" selection-end="160" vertical-scroll-proportion="0.15498155">
+                  <folding />
                 </state>
               </provider>
             </entry>
@@ -185,17 +196,10 @@
           <file leaf-file-name="TranslationServicesHandler.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="128" column="11" selection-start="3865" selection-end="3865" vertical-scroll-proportion="1.8971722">
-                  <folding />
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file leaf-file-name="translation.manifest.mf" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/translation.manifest.mf">
-              <provider selected="true" editor-type-id="text-editor">
-                <state line="4" column="21" selection-start="213" selection-end="213" vertical-scroll-proportion="0.06169666">
-                  <folding />
+                <state line="12" column="17" selection-start="298" selection-end="298" vertical-scroll-proportion="0.26568267">
+                  <folding>
+                    <element signature="imports" expanded="true" />
+                  </folding>
                 </state>
               </provider>
             </entry>
@@ -203,11 +207,8 @@
           <file leaf-file-name="UnableToTranslateException.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="4" column="2" selection-start="133" selection-end="133" vertical-scroll-proportion="0.06169666">
-                  <folding>
-                    <marker date="1218682021000" expanded="true" signature="63:163" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="383:532" placeholder="/**...*/" />
-                  </folding>
+                <state line="27" column="0" selection-start="629" selection-end="629" vertical-scroll-proportion="0.5816876">
+                  <folding />
                 </state>
               </provider>
             </entry>
@@ -219,37 +220,9 @@
           <file leaf-file-name="HttpTranslationServicesHandler.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="27" column="13" selection-start="1018" selection-end="1018" vertical-scroll-proportion="0.42463958">
+                <state line="232" column="72" selection-start="7825" selection-end="7825" vertical-scroll-proportion="0.6088561">
                   <folding>
                     <element signature="imports" expanded="true" />
-                    <marker date="1218682021000" expanded="true" signature="1630:1941" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="2005:2420" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="2426:3012" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="3142:4310" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="4316:4412" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="4465:4505" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="4511:4703" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="4757:4940" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="4946:5155" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="5207:5246" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="5252:5407" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="5455:5797" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="5803:5957" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="6005:6511" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="6517:6731" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="6788:6976" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="6982:7156" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="7217:7261" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="7267:7441" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="7500:7679" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="7685:7881" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="7948:8336" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="8342:8492" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="8556:8611" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="8617:8766" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="8831:8878" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="8884:8967" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="9024:9056" placeholder="{...}" />
                   </folding>
                 </state>
               </provider>
@@ -258,56 +231,110 @@
           <file leaf-file-name="TranslationPreferences.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="11" column="3" selection-start="266" selection-end="288" vertical-scroll-proportion="0.09436435">
-                  <folding>
-                    <marker date="1218682021000" expanded="true" signature="214:292" placeholder="/**...*/" />
-                  </folding>
+                <state line="11" column="3" selection-start="266" selection-end="288" vertical-scroll-proportion="0.13284133">
+                  <folding />
                 </state>
               </provider>
             </entry>
           </file>
           <file leaf-file-name="resources_zh_CN.properties" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/classes/resources/languages/resources_zh_CN.properties">
+              <provider editor-type-id="ResourceBundle">
+                <state />
+              </provider>
               <provider selected="true" editor-type-id="text-editor">
                 <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
                   <folding />
                 </state>
               </provider>
-              <provider editor-type-id="ResourceBundle">
-                <state />
-              </provider>
             </entry>
           </file>
-          <file leaf-file-name="HttpTranslationService.java" pinned="false" current="false" current-in-tab="false">
+          <file leaf-file-name="HttpTranslationService.java" pinned="false" current="true" current-in-tab="true">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="162" column="0" selection-start="6434" selection-end="6434" vertical-scroll-proportion="0.80996066">
+                <state line="57" column="19" selection-start="2120" selection-end="2120" vertical-scroll-proportion="0.3321033">
                   <folding>
-                    <marker date="1218682021000" expanded="false" signature="62:720" placeholder="..." />
-                    <marker date="1218682021000" expanded="true" signature="3105:3286" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="3336:6277" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="6309:6433" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="6469:6504" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="6510:6654" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="6689:6723" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="6729:7107" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="7203:7351" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="7357:7901" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="8060:11963" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="11969:12619" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="12815:13055" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="13061:13160" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="13197:13230" placeholder="{...}" />
+                    <element signature="imports" expanded="true" />
                   </folding>
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="TranslationUtil.java" pinned="false" current="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java">
+          <file leaf-file-name="TranslationGUI.java" pinned="false" current="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="46" column="32" selection-start="1669" selection-end="1669" vertical-scroll-proportion="0.5504587">
-                  <folding />
+                <state line="391" column="19" selection-start="13244" selection-end="13244" vertical-scroll-proportion="0.34501845">
+                  <folding>
+                    <marker date="1218690335000" expanded="false" signature="62:508" placeholder="..." />
+                    <marker date="1218690335000" expanded="true" signature="510:848" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="2010:2335" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="2493:6846" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="4099:5503" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="4163:5273" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5339:5384" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5448:5493" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5630:5751" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5699:5741" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5823:5944" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="5892:5934" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="6071:6838" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="6140:6828" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="6852:7154" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="7187:7231" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="7237:7648" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="7689:7722" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="7728:8100" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="8140:8168" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="8174:8586" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="8625:8680" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="8686:8930" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="8968:9002" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="9008:9430" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="9494:9554" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="9560:9925" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="9997:10057" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10063:10454" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="10498:10527" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10602:10646" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10688:10724" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10766:10802" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10845:10882" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="10925:10962" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="11023:11074" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="11137:11190" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="11196:11411" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="11456:13060" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="13082:13224" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="13266:13316" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="13322:13464" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="13506:13556" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="13869:15050" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="15188:15450" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="15550:15713" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="15746:16050" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="16056:16114" placeholder="/**...*/" />
+                    <marker date="1218690335000" expanded="true" signature="16167:22597" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="16611:21348" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="19854:19992" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="19931:19978" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20072:20214" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20149:20200" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20294:20435" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20371:20421" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20516:20657" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20593:20643" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20835:20975" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="20910:20961" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="21100:21242" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="21177:21228" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="21433:21914" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="21988:22022" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="22144:22590" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="22731:23427" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="22774:22819" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="23016:23421" placeholder="{...}" />
+                    <marker date="1218690335000" expanded="true" signature="23584:23629" placeholder="{...}" />
+                  </folding>
                 </state>
               </provider>
             </entry>
@@ -315,7 +342,7 @@
           <file leaf-file-name="UIServiceImpl.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="755" column="22" selection-start="24373" selection-end="24373" vertical-scroll-proportion="0.9515072">
+                <state line="755" column="22" selection-start="24373" selection-end="24373" vertical-scroll-proportion="1.4114391">
                   <folding />
                 </state>
               </provider>
@@ -324,7 +351,7 @@
           <file leaf-file-name="AboutWindowPluginComponent.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="43" column="18" selection-start="1077" selection-end="1077" vertical-scroll-proportion="0.5190039">
+                <state line="43" column="18" selection-start="1077" selection-end="1077" vertical-scroll-proportion="0.7306273">
                   <folding />
                 </state>
               </provider>
@@ -333,16 +360,16 @@
           <file leaf-file-name="ContactInfoMenuItem.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="73" column="18" selection-start="1854" selection-end="1854" vertical-scroll-proportion="0.82568806">
+                <state line="73" column="18" selection-start="1854" selection-end="1854" vertical-scroll-proportion="1.2010772">
                   <folding />
                 </state>
               </provider>
             </entry>
           </file>
-          <file leaf-file-name="ExtendedCallHistorySearchItem.java" pinned="false" current="false" current-in-tab="true">
+          <file leaf-file-name="ExtendedCallHistorySearchItem.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchItem.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="87" column="38" selection-start="2423" selection-end="2423" vertical-scroll-proportion="0.9672346">
+                <state line="74" column="29" selection-start="2202" selection-end="2202" vertical-scroll-proportion="1.1457565">
                   <folding />
                 </state>
               </provider>
@@ -351,17 +378,9 @@
           <file leaf-file-name="HttpLanguages.java" pinned="false" current="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java">
               <provider selected="true" editor-type-id="text-editor">
-                <state line="15" column="13" selection-start="396" selection-end="396" vertical-scroll-proportion="0.1887287">
+                <state line="19" column="70" selection-start="467" selection-end="467" vertical-scroll-proportion="0.42066422">
                   <folding>
-                    <marker date="1218682021000" expanded="true" signature="180:382" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="533:595" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="623:690" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="696:851" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="891:987" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="1019:1136" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="1192:1225" placeholder="{...}" />
-                    <marker date="1218682021000" expanded="true" signature="1231:1359" placeholder="/**...*/" />
-                    <marker date="1218682021000" expanded="true" signature="1390:1528" placeholder="{...}" />
+                    <element signature="imports" expanded="true" />
                   </folding>
                 </state>
               </provider>
@@ -535,6 +554,46 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
       </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/Users/rivera/Desktop/SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/Users/rivera/Desktop/SIP Branch/resources" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/Users/rivera/Desktop/SIP Branch/resources/translationservices" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/Users/rivera/Desktop/SIP Branch" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/Users/rivera/Desktop/SIP Branch/resources" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
     </subPane>
   </component>
   <component name="ProjectReloadState">
@@ -548,7 +607,7 @@
       <showLibraryContents />
       <hideEmptyPackages />
       <abbreviatePackageNames />
-      <showStructure Favorites="false" Scope="false" PackagesPane="true" ProjectPane="false" />
+      <showStructure PackagesPane="true" Scope="false" Favorites="false" ProjectPane="false" />
       <autoscrollToSource PackagesPane="true" ProjectPane="true" />
       <autoscrollFromSource PackagesPane="false" />
       <sortByType PackagesPane="false" />
@@ -579,8 +638,8 @@
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder3" value="3" />
     <property name="last_opened_file_path" value="/Users/rivera/Desktop" />
     <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
-    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth1" value="123" />
+    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth4" value="898" />
     <property name="GenerateAntBuildDialog.generateSingleFile" value="false" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder0" value="0" />
@@ -595,220 +654,48 @@
       <recent name="net.java.sip.communicator.plugin.translation" />
     </key>
   </component>
-  <component name="RestoreUpdateTree">
-    <UpdateInfo date="08/08/14 11:18" ActionInfo="_Update">
-      <UpdatedFiles>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Updated from server" />
-          <option name="myStatusName" value="Changed on server" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="CHANGED_ON_SERVER" />
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Updated" />
-            <option name="myStatusName" value="Changed" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="UPDATED" />
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/images.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/install/build.xml</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/branding/AboutWindow.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/autoaway/StatusUpdateThread.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultColorPackImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSettingsPackImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultResourcePackActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultImagePackImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSoundPackImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/simpleaccreg/InitialAccountRegistrationFrame.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/chatalerter/ChatAlerterActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/updatechecker/Resources.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/media/CallSession.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/protocol/CallParticipant.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/protocol/AbstractCallParticipant.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/resources/LanguagePack.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/resources/ResourceManagementService.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/resources/ResourcePack.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/media/CallSessionImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/media/MediaControl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommFrame.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/mock/MockPersistentPresenceOperationSet.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/sip/CallParticipantSipImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/MsnContactListEventListener.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/OperationSetPersistentPresenceMsnImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/EventAdapter.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/msn/ContactMsnImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetPersistentPresenceSSHImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetPersistentPresenceGibberishImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/util/UtilActivator.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/test/net/java/sip/communicator/slick/protocol/msn/TestOperationSetPresence.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/test/net/java/sip/communicator/slick/protocol/msn/TestOperationSetPersistentPresence.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/lib/felix.client.run.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/lib/installer-exclude/jml-1.0b2.jar</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/lib/felix.unit.test.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/build.xml</PATH>
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Created" />
-            <option name="myStatusName" value="Created" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="CREATED" />
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/colors/colors.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons/dnd.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons/freeForChat.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons/occupied.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons/contactAway.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/statusicons/na.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/outgoingCall.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/incomingCall.svg</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/buttons/muteButton.png</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/protocol/AbstractOperationSetPersistentPresence.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/media/MutePushBufferDataSource.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/lib/installer-exclude/httpcore-4.0-beta2.jar</PATH>
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Deleted" />
-            <option name="myStatusName" value="Deleted" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="true" />
-            <option name="myId" value="REMOVED_FROM_REPOSITORY" />
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/colors/colorResources.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/resources/images/impl/gui/common/src/status icons</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/resources</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/utils/images.properties</PATH>
-            <PATH vcs="svn" revision="4242">$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/utils/sounds.properties</PATH>
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Restored" />
-            <option name="myStatusName" value="Will be restored" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="RESTORED" />
-          </FILE-GROUP>
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Modified" />
-          <option name="myStatusName" value="Modified" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MODIFIED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Skipped" />
-          <option name="myStatusName" value="Skipped" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="SKIPPED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Merged with conflicts" />
-          <option name="myStatusName" value="Will be merged with conflicts" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MERGED_WITH_CONFLICTS" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Merged" />
-          <option name="myStatusName" value="Will be merged" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MERGED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Not in repository" />
-          <option name="myStatusName" value="Not in repository" />
-          <option name="mySupportsDeletion" value="true" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="UNKNOWN" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Locally added" />
-          <option name="myStatusName" value="Locally added" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="LOCALLY_ADDED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Locally removed" />
-          <option name="myStatusName" value="Locally removed" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="LOCALLY_REMOVED" />
-        </FILE-GROUP>
-      </UpdatedFiles>
-    </UpdateInfo>
-  </component>
   <component name="RunManager">
-    <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+    <configuration default="true" type="Applet" factoryName="Applet">
       <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
       <option name="PACKAGE_NAME" />
       <option name="MAIN_CLASS_NAME" />
       <option name="METHOD_NAME" />
-      <option name="TEST_OBJECT" value="class" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
       <option name="VM_PARAMETERS" />
       <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="WORKING_DIRECTORY" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="ANNOTATION_TYPE" />
       <option name="ENV_VARIABLES" />
       <option name="PASS_PARENT_ENVS" value="true" />
       <option name="ADDITIONAL_CLASS_PATH" />
       <option name="TEST_SEARCH_SCOPE">
         <value defaultName="wholeProject" />
       </option>
+      <option name="PROPERTIES_FILE" />
       <envs />
+      <properties />
+      <listeners />
       <method>
         <option name="Make" value="true" />
       </method>
     </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <module name="" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="HTML_FILE_NAME" />
-      <option name="HTML_USED" value="false" />
-      <option name="WIDTH" value="400" />
-      <option name="HEIGHT" value="300" />
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
-      <option name="VM_PARAMETERS" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-    </configuration>
     <configuration default="true" type="Remote" factoryName="Remote">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="false" />
@@ -816,31 +703,24 @@
       <option name="HOST" value="localhost" />
       <option name="PORT" value="5005" />
     </configuration>
-    <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
+    <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <module name="" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="SUITE_NAME" />
       <option name="PACKAGE_NAME" />
       <option name="MAIN_CLASS_NAME" />
       <option name="METHOD_NAME" />
-      <option name="GROUP_NAME" />
-      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
       <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" />
-      <option name="OUTPUT_DIRECTORY" />
-      <option name="ANNOTATION_TYPE" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
       <option name="ENV_VARIABLES" />
       <option name="PASS_PARENT_ENVS" value="true" />
       <option name="ADDITIONAL_CLASS_PATH" />
       <option name="TEST_SEARCH_SCOPE">
         <value defaultName="wholeProject" />
       </option>
-      <option name="PROPERTIES_FILE" />
       <envs />
-      <properties />
-      <listeners />
       <method>
         <option name="Make" value="true" />
       </method>
@@ -868,17 +748,13 @@
     </configuration>
   </component>
   <component name="ScopeViewComponent">
-    <subPane>
+    <subPane subId="Production">
       <PATH>
         <PATH_ELEMENT USER_OBJECT="Root">
           <option name="myItemId" value="" />
           <option name="myItemType" value="" />
         </PATH_ELEMENT>
-      </PATH>
-    </subPane>
-    <subPane subId="Production">
-      <PATH>
-        <PATH_ELEMENT USER_OBJECT="Root">
+        <PATH_ELEMENT USER_OBJECT="SIP Branch">
           <option name="myItemId" value="" />
           <option name="myItemType" value="" />
         </PATH_ELEMENT>
@@ -886,7 +762,11 @@
           <option name="myItemId" value="" />
           <option name="myItemType" value="" />
         </PATH_ELEMENT>
-        <PATH_ELEMENT USER_OBJECT="SIP Branch">
+      </PATH>
+    </subPane>
+    <subPane>
+      <PATH>
+        <PATH_ELEMENT USER_OBJECT="Root">
           <option name="myItemId" value="" />
           <option name="myItemType" value="" />
         </PATH_ELEMENT>
@@ -942,28 +822,28 @@
     <frame x="39" y="22" width="1742" height="1178" extended-state="0" />
     <editor active="false" />
     <layout>
-      <window_info id="SVN Repositories" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3270142" order="8" />
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.26359338" order="3" />
       <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32985783" order="7" />
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16066155" order="0" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27772513" order="1" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24985233" order="1" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4180095" order="8" x="760" y="178" width="1048" height="899" />
+      <window_info id="Messages" active="true" anchor="bottom" auto_hide="true" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.4180095" order="8" x="760" y="178" width="1048" height="899" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.14479905" order="3" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.13941605" order="1" />
       <window_info id="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Changes" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2085308" order="8" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298077" order="2" />
+      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.13364929" order="8" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32890996" order="2" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
       <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3270142" order="8" />
       <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="SVN Repositories" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3270142" order="8" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
@@ -978,9 +858,9 @@
     <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
     <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="Translation module beta 3
-Documenting and cleaning
-Updated from trunk
-Translation menu item position fixed" />
+    <option name="LAST_COMMIT_MESSAGE" value="Translation module beta 4
-Documenting and cleaning finished
-Only text encoding bug left (known bugs)" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
-    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
     <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
     <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
     <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
@@ -1000,6 +880,8 @@
     <MESSAGE value="Translation module beta 1
-I18n
-Feature complete" />
     <MESSAGE value="Translation module beta 2
-Documenting and cleaning
-Implemented translation exceptions
-Squashed two important bugs" />
     <MESSAGE value="Translation module beta 3
-Documenting and cleaning
-Updated from trunk
-Translation menu item position fixed" />
+    <MESSAGE value="Translation module
-Updated configuration file" />
+    <MESSAGE value="Translation module beta 4
-Documenting and cleaning finished
-Only text encoding bug left (known bugs)" />
   </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
@@ -1168,162 +1050,205 @@
     </buildFile>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="13" column="18" selection-start="329" selection-end="329" vertical-scroll-proportion="0.20445609">
-          <folding>
-            <marker date="1218682021000" expanded="true" signature="186:310" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="352:496" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="537:915" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="1017:1561" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="1726:2376" placeholder="/**...*/" />
-          </folding>
+        <state line="25" column="13" selection-start="797" selection-end="797" vertical-scroll-proportion="0.011940299">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/service/resources/ResourceManagementService.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="128" column="11" selection-start="3865" selection-end="3865" vertical-scroll-proportion="1.8971722">
+        <state line="114" column="8" selection-start="3475" selection-end="3782" vertical-scroll-proportion="0.22189055">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/translation.manifest.mf">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/Languages.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="4" column="21" selection-start="213" selection-end="213" vertical-scroll-proportion="0.06169666">
+        <state line="9" column="17" selection-start="178" selection-end="178" vertical-scroll-proportion="0.19389588">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/Resources.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="27" column="13" selection-start="664" selection-end="664" vertical-scroll-proportion="-0.15809768">
+        <state line="7" column="13" selection-start="160" selection-end="160" vertical-scroll-proportion="0.15498155">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="21" column="13" selection-start="522" selection-end="522" vertical-scroll-proportion="-0.3277635">
-          <folding />
+        <state line="12" column="17" selection-start="298" selection-end="298" vertical-scroll-proportion="0.26568267">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="25" column="13" selection-start="797" selection-end="797" vertical-scroll-proportion="-8.826478">
+        <state line="27" column="0" selection-start="629" selection-end="629" vertical-scroll-proportion="0.5816876">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java">
+    <entry file="jar://$PROJECT_DIR$/lib/felix.jar!/org/osgi/framework/BundleActivator.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="27" column="13" selection-start="1018" selection-end="1018" vertical-scroll-proportion="0.42463958">
-          <folding>
-            <element signature="imports" expanded="true" />
-            <marker date="1218682021000" expanded="true" signature="1630:1941" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="2005:2420" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="2426:3012" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="3142:4310" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="4316:4412" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="4465:4505" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="4511:4703" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="4757:4940" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="4946:5155" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="5207:5246" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="5252:5407" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="5455:5797" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="5803:5957" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="6005:6511" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="6517:6731" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="6788:6976" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="6982:7156" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="7217:7261" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="7267:7441" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="7500:7679" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="7685:7881" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="7948:8336" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="8342:8492" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="8556:8611" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="8617:8766" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="8831:8878" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="8884:8967" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="9024:9056" placeholder="{...}" />
-          </folding>
+        <state line="9" column="35" selection-start="315" selection-end="315" vertical-scroll-proportion="0.096969694">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="11" column="3" selection-start="266" selection-end="288" vertical-scroll-proportion="0.09436435">
+        <state line="247" column="30" selection-start="7664" selection-end="7677" vertical-scroll-proportion="1.5608857">
           <folding>
-            <marker date="1218682021000" expanded="true" signature="214:292" placeholder="/**...*/" />
+            <element signature="imports" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="132" column="22" selection-start="5129" selection-end="5129" vertical-scroll-proportion="0.5111402">
+        <state line="22" column="13" selection-start="741" selection-end="741" vertical-scroll-proportion="0.34501845">
           <folding>
-            <marker date="1218682021000" expanded="true" signature="6988:8166" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="8172:8403" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="8464:9714" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="9720:10034" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="10097:11763" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="11769:12077" placeholder="/**...*/" />
-            <marker date="1218682021000" expanded="true" signature="12150:12233" placeholder="{...}" />
-            <marker date="1218682021000" expanded="true" signature="12286:13080" placeholder="{...}" />
+            <element signature="imports" expanded="true" />
+            <marker date="1218697007000" expanded="true" signature="4756:5934" placeholder="{...}" />
+            <marker date="1218697007000" expanded="true" signature="5940:6300" placeholder="/**...*/" />
+            <marker date="1218697007000" expanded="true" signature="6365:7479" placeholder="{...}" />
+            <marker date="1218697007000" expanded="true" signature="7485:7927" placeholder="/**...*/" />
+            <marker date="1218697007000" expanded="true" signature="7994:9792" placeholder="{...}" />
+            <marker date="1218697007000" expanded="true" signature="9798:10106" placeholder="/**...*/" />
+            <marker date="1218697007000" expanded="true" signature="10183:10215" placeholder="{...}" />
+            <marker date="1218697007000" expanded="true" signature="10408:11209" placeholder="{...}" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="46" column="32" selection-start="1669" selection-end="1669" vertical-scroll-proportion="0.5504587">
-          <folding />
+        <state line="391" column="19" selection-start="13244" selection-end="13244" vertical-scroll-proportion="0.34501845">
+          <folding>
+            <marker date="1218690335000" expanded="false" signature="62:508" placeholder="..." />
+            <marker date="1218690335000" expanded="true" signature="510:848" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="2010:2335" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="2493:6846" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="4099:5503" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="4163:5273" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5339:5384" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5448:5493" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5630:5751" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5699:5741" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5823:5944" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="5892:5934" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="6071:6838" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="6140:6828" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="6852:7154" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="7187:7231" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="7237:7648" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="7689:7722" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="7728:8100" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="8140:8168" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="8174:8586" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="8625:8680" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="8686:8930" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="8968:9002" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="9008:9430" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="9494:9554" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="9560:9925" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="9997:10057" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10063:10454" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="10498:10527" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10602:10646" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10688:10724" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10766:10802" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10845:10882" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="10925:10962" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="11023:11074" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="11137:11190" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="11196:11411" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="11456:13060" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="13082:13224" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="13266:13316" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="13322:13464" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="13506:13556" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="13869:15050" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="15188:15450" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="15550:15713" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="15746:16050" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="16056:16114" placeholder="/**...*/" />
+            <marker date="1218690335000" expanded="true" signature="16167:22597" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="16611:21348" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="19854:19992" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="19931:19978" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20072:20214" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20149:20200" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20294:20435" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20371:20421" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20516:20657" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20593:20643" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20835:20975" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="20910:20961" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="21100:21242" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="21177:21228" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="21433:21914" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="21988:22022" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="22144:22590" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="22731:23427" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="22774:22819" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="23016:23421" placeholder="{...}" />
+            <marker date="1218690335000" expanded="true" signature="23584:23629" placeholder="{...}" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="755" column="22" selection-start="24373" selection-end="24373" vertical-scroll-proportion="0.9515072">
+        <state line="29" column="0" selection-start="615" selection-end="615" vertical-scroll-proportion="0.6247756">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="43" column="18" selection-start="1077" selection-end="1077" vertical-scroll-proportion="0.5190039">
-          <folding />
+        <state line="19" column="70" selection-start="467" selection-end="467" vertical-scroll-proportion="0.42066422">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="73" column="18" selection-start="1854" selection-end="1854" vertical-scroll-proportion="0.82568806">
+        <state line="38" column="52" selection-start="1236" selection-end="1236" vertical-scroll-proportion="0.84132844">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchItem.java">
+    <entry file="file://$PROJECT_DIR$/resources/translationservices/All.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="87" column="38" selection-start="2423" selection-end="2423" vertical-scroll-proportion="0.9672346">
+        <state line="34" column="78" selection-start="1478" selection-end="1478" vertical-scroll-proportion="0.7756654">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="121" column="18" selection-start="3292" selection-end="3292" vertical-scroll-proportion="0.47429305">
-          <folding />
+        <state line="232" column="72" selection-start="7825" selection-end="7825" vertical-scroll-proportion="0.6088561">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java">
+    <entry file="file://$PROJECT_DIR$/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="213" column="29" selection-start="7889" selection-end="7889" vertical-scroll-proportion="0.4587156">
-          <folding />
+        <state line="57" column="19" selection-start="2120" selection-end="2120" vertical-scroll-proportion="0.3321033">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/HttpLanguages.java	2008-08-14 07:30:10+0000
@@ -1,9 +1,8 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.plugin.translation.service.Languages;
+import net.java.sip.communicator.plugin.translation.service.*;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.*;
 
 /**
  * Language pairs handler.
@@ -13,7 +12,8 @@
  *
  * @author Ernesto Rivera
  */
-public class HttpLanguages implements Languages {
+public class HttpLanguages implements Languages
+{
 
     // Variables
     private HashMap<String, HashSet<String>> languages;
@@ -23,7 +23,8 @@
     /**
      * Create a new empty collection of languages.
      */
-    public HttpLanguages() {
+    public HttpLanguages()
+    {
         languages = new HashMap<String, HashSet<String>>();
     }
 
@@ -33,7 +34,8 @@
      *
      * @param langs initialization list
      */
-    public HttpLanguages(String langs) {
+    public HttpLanguages(String langs)
+    {
         languages = new HashMap<String, HashSet<String>>();
         addLanguages(langs);
     }
@@ -45,7 +47,8 @@
      *
      * @return the available translation
      */
-    public HashMap<String, HashSet<String>> getPairs() {
+    public HashMap<String, HashSet<String>> getPairs()
+    {
         return languages;
     }
 
@@ -54,7 +57,8 @@
      *
      * @return the total number of language pairs
      */
-    public int getPairCount() {
+    public int getPairCount()
+    {
         int c = 0;
         for (HashSet<String> strings : languages.values())
             c += (strings).size();
@@ -65,7 +69,8 @@
 
     // Add multiple language pairs from a configuration string
 
-    private void addLanguages(String langs) {
+    private void addLanguages(String langs)
+    {
         String[] lines = langs.split("\n", 0);
 
         for (String line : lines) {
@@ -85,7 +90,8 @@
     }
 
     //Add a new language pair
-    private void addLanguage(String sourceLang, String targetLang) {
+    private void addLanguage(String sourceLang, String targetLang)
+    {
         if (sourceLang.equals(targetLang))
             return;
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationService.java	2008-08-14 07:30:10+0000
@@ -1,21 +1,11 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.plugin.translation.service.Languages;
-import net.java.sip.communicator.plugin.translation.service.TranslationService;
-import net.java.sip.communicator.plugin.translation.service.TranslationServiceNotAvailableException;
-import net.java.sip.communicator.plugin.translation.service.UnableToTranslateException;
-import net.java.sip.communicator.util.Logger;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Vector;
+import net.java.sip.communicator.plugin.translation.service.*;
+import net.java.sip.communicator.util.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
 
 /**
  * Single HTTP-based translation service.
@@ -56,7 +46,8 @@
  *
  * @author Ernesto Rivera
  */
-public class HttpTranslationService implements TranslationService {
+public class HttpTranslationService implements TranslationService
+{
 
     // Variables
     private String serviceName;
@@ -86,7 +77,8 @@
      *
      * @param config the extract of a configuration XML containing the service definition
      */
-    public HttpTranslationService(String config) {
+    public HttpTranslationService(String config)
+    {
 
         serviceName = TranslationUtil.removeXmlComments(TranslationUtil.readTag(config, "name"));
         System.out.println("serviceName: " + serviceName);
@@ -104,7 +96,7 @@
         // Try to guess the URL from template?
         try {
             if (serviceUrl.equals("")) {
-                URL url = null;
+                URL url;
                 url = new URL(template);
 
                 serviceUrl = TranslationUtil.getSubstringBetween(
@@ -160,7 +152,8 @@
      *
      * @return the name of the service or null if unknown
      */
-    public String getServiceName() {
+    public String getServiceName()
+    {
         return serviceName;
     }
 
@@ -169,7 +162,8 @@
      *
      * @return the URL of the service or null if unknown
      */
-    public String getServiceUrl() {
+    public String getServiceUrl()
+    {
         return serviceUrl;
     }
 
@@ -181,13 +175,18 @@
      * @param useIntermediate whether or not intermediate languages should be used
      * @return whether translation is possible or not
      */
-    public boolean canTranslate(String sourceLang, String targetLang, boolean useIntermediate) {
+    public boolean canTranslate(String sourceLang, String targetLang, boolean useIntermediate)
+    {
         HashSet<String> pairs = languages.getPairs().get(sourceLang.toLowerCase());
         return pairs.contains(targetLang.toLowerCase());
     }
 
     /**
      * Translate text from one language to another.
+     * <p/>
+     * Long texts may need to be divided on smaller fragments or dalayed on their requests
+     * depending on service limitations. Also tags are added before and after each message
+     * to ensure the integrity of translations.
      *
      * @param text       the text to be translated
      * @param sourceLang the source language of text
@@ -197,7 +196,8 @@
      * @throws TranslationServiceNotAvailableException
      *                                    thrown if the service is not currently available
      */
-    public String translateText(String text, String sourceLang, String targetLang) throws UnableToTranslateException, TranslationServiceNotAvailableException {
+    public String translateText(String text, String sourceLang, String targetLang) throws UnableToTranslateException, TranslationServiceNotAvailableException
+    {
         String translation = "";
 
         // Split text as needed
@@ -247,7 +247,7 @@
 
                 InputStream inputStream = uc.getInputStream();
 
-                response = TranslationUtil.readAllContents(inputStream);
+                response = TranslationUtil.readAllContents(inputStream, "UTF-8");
 
                 // ToDo fix encoding problems
 //                URL u = new URL(request);
@@ -309,7 +309,8 @@
      *                                    thrown if the service is not currently available
      */
     public String translateText(String text, String sourceLang, String targetLang, String intermediateLang)
-            throws TranslationServiceNotAvailableException, UnableToTranslateException {
+            throws TranslationServiceNotAvailableException, UnableToTranslateException
+    {
         return translateText(
                 translateText(
                         text,
@@ -324,7 +325,8 @@
      *
      * @return the handler
      */
-    public Languages getLanguages() {
+    public Languages getLanguages()
+    {
         return languages;
     }
 
@@ -332,7 +334,8 @@
 
     //Read service-specific language codes
 
-    private void readEquiv(String config) {
+    private void readEquiv(String config)
+    {
 
         equiv = new HashMap<String, String>();
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/HttpTranslationServicesHandler.java	2008-08-14 07:30:10+0000
@@ -1,20 +1,11 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.plugin.translation.service.TranslationService;
-import net.java.sip.communicator.plugin.translation.service.TranslationServiceNotAvailableException;
-import net.java.sip.communicator.plugin.translation.service.TranslationServicesHandler;
-import net.java.sip.communicator.plugin.translation.service.UnableToTranslateException;
-import net.java.sip.communicator.util.Logger;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Vector;
+import net.java.sip.communicator.plugin.translation.service.*;
+import net.java.sip.communicator.util.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
 
 /**
  * Handler of several {@link TranslationService}'s
@@ -25,10 +16,13 @@
  *
  * @author Ernesto Rivera
  */
-public class HttpTranslationServicesHandler implements TranslationServicesHandler {
+public class HttpTranslationServicesHandler implements TranslationServicesHandler
+{
 
     // Default configuration paths
-    private String defaultConfigUrl = "http://two.xthost.info/soc/All.xml"; // TODO change to a permanent URL
+    // TODO change to a permanent URL
+    //    private String defaultConfigUrl = "http://two.xthost.info/soc/All.xml"; // SoC student site
+    private String defaultConfigUrl = "https://sip-communicator.dev.java.net/source/browse/*checkout*/sip-communicator/branches/translation/resources/translationservices/All.xml"; // Branch
     private String defaultConfigFile = "resources/translationservices/All.xml";
 
     // Variables
@@ -46,7 +40,8 @@
      * @throws IOException thrown when both default URL and default local file fail to be
      *                     read.
      */
-    public HttpTranslationServicesHandler() throws IOException {
+    public HttpTranslationServicesHandler() throws IOException
+    {
 
         // Try to read from URL (most up to date)
         try {
@@ -78,7 +73,8 @@
      * @throws UnableToTranslateException thrown if no service was able to make the translation
      */
     public String translateText(String text, String sourceLang, String targetLang)
-            throws UnableToTranslateException {
+            throws UnableToTranslateException
+    {
 
         String translation;
 
@@ -118,7 +114,8 @@
      *
      * @return the service
      */
-    public TranslationService getPreferredService() {
+    public TranslationService getPreferredService()
+    {
         return preferredService;
     }
 
@@ -128,7 +125,8 @@
      *
      * @param index the index
      */
-    public void setPreferredServiceByIndx(int index) {
+    public void setPreferredServiceByIndx(int index)
+    {
         if (index >= 0 && index < services.size())
             preferredService = services.elementAt(index);
         else
@@ -141,7 +139,8 @@
      *
      * @return the last used translation service
      */
-    public TranslationService getLastUsedService() {
+    public TranslationService getLastUsedService()
+    {
         return lastUsedService;
     }
 
@@ -150,7 +149,8 @@
      *
      * @return the set of valid source languages (ISO 639-1).
      */
-    public HashSet<String> getAllSourceLangs() {
+    public HashSet<String> getAllSourceLangs()
+    {
         HashSet<String> all = new HashSet<String>();
 
         // For every service...
@@ -167,7 +167,8 @@
      *
      * @return the set of valid target languages (ISO 639-1)
      */
-    public HashSet<String> getAllTargetLangs() {
+    public HashSet<String> getAllTargetLangs()
+    {
         HashSet<String> all = new HashSet<String>();
 
         // For every service...
@@ -189,7 +190,8 @@
      * @param url configuration file's URL
      * @throws IOException thrown if file is not found at the given URL
      */
-    public void addServices(URL url) throws IOException {
+    public void addServices(URL url) throws IOException
+    {
         System.out.println("Reading config from " + url + "...");
         HttpURLConnection uc = (HttpURLConnection) url.openConnection();
         addServices(uc.getInputStream());
@@ -201,7 +203,8 @@
      * @param file file's path
      * @throws IOException thrown if file is not valid
      */
-    public void addServices(String file) throws IOException {
+    public void addServices(String file) throws IOException
+    {
         addServices(new File(file));
     }
 
@@ -211,7 +214,8 @@
      * @param file file object
      * @throws IOException thrown if file is not valid
      */
-    public void addServices(File file) throws IOException {
+    public void addServices(File file) throws IOException
+    {
         System.out.println("Reading config from " + file.getAbsolutePath() + "...");
         FileInputStream input = new FileInputStream(file);
         addServices(input);
@@ -223,9 +227,10 @@
      * @param input the input stream
      * @throws IOException thrown if input stream is not valid
      */
-    public void addServices(InputStream input) throws IOException {
+    public void addServices(InputStream input) throws IOException
+    {
         // Split services
-        String[] configs = TranslationUtil.readAllContents(input).split("</service>");
+        String[] configs = TranslationUtil.readAllContents(input, "UTF-8").split("</service>");
 
         // ...and read one at a time
         for (String c : configs) {
@@ -241,7 +246,8 @@
      *
      * @throws IOException thrown if default URL is not valid
      */
-    public void addServicesFromDefaultUrl() throws IOException {
+    public void addServicesFromDefaultUrl() throws IOException
+    {
         addServices(new URL(defaultConfigUrl));
     }
 
@@ -250,7 +256,8 @@
      *
      * @throws IOException thrown if default file is not valid
      */
-    public void addServicesFromDefaultFile() throws IOException {
+    public void addServicesFromDefaultFile() throws IOException
+    {
         addServices(defaultConfigFile);
     }
 
@@ -259,7 +266,8 @@
      *
      * @return the services
      */
-    public Vector<HttpTranslationService> getServices() {
+    public Vector<HttpTranslationService> getServices()
+    {
         return services;
     }
 
@@ -268,7 +276,8 @@
      *
      * @return the URL
      */
-    public String getDefaultConfigUrl() {
+    public String getDefaultConfigUrl()
+    {
         return defaultConfigUrl;
     }
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationActivator.java	2008-08-14 07:30:10+0000
@@ -1,49 +1,49 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.plugin.translation.service.TranslationServicesHandler;
-import net.java.sip.communicator.plugin.translation.service.UnableToTranslateException;
-import net.java.sip.communicator.service.gui.Chat;
-import net.java.sip.communicator.service.gui.Container;
-import net.java.sip.communicator.service.gui.PluginComponent;
-import net.java.sip.communicator.service.gui.UIService;
-import net.java.sip.communicator.service.protocol.Contact;
-import net.java.sip.communicator.service.protocol.Message;
-import net.java.sip.communicator.service.protocol.OperationSetBasicInstantMessaging;
-import net.java.sip.communicator.service.protocol.ProtocolProviderService;
-import net.java.sip.communicator.service.protocol.event.MessageDeliveredEvent;
-import net.java.sip.communicator.service.protocol.event.MessageDeliveryFailedEvent;
-import net.java.sip.communicator.service.protocol.event.MessageListener;
-import net.java.sip.communicator.service.protocol.event.MessageReceivedEvent;
-import net.java.sip.communicator.util.Logger;
+import net.java.sip.communicator.plugin.translation.service.*;
+import net.java.sip.communicator.service.gui.*;
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.protocol.event.*;
+import net.java.sip.communicator.util.*;
 import org.osgi.framework.*;
 
-import java.io.IOException;
-import java.util.Date;
-import java.util.Hashtable;
-import java.util.Iterator;
+import java.io.*;
+import java.util.*;
 
 /**
- * User: Ernesto Rivera
- * Date: 2008/06/21
- * Time: 17:13:25
+ * Main class of the transaltion module.
+ * <br>
+ * Responsible of initializing, starting and stoping the OSGi module,
+ * inserting the translation menu item to SIP's GUI and translating incomming
+ * and outgoing messages while listening to dynamic registration of
+ * {@link ProtocolProviderService}'s.
+ *
+ * @author Ernesto Rivera
  */
 public class TranslationActivator
-        implements BundleActivator, MessageListener, ServiceListener {
+        implements BundleActivator, MessageListener, ServiceListener
+{
 
-    // Get logger
-    static Logger logger = Logger.getLogger(TranslationActivator.class);
+    // Logger
+    private static Logger logger = Logger.getLogger(TranslationActivator.class);
 
+    // Variables
     private static BundleContext bundleContext;
     private static UIService uiService;
     private static TranslationGUI gui;
-
+    private static HttpTranslationServicesHandler handler;
     private static String lastTransMsg = "";
 
-    public static final String INCOMING_MESSAGE = "IncomingMessage";
-
-    private static HttpTranslationServicesHandler httpTrans;
+    // Constant
+    private static final String INCOMING_MESSAGE = "IncomingMessage";
 
-    public void start(BundleContext bundleContext) throws IOException //TODO throw TranslationException
+    /**
+     * Initialize module, insert GUI elements and enable translations
+     *
+     * @param bundleContext the OSGi bundle context
+     * @throws IOException thrown if configuration XML file is not found or can't be read
+     */
+    public void start(BundleContext bundleContext) throws IOException
     {
         System.out.println("Translation service..................................");
 
@@ -53,7 +53,6 @@
         bundleContext.addServiceListener(this);
 
         // Start listening to protocol's changes...
-
         ServiceReference[] protocolProviderRefs;
         try {
             protocolProviderRefs = bundleContext.getServiceReferences(
@@ -90,28 +89,15 @@
         while (kk.hasNext())
             System.out.println("kk.next() = " + ((Container) kk.next()).getID());
 
-//
-//        if(uiService.isContainerSupported(
-//                Container.CONTAINER_CHAT_MENU_BAR))
-//        {
-////            ExamplePluginMenuItem examplePlugin = new ExamplePluginMenuItem();
-//
-//            // We add the example plugin gui item in the right button gui for a contact.
-//            uiService.addComponent(
-//                Container.CONTAINER_CHAT_MENU_BAR,
-//                examplePlugin);
-//        }
-
-        httpTrans = new HttpTranslationServicesHandler();
+        handler = new HttpTranslationServicesHandler();
         try {
-            System.out.println("KKKKKKKKKKKKKKK" + httpTrans.translateText("this is a test", "en", "es"));
+            System.out.println("KKKKKKKKKKKKKKK" + handler.translateText("this is a test", "en", "es"));
         } catch (UnableToTranslateException e) {
             e.printStackTrace();
         }
 
-        // Add translation gui
-        gui = new TranslationGUI(Container.CONTAINER_CHAT_MENU_BAR, bundleContext, httpTrans);
-
+        // Add translation menu to the GUI
+        gui = new TranslationGUI(Container.CONTAINER_CHAT_MENU_BAR, bundleContext, handler);
         Hashtable<String, String> filter
                 = new Hashtable<String, String>();
         filter.put(
@@ -123,61 +109,12 @@
                 gui,
                 filter);
 
-//        filter = new Hashtable<String, String>();
-//        filter.put(
-//                Container.CONTAINER_ID,
-//                Container.CONTAINER_CHAT_HELP_MENU.getID());
-//
-//        bundleContext.registerService(
-//                PluginComponent.class.getName(),
-//                gui,
-//                filter);
-//
-//        filter = new Hashtable<String, String>();
-//        filter.put(
-//                Container.CONTAINER_ID,
-//                Container.CONTAINER_CHAT_TOOL_BAR.getID());
-//
-//        bundleContext.registerService(
-//                PluginComponent.class.getName(),
-//                gui,
-//                filter);
-
-//        ServiceReference[] serRefs = null;
-//
-//        String osgiFilter = "("
-//                + Container.CONTAINER_ID
-//                + "="+Container.CONTAINER_CHAT_MENU_BAR.getID()+")";
-//
-//        try
-//        {
-//            serRefs = bundleContext.getServiceReferences(
-//                    PluginComponent.class.getName(),
-//                    osgiFilter);
-//        }
-//        catch (InvalidSyntaxException exc)
-//        {
-//            System.out.println("NO REFERENCE KKKKKKKKKKKKK");
-//        }
-//        System.out.println("FOUND REFERENCE KKKKKKKKKKKKK");
-//
-//        if (serRefs != null)
-//        {
-//
-//            for (ServiceReference serRef : serRefs)
-//            {
-//                System.out.println(bundleContext.getService(serRef).getClass());
-////                PluginComponent component = (PluginComponent) bundleContext.getService(serRef);
-////
-////                this.add((Component) component.getComponent());
-//            }
-//        }
-
-//        uiService.addPluginComponentListener(this);
-
         // Export service
-        TranslationServicesHandler handler = new HttpTranslationServicesHandler();  // TODO should use interface?
+        // (currently not really used by SIP besides displaying the plugin on the plugins list)
 
+        TranslationServicesHandler handler = new HttpTranslationServicesHandler();
+
+        // ToDo erase?
 //        Properties props = new Properties();
 //        props.put("Service", name);
 
@@ -188,7 +125,13 @@
 
     }
 
-    public void stop(BundleContext bundleContext) {
+    /**
+     * Stop the module, remove listeners and shut down.
+     *
+     * @param bundleContext the OSGi bundle context
+     */
+    public void stop(BundleContext bundleContext)
+    {
 
         // Stop listening to protocol's changes...
         bundleContext.removeServiceListener(this);
@@ -221,51 +164,51 @@
     }
 
     /**
+     * If incoming translations is enabled translate incoming message and "receive" it
+     * in user's chat window.
+     *  <p>
      * Called when a new incoming <tt>Message</tt> has been received.
      *
      * @param event the <tt>MessageReceivedEvent</tt> containing the newly
      *              received message, its sender and other details.
      */
-    public void messageReceived(MessageReceivedEvent event) {
-        System.out.println("RECEIVEEEEED KKK");
-
+    public void messageReceived(MessageReceivedEvent event)
+    {
         // Translation enabled?
         gui.readContactProperties();
         if (!gui.isTransIncoming())
             return;
 
+        System.out.println("Trying to translate incomming message...");
+
         Message msg = event.getSourceMessage();
         Contact contact = event.getSourceContact();
-
-        System.out.println("contact = " + contact);
-        System.out.println("msg = " + msg);
-        System.out.println("bundleContext = " + bundleContext);
-
         Chat chat = uiService.getChat(contact);
 
-        System.out.println("uiService = " + uiService);
-        System.out.println("chat = " + chat);
-
+        // Translate
         try {
             chat.processMessage(
                     contact.getDisplayName(),
                     new Date(System.currentTimeMillis()),
                     INCOMING_MESSAGE,
-                    "Translation: " + httpTrans.translateText(
+                    "Translation: " + handler.translateText(
                             msg.getContent(), gui.getSourceLangIn(), gui.getTargetLangIn()),
                     msg.getContentType());
-        } catch (UnableToTranslateException e) {
+
+            // Update menu status
+            gui.setLastServiceIn(handler.getLastUsedService().getServiceName());
+            System.out.println("Incomming message translated");
+        }
+        catch (UnableToTranslateException e) {
             e.printStackTrace();
+            System.out.println("Incomming message translation failed");
         }
-
-        // Update gui status
-        gui.setLastServiceIn(httpTrans.getLastUsedService().getServiceName());
-
-        System.out.println("RECEIVEEEEED AND TRANSLATED KKK");
-
     }
 
     /**
+     * If outgoing translations is enabled translate outgoing message and send it
+     * after the original message.
+     * <p>
      * Called when the underlying implementation has received an indication
      * that a message, sent earlier has been successfully received by the
      * destination.
@@ -273,8 +216,8 @@
      * @param event the MessageDeliveredEvent containing the id of the message
      *              that has caused the event.
      */
-    public void messageDelivered(MessageDeliveredEvent event) {
-
+    public void messageDelivered(MessageDeliveredEvent event)
+    {
         // Translation enabled?
         gui.readContactProperties();
         if (!gui.isTransOutgoing())
@@ -285,6 +228,7 @@
         ProtocolProviderService provider = contact.getProtocolProvider();
 
         // Don't translate the message more than once please...
+        // (as sending a translated message will fire the sent message event again)
         if (lastTransMsg.equals(msg.getMessageUID()))
             return;
 
@@ -295,28 +239,28 @@
 
         // Make sure provider has basic IM operation set set
         if (opSetIm != null) {
-            logger.trace("Sending translation...");
-            Message transMsg = null;
+            logger.trace("Trying to translate outgoing message...");
+            Message transMsg;
             try {
                 transMsg = opSetIm.createMessage(
-                        "Translation: " + httpTrans.translateText(
+                        "Translation: " + handler.translateText(
                                 msg.getContent(), gui.getSourceLangOut(), gui.getTargetLangOut())
                 );
             } catch (UnableToTranslateException e) {
                 e.printStackTrace();
+                System.out.println("Outgoing message translation failed");
                 return;
             }
             lastTransMsg = transMsg.getMessageUID();
             opSetIm.sendInstantMessage(contact, transMsg);
 
             // Update gui status
-            gui.setLastServiceOut(httpTrans.getLastUsedService().getServiceName());
+            gui.setLastServiceOut(handler.getLastUsedService().getServiceName());
 
-            logger.trace("Translation sent");
+            System.out.println("Outgoing message translated");
         } else
             logger.trace("Failed: Service did not have basic operation set");
 
-        System.out.println("DELIVEREEEEED KKK");
     }
 
     /**
@@ -326,27 +270,34 @@
      * @param event the <tt>MessageFailedEvent</tt> containing the ID of the
      *              message whose delivery has failed.
      */
-    public void messageDeliveryFailed(MessageDeliveryFailedEvent event) {
+    public void messageDeliveryFailed(MessageDeliveryFailedEvent event)
+    {
         // Do nothing...
-        System.out.println("DELIVERY FAILED KKK");
     }
 
-    public void serviceChanged(ServiceEvent event) {
+    /**
+     * Start/stop listening to the newly registered/unregistered services.
+     *
+     * @param event the service event
+     */
+    public void serviceChanged(ServiceEvent event)
+    {
         Object service
                 = bundleContext.getService(event.getServiceReference());
 
-        logger.trace("Received a service event for: "
-                + service.getClass().getName());
-
         // Ignore if not a protocol provider
         if (!(service instanceof ProtocolProviderService))
             return;
 
+        // Add listener for newly registered services
         logger.debug("Service is a protocol provider.");
         if (event.getType() == ServiceEvent.REGISTERED) {
             logger.debug("Adding a new Protocol Provider.");
             this.handleProviderAdded((ProtocolProviderService) service);
-        } else if (event.getType() == ServiceEvent.UNREGISTERING) {
+        }
+
+        // Remove listener on service shut down
+        else if (event.getType() == ServiceEvent.UNREGISTERING) {
             logger.debug("Removing a Protocol Provider.");
             this.handleProviderRemoved((ProtocolProviderService) service);
         }
@@ -355,8 +306,8 @@
     // Private methods
 
     // Listen to newly added provider
-
-    private void handleProviderAdded(ProtocolProviderService provider) {
+    private void handleProviderAdded(ProtocolProviderService provider)
+    {
         OperationSetBasicInstantMessaging opSetIm
                 = (OperationSetBasicInstantMessaging) provider
                 .getSupportedOperationSets()
@@ -371,7 +322,8 @@
     }
 
     // Stop listening to removed provider
-    private void handleProviderRemoved(ProtocolProviderService provider) {
+    private void handleProviderRemoved(ProtocolProviderService provider)
+    {
         OperationSetBasicInstantMessaging opSetIm
                 = (OperationSetBasicInstantMessaging) provider
                 .getSupportedOperationSets()

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationGUI.java	2008-08-14 07:30:10+0000
@@ -1,45 +1,38 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.plugin.translation.service.TranslationService;
-import net.java.sip.communicator.service.configuration.ConfigurationService;
-import net.java.sip.communicator.service.contactlist.MetaContact;
-import net.java.sip.communicator.service.contactlist.MetaContactGroup;
+import net.java.sip.communicator.plugin.translation.service.*;
+import net.java.sip.communicator.service.configuration.*;
+import net.java.sip.communicator.service.contactlist.*;
 import net.java.sip.communicator.service.gui.Container;
-import net.java.sip.communicator.service.gui.PluginComponent;
-import net.java.sip.communicator.service.gui.UIService;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
+import net.java.sip.communicator.service.gui.*;
+import org.osgi.framework.*;
 
 import javax.swing.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.MenuEvent;
-import javax.swing.event.MenuListener;
+import javax.swing.border.*;
+import javax.swing.event.*;
 import java.awt.*;
 import java.awt.event.*;
-import java.util.HashSet;
+import java.util.*;
 
 /**
- * User: Ernesto Rivera
- * Date: 2008/08/04
- * Time: 10:08:09
- * To change this template use File | Settings | File Templates.
+ * Class responsible for the GUI elements of the translation module for SIP communicator:
+ * A menu and a configuration dialog.
+ * <p/>
+ * The class also interacts with the {@link net.java.sip.communicator.service.configuration.ConfigurationService}
+ * to read and write user settings for persistency.
+ *
+ * @author Ernesto Rivera
  */
-public class TranslationGUI implements PluginComponent/*, ContactAwareComponent, ChatFocusListener*/ {
+public class TranslationGUI implements PluginComponent/*, ContactAwareComponent, ChatFocusListener*/
+{
 
-    private static ConfigurationService confService;
-
-    private JMenu translMenu;
-    private Container container;
-    private UIService uiService;
-    private HttpTranslationServicesHandler httpTrans;
+    // Variables
 
-    private JCheckBoxMenuItem transIncoming;
-    private JCheckBoxMenuItem transOutgoing;
-    private JMenuItem incomingStatus;
-    private JMenuItem outgoingStatus;
+    // Static variables
+    private static ConfigurationService confService;
 
     // Current contact's parameters
-    private int preferredServiceIndx;
+    private int preferredServiceIndx = 0;
     private String contactName;
     private String contactKey;
     private String lastServiceIn;
@@ -49,26 +42,43 @@
     private String sourceLangOut;
     private String targetLangOut;
 
+    // Menu variables
+    private JMenu translMenu;
+    private Container container;
+    private UIService uiService;
+    private HttpTranslationServicesHandler handler;
+    private JCheckBoxMenuItem transIncoming;
+    private JCheckBoxMenuItem transOutgoing;
+    private JMenuItem incomingStatus;
+    private JMenuItem outgoingStatus;
+
     // Service details
     private HashSet<String> sourceLangs;
     private HashSet<String> targetLangs;
 
-    // Default parameters
+    // Default language parameters (ignored if user preferences are available)
     private String defaultUserLang = "en";
     private String defaultContactLang = "es";
 
-//    // Others
-//    private Chat currentChat;
-
+    /**
+     * Contructor of a new GUI element, thus creator of the menu and dialog objects as well
+     * as their initialization.
+     *
+     * @param container     the container of translation menu
+     * @param bundleContext the OSGi module bundle context
+     * @param handler       the translation services' handler
+     */
     public TranslationGUI(
             Container container,
             BundleContext bundleContext,
-            HttpTranslationServicesHandler httpTrans) {
-
-        this.httpTrans = httpTrans;
-        sourceLangs = httpTrans.getAllSourceLangs();
-        targetLangs = httpTrans.getAllTargetLangs();
+            HttpTranslationServicesHandler handler)
+    {
+        this.handler = handler;
+        this.container = container;
+        sourceLangs = handler.getAllSourceLangs();
+        targetLangs = handler.getAllTargetLangs();
 
+        // Get the UI service
         ServiceReference uiServiceRef
                 = bundleContext.getServiceReference(UIService.class.getName());
         uiService = (UIService) bundleContext.getService(uiServiceRef);
@@ -97,20 +107,20 @@
         JMenuItem options = new JMenuItem(TranslationUtil.getI18NString("TransOptions") + "...");
         translMenu.add(options);
 
-        this.container = container;
-
-        preferredServiceIndx = 0;
-
         // Listeners
 
-        translMenu.addMenuListener(new MenuListener() {
-            public void menuSelected(MenuEvent e) {
+        // Used to refresh translation status
+        translMenu.addMenuListener(new MenuListener()
+        {
+            public void menuSelected(MenuEvent e)
+            {
 
                 // Refresh settings
                 System.out.println("Refreshing translation menu");
                 readContactProperties();
 
-                // Update menu items
+                // Update menu status
+
                 incomingStatus.setText(
                         TranslationUtil.getI18NString("Lang_" + sourceLangIn) + " - "
                                 + TranslationUtil.getI18NString("Lang_" + targetLangIn));
@@ -128,29 +138,40 @@
                                     " (" + lastServiceOut + ")");
             }
 
-            public void menuDeselected(MenuEvent e) {
+            public void menuDeselected(MenuEvent e)
+            {
                 // Do nothing
             }
 
-            public void menuCanceled(MenuEvent e) {
+            public void menuCanceled(MenuEvent e)
+            {
                 // Do nothing
             }
         });
 
-        transIncoming.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
+        // Listen to translation's checkboxes changes
+        transIncoming.addActionListener(new ActionListener()
+        {
+            public void actionPerformed(ActionEvent e)
+            {
                 onCheck();
             }
         });
-
-        transOutgoing.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
+        transOutgoing.addActionListener(new ActionListener()
+        {
+            public void actionPerformed(ActionEvent e)
+            {
                 onCheck();
             }
         });
 
-        options.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
+        // Listen to option's menu selection to open dialog
+        options.addActionListener(new ActionListener()
+        {
+            public void actionPerformed(ActionEvent e)
+            {
+                // Create dialog and display it
+
                 OptionsDialog dialog = new OptionsDialog();
                 dialog.setTitle(TranslationUtil.getI18NString(
                         "TranslationOptionsFor",
@@ -176,7 +197,8 @@
      *
      * @return the name of this plugin component
      */
-    public String getName() {
+    public String getName()
+    {
         return translMenu.getName();
     }
 
@@ -189,7 +211,8 @@
      *
      * @return the container, where we would like to add our control.
      */
-    public Container getContainer() {
+    public Container getContainer()
+    {
         return container;
     }
 
@@ -201,7 +224,8 @@
      * @return the constraints, which will indicate to the container, where this
      *         component should be added.
      */
-    public String getConstraints() {
+    public String getConstraints()
+    {
         return null;
     }
 
@@ -214,7 +238,8 @@
      * @return the index position of this component in the container, where it
      *         will be added.
      */
-    public int getPositionIndex() {
+    public int getPositionIndex()
+    {
         return -1; // Just before the Help menu
     }
 
@@ -225,7 +250,8 @@
      *
      * @return the component that should be added.
      */
-    public Object getComponent() {
+    public Object getComponent()
+    {
         return translMenu;
     }
 
@@ -238,14 +264,9 @@
      *
      * @param metaContact the current meta contact
      */
-    public void setCurrentContact(MetaContact metaContact) {
-//        System.out.println("KKKKKKKKKKKKKKKKKKKKKK metaContact = " + metaContact);
-//
-//        // Update name
-//        contactKey = metaContact.getDisplayName().replaceAll("[^a-zA-Z]", "_");
-//
-//        // Update properties
-//        readContactProperties();
+    public void setCurrentContact(MetaContact metaContact)
+    {
+        // Could be usefull but never gets called...
     }
 
     /**
@@ -256,12 +277,9 @@
      *
      * @param metaGroup the current meta contact group
      */
-    public void setCurrentContactGroup(MetaContactGroup metaGroup) {
-//        // Update name
-//        contactKey = metaGroup.getGroupName().replaceAll("[^a-zA-Z]", "_");
-//
-//        // Update properties
-//        readContactProperties();
+    public void setCurrentContactGroup(MetaContactGroup metaGroup)
+    {
+        // Could be usefull but never gets called...
     }
 
     /**
@@ -272,48 +290,62 @@
      * @return <code>true</code> to indicate that this component is a native
      *         component and <code>false</code> otherwise.
      */
-    public boolean isNativeComponent() {
+    public boolean isNativeComponent()
+    {
         return false;
     }
 
     // Getters and setters
 
-    public int getPreferredServiceIndx() {
+    public int getPreferredServiceIndx()
+    {
         return preferredServiceIndx;
     }
 
-    public String getSourceLangIn() {
+    public String getSourceLangIn()
+    {
         return sourceLangIn;
     }
 
-    public String getTargetLangIn() {
+    public String getTargetLangIn()
+    {
         return targetLangIn;
     }
 
-    public String getSourceLangOut() {
+    public String getSourceLangOut()
+    {
         return sourceLangOut;
     }
 
-    public String getTargetLangOut() {
+    public String getTargetLangOut()
+    {
         return targetLangOut;
     }
 
-    public void setLastServiceIn(String lastServiceIn) {
+    public void setLastServiceIn(String lastServiceIn)
+    {
         this.lastServiceIn = lastServiceIn;
     }
 
-    public void setLastServiceOut(String lastServiceOut) {
+    public void setLastServiceOut(String lastServiceOut)
+    {
         this.lastServiceOut = lastServiceOut;
     }
 
     /**
-     * Read contact properties from saved settings
+     * Read contact properties from saved settings.
+     * Declared public for convenience only.
+     * <p/>
+     * Preferences are not global to all contacts, but saved on a contact
+     * specific way.
      */
-    public void readContactProperties() {
+    public void readContactProperties()
+    {
 
         // Update contact
         contactName = uiService.getCurrentChat().getChatName();
-        contactKey = contactName.replaceAll("[^a-zA-Z]", "_");
+        contactKey = contactName.replaceAll(
+                "[^a-zA-Z]", "_"); // Exclude any problematic character
 
         // Enabled incoming translations?
         transIncoming.setSelected(
@@ -327,17 +359,15 @@
                         TranslationPreferences.ENABLED_TRANSLATIONS_OUT,
                         "false")));
 
-        // Get preferred/current in/out service and current language pairs
+        // Get preferred in/out
         preferredServiceIndx = Integer.valueOf(getProperty(
                 TranslationPreferences.PREFERRED_SERVICE,
                 Integer.toString(preferredServiceIndx)));
-        httpTrans.setPreferredServiceByIndx(preferredServiceIndx);
-//        lastServiceIn = getProperty(
-//                TranslationPreferences.LAST_SERVICE_IN,
-//                "");
-//        lastServiceOut = getProperty(
-//                TranslationPreferences.LAST_SERVICE_OUT,
-//                "");
+
+        // We need to update the preferred service for the handler also!
+        handler.setPreferredServiceByIndx(preferredServiceIndx);
+
+        // Get the saved language pairs, or use defualts if needed
         sourceLangIn = getProperty(
                 TranslationPreferences.SOURCE_LANG_IN,
                 defaultContactLang);
@@ -352,6 +382,30 @@
                 defaultContactLang);
     }
 
+    // Getters
+
+    /**
+     * Check whether user wants to get his incoming messages translated.
+     *
+     * @return whether user wants auto-translation
+     */
+    public boolean isTransIncoming()
+    {
+        return transIncoming.isSelected();
+    }
+
+    /**
+     * Check whether user wants to get his outgoing messages translated.
+     *
+     * @return whether user wants auto-translation
+     */
+    public boolean isTransOutgoing()
+    {
+        return transOutgoing.isSelected();
+    }
+
+
+    // Update contact properties
     private void updateContactProperties(
             boolean transIn,
             boolean transOut,
@@ -359,7 +413,8 @@
             String sourceLangIn,
             String targetLangIn,
             String sourceLangOut,
-            String targetLangOut) {
+            String targetLangOut)
+    {
         // Enabled incoming translations?
         transIncoming.setSelected(transIn);
         setProperty(TranslationPreferences.ENABLED_TRANSLATIONS_IN, Boolean.toString(transIn));
@@ -371,7 +426,9 @@
         // Update preferred service and current language pairs
         this.preferredServiceIndx = preferredServiceIndx;
         setProperty(TranslationPreferences.PREFERRED_SERVICE, Integer.toString(preferredServiceIndx));
-        httpTrans.setPreferredServiceByIndx(preferredServiceIndx);
+        handler.setPreferredServiceByIndx(preferredServiceIndx);
+
+        // Source and target languages
 
         this.sourceLangIn = sourceLangIn;
         setProperty(TranslationPreferences.SOURCE_LANG_IN, sourceLangIn);
@@ -386,42 +443,32 @@
         setProperty(TranslationPreferences.TARGET_LANG_OUT, targetLangOut);
     }
 
-    private String getProperty(String property, String defaultValue) {
+    // Get configuration property, return default if not found
+    private String getProperty(String property, String defaultValue)
+    {
         String tmp = (String) confService.getProperty(
+
+                // Make properties contact-dependant
                 property + "." + contactKey);
+
         if (tmp != null) {
-//            System.out.println("property = " + property);
-//            System.out.println("tmp.getClass() = " + tmp.getClass());
-//            System.out.println("tmp = " + tmp);
             return tmp;
         } else
             return defaultValue;
     }
 
-    private void setProperty(String property, String value) {
+    // Set configuration property
+    private void setProperty(String property, String value)
+    {
         confService.setProperty(
+
+                // Make properties contact-dependant
                 property + "." + contactKey,
                 value);
     }
 
-    public boolean isTransIncoming() {
-        return transIncoming.isSelected();
-    }
-
-    public boolean isTransOutgoing() {
-        return transOutgoing.isSelected();
-    }
-
-    public String getLastServiceIn() {
-        return lastServiceIn;
-    }
-
-    public String getLastServiceOut() {
-        return lastServiceOut;
-
-    }// Write properties from menu checkboxes
-
-    private void onCheck() {
+    private void onCheck()
+    {
         setProperty(
                 TranslationPreferences.ENABLED_TRANSLATIONS_IN,
                 Boolean.toString(transIncoming.isSelected()));
@@ -430,26 +477,12 @@
                 Boolean.toString(transOutgoing.isSelected()));
     }
 
-//    /**
-//     * Indicates that a <tt>Chat</tt> has gained the focus.
-//     *
-//     * @param event the ChatFocusEvent containing the corresponding chat.
-//     */
-//    public void chatFocusGained(ChatFocusEvent event) {
-//        currentChat = event.getChat();
-//        System.out.println("KKKKKKKKKKKK currentChat = " + currentChat);
-//    }
-//
-//    /**
-//     * Indicates that a <tt>Chat</tt> has lost the focus.
-//     *
-//     * @param event the ChatFocusEvent containing the corresponding chat.
-//     */
-//    public void chatFocusLost(ChatFocusEvent event) {
-//        // Do nothing
-//    }
-
-    private class OptionsDialog extends JDialog {
+    /**
+     * Dialog used to set transaltion options.
+     */
+    private class OptionsDialog extends JDialog
+    {
+        // Variables
         private JCheckBox transInCheck;
         private JCheckBox transOutCheck;
         private JComboBox prefServiceBox;
@@ -460,12 +493,15 @@
         private JPanel inPanel;
         private JPanel outPanel;
 
-        private OptionsDialog() {
+        // Dialog constructor
+        private OptionsDialog()
+        {
             JPanel optionsPane = new JPanel(new GridLayout(0, 1));
             optionsPane.setBorder(new EmptyBorder(10, 10, 10, 10));
 
             // Preferred service
-            prefServiceBox = new JComboBox(httpTrans.getServices());
+
+            prefServiceBox = new JComboBox(handler.getServices());
             prefServiceBox.setRenderer(new ServiceRenderer());
             prefServiceBox.setSelectedIndex(preferredServiceIndx);
 
@@ -476,6 +512,7 @@
             optionsPane.add(tmp);
 
             // "In" panel
+
             srcLangInBox = new JComboBox(sourceLangs.toArray());
             srcLangInBox.setRenderer(new LangRenderer());
             srcLangInBox.setSelectedItem(sourceLangIn);
@@ -497,6 +534,7 @@
             optionsPane.add(inPanel);
 
             // "Out" panel
+
             srcLangOutBox = new JComboBox(sourceLangs.toArray());
             srcLangOutBox.setRenderer(new LangRenderer());
             srcLangOutBox.setSelectedItem(sourceLangOut);
@@ -518,6 +556,7 @@
             optionsPane.add(outPanel);
 
             // Save/cancel panel
+
             JButton buttonSave = new JButton(TranslationUtil.getI18NString("SaveOptions"));
             JButton buttonCancel = new JButton(TranslationUtil.getI18NString("CancelSaveOptions"));
             tmp = new JPanel();
@@ -527,6 +566,7 @@
             optionsPane.add(tmp);
 
             // Finish
+
             setContentPane(optionsPane);
             setModal(true);
             getRootPane().setDefaultButton(buttonSave);
@@ -534,47 +574,61 @@
 
             // Listeners
 
-            buttonSave.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
+            buttonSave.addActionListener(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
                     onOK();
                 }
             });
 
-            buttonCancel.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
+            buttonCancel.addActionListener(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
                     onCancel();
                 }
             });
 
-            transInCheck.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
+            transInCheck.addActionListener(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
                     onCheck();
                 }
             });
 
-            transOutCheck.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
+            transOutCheck.addActionListener(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
                     onCheck();
                 }
             });
 
-            // call onCancel() when cross is clicked
+            // Call onCancel() when cross is clicked
             setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
-            addWindowListener(new WindowAdapter() {
-                public void windowClosing(WindowEvent e) {
+            addWindowListener(new WindowAdapter()
+            {
+                public void windowClosing(WindowEvent e)
+                {
                     onCancel();
                 }
             });
 
             // call onCancel() on ESCAPE
-            optionsPane.registerKeyboardAction(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
+            optionsPane.registerKeyboardAction(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
                     onCancel();
                 }
             }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
         }
 
-        private void onOK() {
+        // Repercute all user selected options
+        private void onOK()
+        {
             updateContactProperties(
                     transInCheck.isSelected(),
                     transOutCheck.isSelected(),
@@ -587,13 +641,15 @@
             dispose();
         }
 
-        private void onCancel() {
-            // add your code here if necessary
+        // Do nothing on cancel
+        private void onCancel()
+        {
             dispose();
         }
 
         // Enable/disable in/out panels according to their respective checkboxes
-        private void onCheck() {
+        private void onCheck()
+        {
             for (int i = 0; i < inPanel.getComponents().length; i++) {
                 Component component = inPanel.getComponents()[i];
                 component.setEnabled(transInCheck.isSelected());
@@ -608,16 +664,18 @@
 
     // Renderers
 
-    /**
-     * A renderer for service's comboboxes
-     */
-    private class ServiceRenderer extends DefaultListCellRenderer {
-        public ServiceRenderer() {
+    // A renderer for service's comboboxes
+
+    private class ServiceRenderer extends DefaultListCellRenderer
+    {
+        public ServiceRenderer()
+        {
             this.setOpaque(true);
         }
 
         public Component getListCellRendererComponent(JList list, Object value,
-                                                      int index, boolean isSelected, boolean cellHasFocus) {
+                                                      int index, boolean isSelected, boolean cellHasFocus)
+        {
             if (isSelected) {
                 setBackground(list.getSelectionBackground());
                 setForeground(list.getSelectionForeground());
@@ -631,16 +689,17 @@
         }
     }
 
-    /**
-     * A renderer for our languages' comboboxes
-     */
-    private class LangRenderer extends DefaultListCellRenderer {
-        public LangRenderer() {
+    // A renderer for our languages' comboboxes
+    private class LangRenderer extends DefaultListCellRenderer
+    {
+        public LangRenderer()
+        {
             this.setOpaque(true);
         }
 
         public Component getListCellRendererComponent(JList list, Object value,
-                                                      int index, boolean isSelected, boolean cellHasFocus) {
+                                                      int index, boolean isSelected, boolean cellHasFocus)
+        {
             if (isSelected) {
                 setBackground(list.getSelectionBackground());
                 setForeground(list.getSelectionForeground());

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationPreferences.java	2008-08-14 07:30:10+0000
@@ -11,7 +11,8 @@
  *
  * @author Ernesto Rivera
  */
-public final class TranslationPreferences {
+public final class TranslationPreferences
+{
     public static final String PREFERRED_SERVICE = "at.liwest.communicator.plugin.translation.preferredservice";
     public static final String ENABLED_TRANSLATIONS_IN = "at.liwest.communicator.plugin.translation.enabled.in";
     public static final String ENABLED_TRANSLATIONS_OUT = "at.liwest.communicator.plugin.translation.enabled.out";

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/TranslationUtil.java	2008-08-14 07:30:10+0000
@@ -1,75 +1,91 @@
 package net.java.sip.communicator.plugin.translation;
 
-import net.java.sip.communicator.service.resources.ResourceManagementService;
-import net.java.sip.communicator.util.Logger;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import net.java.sip.communicator.service.resources.*;
+import org.osgi.framework.*;
 
-public abstract class TranslationUtil {
-
-
-    // Get logger
-    private static Logger logger = Logger.getLogger(TranslationUtil.class);
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+/**
+ * Miscelanous transalation module's handly static methods' collection.
+ * <p/>
+ * Handling of strings, translation definitions' XML files and I18N.
+ *
+ * @author Ernesto Rivera
+ */
+public abstract class TranslationUtil
+{
     private static ResourceManagementService resourcesService;
-//    private static BundleContext bundleContext;
-
-    // TODO Make methods below resistant to blank spaces (use RegEx)
 
-    // Find the first ocurrence of tag and return its contents
-
-    public static String readTag(String contents, String tag) {
-        contents = contents.replaceFirst("<" + tag + ".*?>", "<" + tag + ">");
+    /**
+     * Find the first ocurrence of a givent tag and return its contents.
+     *
+     * @param s   the string containing the tag
+     * @param tag the tag to search for
+     * @return the contents of the tag, or empty string if not found
+     */
+    public static String readTag(String s, String tag)
+    {
+        s = s.replaceFirst("<" + tag + ".*?>", "<" + tag + ">");
         return getSubstringBetween(
-                contents,
+                s,
                 "<" + tag + ">",
                 "</" + tag + ">"
         ).replaceAll("&", "&").trim();
-    }// Find the first ocurrence of tag and return its attribute's contents
+    }
+
+    /**
+     * Find the first ocurrence of a givent tag and return its attribute value.
+     *
+     * @param s    the string containing the tag
+     * @param tag  the tag to search for
+     * @param attr the attribute value
+     * @return the value of the given tag's attribute, or empty string if not found
+     */
+    public static String readAttr(String s, String tag, String attr)
+    {
 
-    public static String readAttr(String contents, String tag, String attr) {
-//        System.out.println("tag = " + tag);
-//        System.out.println("attr = " + attr);
-        String s = getSubstringBetween(
-                contents,
+        String tmp = getSubstringBetween(
+                s,
                 "<" + tag,
                 "/>"
         ).trim();
-//        System.out.println("s = " + s);
-        char[] delimitator = {s.charAt(
-                s.indexOf(attr) + attr.length() + 1 // _____=X <--- is it a " or a '?
+        char[] delimitator = {tmp.charAt(
+                tmp.indexOf(attr) + attr.length() + 1 // _____=X <--- is it a " or a '?
         )};
-//        System.out.println("delimitator = " + delimitator[0]);
         return getSubstringBetween(
-                s,
+                tmp,
                 attr + "=" + delimitator[0],
                 "" + delimitator[0]
         ).trim();
-    }// Remove XML comments
+    }
 
-    public static String removeXmlComments(String contents) {
-        return contents.replaceAll("<!--.*?-->", "").trim();
+    /**
+     * Remove XML comments.
+     *
+     * @param s the string containing the XML code
+     * @return the XML code without XML comments
+     */
+    public static String removeXmlComments(String s)
+    {
+        return s.replaceAll("<!--.*?-->", "").trim();
     }
 
     /**
-     * Read all text contents from the input at once
+     * Read all text contents from the input at once.
      *
-     * @param input the input
-     * @return the text ∆contents
-     * @throws java.io.IOException
+     * @param input    the input source
+     * @param encoding the encoding used to interpret the input source
+     * @return all the string contents on the input source
+     * @throws IOException thrown if reading from the input fails
      */
-    public static String readAllContents(InputStream input) throws IOException {
+    public static String readAllContents(InputStream input, String encoding) throws IOException
+    {
         String response = "";
         String line;
 
-        BufferedReader reader = new BufferedReader(new InputStreamReader(input, "UTF-8")); // TODO enable encoding
+        BufferedReader reader = new BufferedReader(new InputStreamReader(input, encoding));
         while (true) {
             line = reader.readLine();
             if (line == null)
@@ -77,35 +93,50 @@
             response += line + "\n";
         }
 
-//        System.out.println("response = " + response);
-
         return response;
     }
 
     /**
-     * Simply get the substring between the start and end strings
-     * Return and empty string if start and end are not found
+     * Simply get the substring between the start and end strings (not griddy).
      *
-     * @param text
-     * @param start
-     * @param end
-     * @return
+     * @param s     the input string
+     * @param start the start delimiter
+     * @param end   the end delimiter
+     * @return the found string, or empty string if delimiters were not found
      */
-    public static String getSubstringBetween(String text, String start, String end) {
-
-
-        int a = text.indexOf(start);
+    public static String getSubstringBetween(String s, String start, String end)
+    {
+        // Find start
+        int a = s.indexOf(start);
         if (a == -1)
             return "";
         else
             a += start.length();
-        int b = text.indexOf(end, a);
+
+        // Find the end
+        int b = s.indexOf(end, a);
         if (b == -1)
             return "";
-        return text.substring(a, b).trim();
+
+        // Return the string
+        return s.substring(a, b).trim();
     }
 
-    public static Vector<String> split(String text, int maxLines, int maxChars) {
+    /**
+     * Split a text on sections of text containing a limited number of lines or
+     * characters.
+     * <p/>
+     * The method tries to cut text at end of sentences, new lines or blank spaces in that
+     * order to ensure that sections of text keep their meaning by themselves, thus resulting
+     * sections can be translated more effectively.
+     *
+     * @param text     the orignial text
+     * @param maxLines the maximum number of lines (0 for no limit)
+     * @param maxChars the maximum number of characters (0 for no limit)
+     * @return the splited version of the text
+     */
+    public static Vector<String> split(String text, int maxLines, int maxChars)
+    {
         Vector<String> split = new Vector<String>();
 
         // First lets split lines
@@ -131,18 +162,22 @@
         return split;
     }
 
-    private static Vector<String> split(String text, int maxChars) {
+    // Character-number centered text splitter
+    private static Vector<String> split(String text, int maxChars)
+    {
         Vector<String> split = new Vector<String>();
-        String[] cutHere = {"\n", ".", "!", "?", ",", ":", ";", " "}; // List of places we would like to cut (order of preference)
-        int i;
 
-        // No need?
+        // List of places we would prefer to cut (in order of preference)
+        String[] cutHere = {"\n", ".", "!", "?", ",", ":", ";", " "};
+
+        // No need to split?
         if (maxChars == 0) {
             split.add(text);
             return split;
         }
 
         // Start...
+        int i;
         while (text.length() > maxChars) {
             // Where to cut?
             i = -1;
@@ -154,20 +189,28 @@
 
             // ...nowhere good to cut?
             if (i == -1)
-                i = maxChars; // easiest...
+                i = maxChars; // Easiest... cut blindly at the last possible character
 
             // Cut
             split.add(text.substring(0, i + 1));
             text = text.substring(i + 1);
         }
 
-        // Add the last piece
+        // Add the last piece of text
         split.add(text);
 
         return split;
     }
 
-    public static void initI18N(BundleContext bundleContext) {
+    /**
+     * Initialize I18N methods.
+     * <p/>
+     * Note: Must be called before I18N related methods.
+     *
+     * @param bundleContext the OSGi bundle context
+     */
+    public static void initI18N(BundleContext bundleContext)
+    {
         if (resourcesService == null) {
             ServiceReference serviceReference = bundleContext
                     .getServiceReference(ResourceManagementService.class.getName());
@@ -178,11 +221,32 @@
         }
     }
 
-    public static String getI18NString(String key) {
+    /**
+     * Returns an internationalized string corresponding to the given key.
+     * <p/>
+     * Note: Requires calling {@code initI18N()} first.
+     *
+     * @param key the identifier of the string in the resources properties file
+     * @return an internationalized string corresponding to the given key
+     */
+    public static String getI18NString(String key)
+    {
         return resourcesService.getI18NString(key);
     }
 
-    public static String getI18NString(String key, String[] params) {
+    /**
+     * Returns an internationalized string corresponding to the given key and
+     * replace placeholders using given parameters.
+     * <p/>
+     * Note: Requires calling {@code initI18N()} first.
+     *
+     * @param key    the identifier of the string in the resources properties file.
+     * @param params the parameters to be placed on placeholders
+     * @return an internationalized string corresponding to the given key and
+     *         given locale.
+     */
+    public static String getI18NString(String key, String[] params)
+    {
         return resourcesService.getI18NString(key, params);
     }
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/Languages.java	2008-08-14 07:30:10+0000
@@ -1,14 +1,14 @@
 package net.java.sip.communicator.plugin.translation.service;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.*;
 
 /**
  * Interface of language pairs handler.
  *
  * @author Ernesto Rivera
  */
-public interface Languages {
+public interface Languages
+{
     /**
      * Get a Map of available translation's combinations
      *

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationService.java	2008-08-14 07:30:10+0000
@@ -5,7 +5,8 @@
  *
  * @author Ernesto Rivera
  */
-public interface TranslationService {
+public interface TranslationService
+{
     /**
      * Get the name of the translation service.
      *

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceException.java	2008-08-14 07:30:10+0000
@@ -5,11 +5,13 @@
  *
  * @author Ernesto Rivera
  */
-public class TranslationServiceException extends Exception {
+public class TranslationServiceException extends Exception
+{
     /**
      * Constructs an TranslationServiceException with no detail message.
      */
-    public TranslationServiceException() {
+    public TranslationServiceException()
+    {
     }
 
     /**
@@ -18,7 +20,8 @@
      *
      * @param message the detail message
      */
-    public TranslationServiceException(String message) {
+    public TranslationServiceException(String message)
+    {
         super(message);
     }
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServiceNotAvailableException.java	2008-08-14 07:30:10+0000
@@ -5,11 +5,13 @@
  *
  * @author Ernesto Rivera
  */
-public class TranslationServiceNotAvailableException extends TranslationServiceException {
+public class TranslationServiceNotAvailableException extends TranslationServiceException
+{
     /**
      * Constructs an ServiceNotAvailableException with no detail message.
      */
-    public TranslationServiceNotAvailableException() {
+    public TranslationServiceNotAvailableException()
+    {
     }
 
     /**
@@ -18,7 +20,8 @@
      *
      * @param message the detail message
      */
-    public TranslationServiceNotAvailableException(String message) {
+    public TranslationServiceNotAvailableException(String message)
+    {
         super(message);
     }
 

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/TranslationServicesHandler.java	2008-08-14 07:30:10+0000
@@ -1,11 +1,8 @@
 package net.java.sip.communicator.plugin.translation.service;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Set;
-import java.util.Vector;
+import java.io.*;
+import java.net.*;
+import java.util.*;
 
 /**
  * Interface of a handler of several {@link TranslationService}'s
@@ -13,7 +10,8 @@
  *
  * @author Ernesto Rivera
  */
-public interface TranslationServicesHandler {
+public interface TranslationServicesHandler
+{
     /**
      * Translate text form a source language into a target language.
      * <p/>

Modified: branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java?view=diff&rev=4247&p1=branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java&p2=branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java&r1=4246&r2=4247
==============================================================================
--- branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java	(original)
+++ branches/translation/src/net/java/sip/communicator/plugin/translation/service/UnableToTranslateException.java	2008-08-14 07:30:10+0000
@@ -5,11 +5,13 @@
  *
  * @author Ernesto Rivera
  */
-public class UnableToTranslateException extends TranslationServiceException {
+public class UnableToTranslateException extends TranslationServiceException
+{
     /**
      * Constructs an UnableToTranslateException with no detail message.
      */
-    public UnableToTranslateException() {
+    public UnableToTranslateException()
+    {
     }
 
     /**
@@ -18,7 +20,8 @@
      *
      * @param message the detail message
      */
-    public UnableToTranslateException(String message) {
+    public UnableToTranslateException(String message)
+    {
         super(message);
     }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: commits-help at sip-communicator.dev.java.net





More information about the commits mailing list