[kune-commits] r1572 - in trunk: . src/main/java/cc/kune/common/client/utils src/main/java/cc/kune/core/client/i18n src/main/java/cc/kune/core/client/sn/actions src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ws/entheader src/main/java/cc/kune/core/server src/main/java/cc/kune/core/server/properties src/main/java/cc/kune/core/server/utils src/main/java/cc/kune/core/shared/dto src/main/java/cc/kune/domain src/main/java/cc/kune/gspace/client src/main/java/cc/kune/pspace/client src/main/resources src/main/webapp src/test/java/cc/kune/core/server/manager

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Tue Oct 25 01:06:49 CEST 2011


Author: vjrj_
Date: 2011-10-25 01:06:49 +0200 (Tue, 25 Oct 2011)
New Revision: 1572

Modified:
   trunk/.classpath
   trunk/INSTALL
   trunk/pom.xml
   trunk/src/main/java/cc/kune/common/client/utils/UrlParam.java
   trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
   trunk/src/main/java/cc/kune/core/client/sn/actions/WriteToBuddyHeaderButton.java
   trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
   trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeader.java
   trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java
   trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java
   trunk/src/main/java/cc/kune/core/server/InitData.java
   trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
   trunk/src/main/java/cc/kune/core/server/utils/UrlUtils.java
   trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java
   trunk/src/main/java/cc/kune/domain/I18nTranslation.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
   trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.java
   trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.ui.xml
   trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
   trunk/src/main/resources/kune.properties
   trunk/src/main/webapp/ws.html
   trunk/src/test/java/cc/kune/core/server/manager/I18nManagerDefaultTest.java
Log:
NEW - # 144: Resolve some i18n typos (sizes, no translated, etc) 
http://kune.ourproject.org/issues/ticket/144

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/.classpath	2011-10-24 23:06:49 UTC (rev 1572)
@@ -121,16 +121,16 @@
   <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-msg/0.3.3/proto-msg-0.3.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.6.0/selenium-android-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.6.0/selenium-android-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-api/2.6.0/selenium-api-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-api/2.6.0/selenium-api-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.6.0/selenium-chrome-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.6.0/selenium-chrome-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.6.0/selenium-firefox-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.6.0/selenium-firefox-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.6.0/selenium-htmlunit-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.6.0/selenium-htmlunit-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.6.0/selenium-ie-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.6.0/selenium-ie-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.6.0/selenium-iphone-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.6.0/selenium-iphone-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-java/2.6.0/selenium-java-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-java/2.6.0/selenium-java-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.6.0/selenium-remote-driver-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.6.0/selenium-remote-driver-2.6.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-support/2.6.0/selenium-support-2.6.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-support/2.6.0/selenium-support-2.6.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.8.0/selenium-android-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.8.0/selenium-android-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-api/2.8.0/selenium-api-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-api/2.8.0/selenium-api-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.8.0/selenium-chrome-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.8.0/selenium-chrome-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.8.0/selenium-firefox-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.8.0/selenium-firefox-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.8.0/selenium-htmlunit-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.8.0/selenium-htmlunit-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.8.0/selenium-ie-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.8.0/selenium-ie-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.8.0/selenium-iphone-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.8.0/selenium-iphone-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-java/2.8.0/selenium-java-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-java/2.8.0/selenium-java-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.8.0/selenium-remote-driver-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.8.0/selenium-remote-driver-2.8.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-support/2.8.0/selenium-support-2.8.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-support/2.8.0/selenium-support-2.8.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1-sources.jar"/>

Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/INSTALL	2011-10-24 23:06:49 UTC (rev 1572)
@@ -56,6 +56,7 @@
  - pom.xml
  - script/liquibase-migrate.sh
  - script/liquibase-rollback.sh
+ - script/i18n-db2gwt.sh
  - src/main/resources/db/liquibase.properties
  - src/main/resources/META-INF/persistence.xml
  - src/main/webapp/WEB-INF/publicspace/config/database.yml

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/pom.xml	2011-10-24 23:06:49 UTC (rev 1572)
@@ -489,7 +489,7 @@
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-java</artifactId>
-      <version>2.6.0</version>
+      <version>2.8.0</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.collections</groupId>

Modified: trunk/src/main/java/cc/kune/common/client/utils/UrlParam.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/utils/UrlParam.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/common/client/utils/UrlParam.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -19,30 +19,38 @@
  \*/
 package cc.kune.common.client.utils;
 
+import java.util.Date;
+
 public class UrlParam {
-    private final String value;
-    private final String name;
+  public static String noCacheStringSuffix() {
+    final String noCache = "&nocache=" + new Date().getTime();
+    return noCache;
+  }
+  private final String name;
 
-    public UrlParam(String name, boolean value) {
-        this.name = name;
-        this.value = value ? "true" : "false";
-    }
+  private final String value;
 
-    public UrlParam(String name, String value) {
-        this.name = name;
-        this.value = value;
-    }
+  public UrlParam(final String name, final boolean value) {
+    this.name = name;
+    this.value = value ? "true" : "false";
+  }
 
-    public String getName() {
-        return name;
-    }
+  public UrlParam(final String name, final String value) {
+    this.name = name;
+    this.value = value;
+  }
 
-    public String getValue() {
-        return value;
-    }
+  public String getName() {
+    return name;
+  }
 
-    @Override
-    public String toString() {
-        return name + "=" + value;
-    }
+  public String getValue() {
+    return value;
+  }
+
+  @Override
+  public String toString() {
+    return name + "=" + value;
+  }
+
 }

Modified: trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -20,6 +20,7 @@
 package cc.kune.core.client.i18n;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.MissingResourceException;
@@ -39,6 +40,7 @@
 import com.google.gwt.core.client.Scheduler.RepeatingCommand;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.LocaleInfo;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.inject.Inject;
 
@@ -60,7 +62,13 @@
     this.kuneConstants = kuneConstants;
     final Location loc = WindowUtils.getLocation();
     final String locale = loc.getParameter("locale");
+    final LocaleInfo currentLocale = LocaleInfo.getCurrentLocale();
+    Log.info("Workspace starting with language: " + currentLocale.getLocaleName() + ", isRTL: "
+        + LocaleInfo.getCurrentLocale().isRTL() + ", translated langs: "
+        + Arrays.toString(LocaleInfo.getAvailableLocaleNames()));
+
     earlyTexts = new ArrayList<Pair<String, String>>();
+
     i18nService.getInitialLanguage(locale, new AsyncCallback<I18nLanguageDTO>() {
       @Override
       public void onFailure(final Throwable caught) {
@@ -82,7 +90,7 @@
           public void onSuccess(final HashMap<String, String> result) {
             lexicon = result;
             session.setCurrentLanguage(currentLang);
-            Log.error("Workspace adaptation to language: " + currentLang.getEnglishName());
+            Log.info("Workspace adaptation to language: " + currentLang.getEnglishName());
             eventBus.fireEvent(new I18nReadyEvent());
             Scheduler.get().scheduleIncremental(new RepeatingCommand() {
 

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -268,6 +268,8 @@
 
   String hostedGroups();
 
+  String inDevelopmentWithBrackets();
+
   String infoAboutErrors();
 
   String join();
@@ -372,12 +374,16 @@
 
   String newYoutubeVideo();
 
+  String nExternalUser();
+
   String nextUsedInButton();
 
   String no();
 
   String notes();
 
+  String notPublishable();
+
   String notPublishedYet();
 
   String notTranslated();
@@ -506,6 +512,8 @@
 
   String seeTheArchiveOfOldConversationsInDevelopment();
 
+  String seeTheArchiveOfOldConversationsInDevelopmentWithBrackets();
+
   String select();
 
   String selectACreativeCommonsLicenseRecommendedForCulturalWorks();
@@ -538,6 +546,8 @@
 
   String signIn();
 
+  String signInOrCreateAnAccountToAccessToYourInbox();
+
   String signInToCollaborate();
 
   String signOut();
@@ -630,10 +640,14 @@
 
   String thisIsTheDefaultLicenseForAllTheContentsOfThisGroupAlthoughYouCanChooseADifferentLicenseForSpecificC();
 
+  String thisPageIsNotPublishable();
+
   String thisSite();
 
   String thisToolCannotBeDisabledAsLongAsItsWhereTheGroupsHomePageIsLocatedChangeTheDefaultHomePageToAnotherT();
 
+  String thisUserDoesNotHaveAHomepage();
+
   String thisUserHasNoBuddiesYet();
 
   String thisUserHasNotWrittenItsBiographyYet();
@@ -747,4 +761,5 @@
   String yourLanguage();
 
   String yourPreferences();
+
 }

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties	2011-10-24 23:06:49 UTC (rev 1572)
@@ -376,10 +376,11 @@
 reasonsNotToUseANonCommercialLicense = Reasons not to use a non commercial license.
 selectOtherKindOfLicenses = Select other kind of licenses:
 selectLicense = Select license
+signInOrCreateAnAccountToAccessToYourInbox = Sign in or create an account to access to your inbox
+seeTheArchiveOfOldConversationsInDevelopmentWithBrackets = See the archive of old conversations (in development)
+inDevelopmentWithBrackets =  (in development)
 thisUserDoesNotHaveAHomepage = This user does not have a homepage
-notPublicable = Not Publicable
-
-
-
-
-
+notPublishable = Not Publishable
+thisPageIsNotPublishable = This page is not publishable
+welcomeToTheParamPublicChatRoom = Welcome to the [%s] public chat room
+nExternalUser = [%d] external user

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties	2011-10-24 23:06:49 UTC (rev 1572)
@@ -374,4 +374,12 @@
 thisIsNotAppropriateForFreeCulturalWorks = Esto no es apropiado para trabajos culturales.
 reasonsNotToUseANonCommercialLicense = Razones para no usar una licencia no-comercial
 selectOtherKindOfLicenses = Elige otro tipo de licencias:
-selectLicense = Elige una licencia
\ No newline at end of file
+selectLicense = Elige una licencia
+signInOrCreateAnAccountToAccessToYourInbox = Entra o create una cuenta para acceder a tu buzón
+seeTheArchiveOfOldConversationsInDevelopmentWithBrackets = Ver el archivo de conversaciones anteriores (en desarrollo)
+inDevelopmentWithBrackets =  (en desarrollo)
+thisUserDoesNotHaveAHomepage = Estæ usuaria/o no tiene página inicial
+notPublishable = No publicable
+thisPageIsNotPublishable = Esta página no es pública
+welcomeToTheParamPublicChatRoom = Bienvenido/a a la sala de chat pública de [%s]
+nExternalUser = [%d] usuarios/as esternos/as

Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/WriteToBuddyHeaderButton.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/WriteToBuddyHeaderButton.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/WriteToBuddyHeaderButton.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -51,6 +51,7 @@
         }
       }
     });
+    writeToAction.setEnabled(false);
     entityHeader.addAction(button);
     stateManager.onStateChanged(true, new StateChangedHandler() {
       @Override

Modified: trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -40,6 +40,7 @@
   private final EventBus eventBus;
   private final Provider<NewGroup> newGroup;
   private final Provider<Register> register;
+  private final Session session;
   private final Provider<SignIn> signIn;
   private final Provider<SubtitlesManager> subProvider;
   private final Provider<I18nTranslator> translator;
@@ -49,6 +50,7 @@
       final Provider<SignIn> signIn, final Provider<Register> register,
       final Provider<NewGroup> newGroup, final Provider<AboutKuneDialog> aboutKuneDialog,
       final Provider<I18nTranslator> translator, final Provider<SubtitlesManager> subProvider) {
+    this.session = session;
     this.eventBus = eventBus;
     this.signIn = signIn;
     this.register = register;
@@ -101,7 +103,9 @@
       // FIXME, something to come back
       @Override
       public void onHistoryToken(final String token) {
-        translator.get().show();
+        if (session.getInitData().isTranslatorEnabled()) {
+          translator.get().show();
+        }
       }
     });
     put(SiteTokens.SUBTITLES, new HistoryTokenCallback() {

Modified: trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeader.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeader.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeader.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -29,9 +29,4 @@
 
   void addWidget(IsWidget widget);
 
-  /**
-   * Reload the logo from the group reloaded from the server
-   */
-  void reloadGroupLogoImage();
-
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -19,11 +19,10 @@
  */
 package cc.kune.core.client.ws.entheader;
 
-import java.util.Date;
-
 import cc.kune.common.client.actions.ui.ActionFlowPanel;
 import cc.kune.common.client.actions.ui.bind.GuiProvider;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.utils.UrlParam;
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.services.FileDownloadUtils;
 import cc.kune.core.client.ws.entheader.EntityHeaderPresenter.EntityHeaderView;
@@ -86,12 +85,6 @@
     return mainPanel;
   }
 
-  @Override
-  public void reloadImage(final GroupDTO group) {
-    entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(group.getStateToken())
-        + "&nocache=" + new Date().getTime());
-  }
-
   @Deprecated
   public void setFullLogo(final StateToken stateToken, final boolean clipped) {
     mainPanel.clear();
@@ -113,8 +106,9 @@
   }
 
   @Override
-  public void setLogoImage(final GroupDTO group) {
-    entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(group.getStateToken()));
+  public void setLogoImage(final GroupDTO group, final boolean noCache) {
+    entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(group.getStateToken())
+        + (noCache ? UrlParam.noCacheStringSuffix() : ""));
   }
 
   @Override
@@ -137,6 +131,7 @@
     entityTextLogo.setOnlineStatusGroup(group);
   }
 
+  @Override
   public void setOnlineStatusVisible(final boolean visible) {
     entityTextLogo.setOnlineStatusVisible(visible);
   }

Modified: trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -49,11 +49,9 @@
 
     void addWidget(IsWidget widget);
 
-    void reloadImage(GroupDTO group);
-
     void setLargeFont();
 
-    void setLogoImage(GroupDTO group);
+    void setLogoImage(GroupDTO group, boolean noCache);
 
     void setLogoImageVisible(boolean visible);
 
@@ -72,24 +70,22 @@
 
   private static final int LARGE_NAME_LIMIT = 17;
   private static final int MEDIUM_NAME_LIMIT = 80;
-  private final Session session;
 
   @Inject
   public EntityHeaderPresenter(final EventBus eventBus, final EntityHeaderView view,
       final EntityHeaderProxy proxy, final StateManager stateManager, final Session session) {
     super(eventBus, view, proxy);
-    this.session = session;
     stateManager.onGroupChanged(true, new GroupChangedHandler() {
       @Override
       public void onGroupChanged(final GroupChangedEvent event) {
-        setGroupLogo(session.getCurrentState().getGroup());
+        setGroupLogo(session.getCurrentState().getGroup(), false);
       }
     });
     eventBus.addHandler(CurrentEntityChangedEvent.getType(), new CurrentEntityChangedHandler() {
       @Override
       public void onCurrentLogoChanged(final CurrentEntityChangedEvent event) {
-        setGroupLogo(session.getCurrentState().getGroup());
-        reloadGroupLogoImage();
+        final GroupDTO group = session.getCurrentState().getGroup();
+        setGroupLogo(group, true);
       }
     });
   }
@@ -105,19 +101,14 @@
   }
 
   @Override
-  public void reloadGroupLogoImage() {
-    getView().reloadImage(session.getCurrentState().getGroup());
-  }
-
-  @Override
   protected void revealInParent() {
     RevealRootContentEvent.fire(this, this);
   }
 
-  void setGroupLogo(final GroupDTO group) {
+  void setGroupLogo(final GroupDTO group, final boolean noCache) {
     setLogoText(group.getLongName());
     if (group.hasLogo()) {
-      getView().setLogoImage(group);
+      getView().setLogoImage(group, noCache);
       getView().setLogoImageVisible(true);
     } else {
       if (group.isPersonal()) {

Modified: trunk/src/main/java/cc/kune/core/server/InitData.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/InitData.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/server/InitData.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -63,6 +63,7 @@
   private String siteShortName;
   private String siteUrl;
   private String[] timezones;
+  private boolean translatorEnabled;
   private UserInfo userInfo;
   private List<ToolSimple> userTools;
 
@@ -195,6 +196,10 @@
     return feedbackEnabled;
   }
 
+  public boolean isTranslatorEnabled() {
+    return translatorEnabled;
+  }
+
   public void setAviEmbedObject(final String aviEmbedObject) {
     this.aviEmbedObject = aviEmbedObject;
   }
@@ -316,6 +321,10 @@
     this.timezones = timezones;
   }
 
+  public void setTranslatorEnabled(final boolean translatorEnabled) {
+    this.translatorEnabled = translatorEnabled;
+  }
+
   public void setUserInfo(final UserInfo currentUserInfo) {
     this.userInfo = currentUserInfo;
   }

Modified: trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -56,6 +56,7 @@
   String SITE_URL = "kune.siteurl";
   String SITE_USER_AVAILABLE_TOOLS = "kune.tools.userSiteAvailableTools";
   String SITE_USER_REGIST_ENABLED_TOOLS = "kune.tools.userRegisEnabledTools";
+  String UI_TRANSLATOR_ENABLED = "kune.ui-translator.enabled";
   String UPLOAD_DELAY_FOR_TEST = "kune.upload.delayfortest";
   String UPLOAD_GALLERY_PERMITTED_EXTS = "kune.upload.gallerypermittedextensions";
   String UPLOAD_LOCATION = "kune.upload.location";

Modified: trunk/src/main/java/cc/kune/core/server/utils/UrlUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/utils/UrlUtils.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/server/utils/UrlUtils.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -21,6 +21,7 @@
 
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Date;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -29,6 +30,11 @@
 
   private static final Log LOG = LogFactory.getLog(UrlUtils.class);
 
+  public static String noCacheStringSuffix() {
+    final String noCache = "&nocache=" + new Date().getTime();
+    return noCache;
+  }
+
   public static URL of(final String urlString) {
     URL url = null;
     try {

Modified: trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -55,6 +55,7 @@
   private String siteShortName;
   private String siteUrl;
   private String[] timezones;
+  private boolean translatorEnabled;
   private UserInfoDTO userInfo;
   private List<ToolSimpleDTO> userTools;
 
@@ -190,6 +191,10 @@
     return feedbackEnabled;
   }
 
+  public boolean isTranslatorEnabled() {
+    return translatorEnabled;
+  }
+
   public void setAviEmbedObject(final String aviEmbedObject) {
     this.aviEmbedObject = aviEmbedObject;
   }
@@ -307,6 +312,10 @@
     this.timezones = timezones;
   }
 
+  public void setTranslatorEnabled(final boolean translatorEnabled) {
+    this.translatorEnabled = translatorEnabled;
+  }
+
   public void setUserInfo(final UserInfoDTO currentUser) {
     this.userInfo = currentUser;
   }

Modified: trunk/src/main/java/cc/kune/domain/I18nTranslation.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/I18nTranslation.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/domain/I18nTranslation.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -121,17 +121,8 @@
   }
 
   public I18nTranslation cloneForNewLanguage() {
-    final I18nTranslation clone = new I18nTranslation();
-    clone.type = type;
-    clone.trKey = null;
-    clone.tableName = tableName;
-    clone.itemId = itemId;
-    clone.facet = facet;
-    clone.language = null;
-    clone.pluralizationIndex = pluralizationIndex;
-    clone.text = null;
-    clone.parent = this;
-    return clone;
+    return new I18nTranslation(facet, itemId, pluralizationIndex, tableName, null, null, type, null,
+        this, null);
   }
 
   public String getFacet() {

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -107,7 +107,9 @@
         uo.get();
 
         // i18n
-        transAction.get();
+        if (event.getInitData().isTranslatorEnabled()) {
+          transAction.get();
+        }
         gtranslator.get().add(toTrans);
 
         // Feedback

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -20,6 +20,7 @@
 package cc.kune.pspace.client;
 
 import cc.kune.common.client.utils.TextUtils;
+import cc.kune.common.client.utils.UrlParam;
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.services.FileDownloadUtils;
 import cc.kune.core.client.state.GroupChangedEvent;
@@ -29,8 +30,11 @@
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.GroupDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.logo.CurrentEntityChangedEvent;
+import cc.kune.gspace.client.options.logo.CurrentEntityChangedEvent.CurrentEntityChangedHandler;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
@@ -73,29 +77,35 @@
   @Inject
   public PSpaceInDevelopment(final StateManager stateManager, final CoreResources images,
       final Session session, final Provider<FileDownloadUtils> downloadProvider,
-      final I18nTranslationService i18n) {
+      final I18nTranslationService i18n, final EventBus eventBus) {
     this.images = images;
     this.downloadProvider = downloadProvider;
     initWidget(uiBinder.createAndBindUi(this));
     stateManager.onGroupChanged(true, new GroupChangedHandler() {
       @Override
       public void onGroupChanged(final GroupChangedEvent event) {
-        setGroupLogo(session.getCurrentState().getGroup());
+        setGroupLogo(session.getCurrentState().getGroup(), false);
       }
     });
     inDevel.setText(i18n.t("Right now, the public web space of this group, it's under construction"));
     inDevelSupport.getElement().setInnerHTML(
         i18n.t("[%s] the development",
             TextUtils.generateHtmlLink("http://kune.ourproject.org/join/", i18n.t("Please support"))));
+    eventBus.addHandler(CurrentEntityChangedEvent.getType(), new CurrentEntityChangedHandler() {
+      @Override
+      public void onCurrentLogoChanged(final CurrentEntityChangedEvent event) {
+        final GroupDTO group = session.getCurrentState().getGroup();
+        setGroupLogo(group, true);
+      }
+    });
   }
 
-  void setGroupLogo(final GroupDTO group) {
+  void setGroupLogo(final GroupDTO group, final boolean noCache) {
+    setLogoText(group.getLongName());
     if (group.hasLogo()) {
-      setLogoText(group.getLongName());
-      setLogoImage(group.getStateToken());
+      setLogoImage(group.getStateToken(), noCache);
       setLogoImageVisible(true);
     } else {
-      setLogoText(group.getLongName());
       if (group.isPersonal()) {
         showDefUserLogo();
         setLogoImageVisible(true);
@@ -105,8 +115,9 @@
     }
   }
 
-  private void setLogoImage(final StateToken stateToken) {
-    entityLogo.setUrl(downloadProvider.get().getLogoImageUrl(stateToken));
+  private void setLogoImage(final StateToken stateToken, final boolean noCache) {
+    entityLogo.setUrl(downloadProvider.get().getLogoImageUrl(stateToken)
+        + (noCache ? UrlParam.noCacheStringSuffix() : ""));
   }
 
   private void setLogoImageVisible(final boolean visible) {

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.ui.xml	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpaceInDevelopment.ui.xml	2011-10-24 23:06:49 UTC (rev 1572)
@@ -12,6 +12,10 @@
       float: left;
     }
 
+    .entityLogo img {
+      float: left;
+    }
+
     .entityName {
       font-size: 34px;
       color: #912312;

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -102,8 +102,8 @@
 
   private void setContentNotPublicable() {
     getView().getTitle().setText(
-        i18n.t("Not Publicable") + i18n.tWithNT(TextUtils.IN_DEVELOPMENT_P, "with Brackets"));
-    getView().getDescription().setText(i18n.t("This page is not publicable"));
+        i18n.t("Not Publishable") + i18n.tWithNT(TextUtils.IN_DEVELOPMENT_P, "with Brackets"));
+    getView().getDescription().setText(i18n.t("This page is not publishable"));
     getView().setContentGotoPublicUrl("about:blank");
   }
 

Modified: trunk/src/main/resources/kune.properties
===================================================================
--- trunk/src/main/resources/kune.properties	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/resources/kune.properties	2011-10-24 23:06:49 UTC (rev 1572)
@@ -48,6 +48,10 @@
 # List of participants to give feedback, comma-separated
 kune.feedback.to = admin
 
+# Translation
+# Currently, we only manage the translations of the proper kune sofware from our demo, so in other kune sites we disable the translator
+kune.ui-translator.enabled = false
+
 ### Other params
 
 # Reserved words to avoid it's use in the client side for user and group names (see client tokens used in SiteTokens)

Modified: trunk/src/main/webapp/ws.html
===================================================================
--- trunk/src/main/webapp/ws.html	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/main/webapp/ws.html	2011-10-24 23:06:49 UTC (rev 1572)
@@ -4,6 +4,9 @@
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <title>Kune</title>
 
+<!-- Use this if you want to force some language as default
+<meta name="gwt:property" content="locale=es" />
+-->
 <script type="text/javascript" language="javascript"
     src="ws/ws.nocache.js"></script>
 <!--

Modified: trunk/src/test/java/cc/kune/core/server/manager/I18nManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/I18nManagerDefaultTest.java	2011-10-24 15:49:25 UTC (rev 1571)
+++ trunk/src/test/java/cc/kune/core/server/manager/I18nManagerDefaultTest.java	2011-10-24 23:06:49 UTC (rev 1572)
@@ -62,11 +62,6 @@
   }
 
   @Test
-  public void emptyI18n() {
-    new I18nTranslation();
-  }
-
-  @Test
   public void getLexiconList() {
     assertTrue(translationManager.getTranslatedLexicon("en").size() > 0);
     assertTrue(translationManager.getUntranslatedLexicon("en").size() == 0);




More information about the kune-commits mailing list