[kune-commits] r1604 - in trunk/src/main/java/cc/kune: client common/client/actions/gwtui common/client/notify common/client/ui common/client/ui/dialogs/tabbed common/public core/client core/client/actions/xml core/client/cnt core/client/i18n core/client/resources core/client/sitebar core/client/sitebar/search core/public core/server/i18n core/shared/dto gspace/client gspace/client/options/logo gspace/client/options/style gspace/client/tool gspace/client/tool/selector gspace/client/viewers

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Sat Nov 12 16:47:35 CET 2011


Author: vjrj_
Date: 2011-11-12 16:47:35 +0100 (Sat, 12 Nov 2011)
New Revision: 1604

Added:
   trunk/src/main/java/cc/kune/common/public/kune-common-rtl.css
   trunk/src/main/java/cc/kune/core/client/i18n/I18nStyles.java
   trunk/src/main/java/cc/kune/core/public/ws-rtl.css
Modified:
   trunk/src/main/java/cc/kune/client/KuneGinjector.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtBaseMenuItem.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
   trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java
   trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/TabTitleGenerator.java
   trunk/src/main/java/cc/kune/common/public/kune-common.css
   trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
   trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java
   trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java
   trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java
   trunk/src/main/java/cc/kune/core/client/cnt/FoldableContentPanel.java
   trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java
   trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java
   trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java
   trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java
   trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java
   trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptLogoPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/style/EntityOptStylePanel.java
   trunk/src/main/java/cc/kune/gspace/client/tool/AbstractClientTool.java
   trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
   trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.java
   trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
Log:
NEW - # 156: Give RTL support (for Arabic and other similar languages) 
http://kune.ourproject.org/issues/ticket/156

Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -26,7 +26,6 @@
 import cc.kune.chat.client.ChatGinModule;
 import cc.kune.chat.client.ChatGinjector;
 import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
-import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
 import cc.kune.common.client.actions.ui.bind.GuiProvider;
 import cc.kune.common.client.log.EventBusWithLogging;
 import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
@@ -117,7 +116,7 @@
 
   GwtGuiProvider getGwtGuiProvider();
 
-  GxtGuiProvider getGxtGuiProvider();
+  // GxtGuiProvider getGxtGuiProvider();
 
   HSpaceParts getHSpaceParts();
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -191,7 +191,7 @@
   @Override
   public void setIconResource(final ImageResource icon) {
     iconLabel.setRightIconResource(icon);
-    iconLabel.addRightIconStyle("k-fl");
+    // iconLabel.addRightIconStyle("k-fl");
     layout();
   }
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtBaseMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtBaseMenuItem.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtBaseMenuItem.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -24,24 +24,24 @@
 
 public class GwtBaseMenuItem extends MenuItem {
 
-    private static Command dummyCommand() {
-        return new Command() {
-            @Override
-            public void execute() {
-            }
-        };
-    }
+  private static Command dummyCommand() {
+    return new Command() {
+      @Override
+      public void execute() {
+      }
+    };
+  }
 
-    public GwtBaseMenuItem() {
-        super("", dummyCommand());
-    }
+  public GwtBaseMenuItem() {
+    super("", dummyCommand());
+  }
 
-    public GwtBaseMenuItem(final String text) {
-        super(text, dummyCommand());
-    }
+  public GwtBaseMenuItem(final String text) {
+    super(text, dummyCommand());
+  }
 
-    public GwtBaseMenuItem(final String text, final boolean asHtml) {
-        super(text, asHtml, dummyCommand());
-    }
+  public GwtBaseMenuItem(final String text, final boolean asHtml) {
+    super(text, asHtml, dummyCommand());
+  }
 
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -61,7 +61,7 @@
       final ImageResource rightIcon = ((MenuDescriptor) descriptor).getRightIcon();
       if (rightIcon != null) {
         iconLabel.setRightIconResource(rightIcon);
-        iconLabel.addRightIconStyle("k-fr");
+        // iconLabel.addRightIconStyle("k-fr");
       }
       button.addClickHandler(new ClickHandler() {
         @Override

Modified: trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -82,6 +82,10 @@
     eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, message, closeable));
   }
 
+  public static void info(final String title, final String message) {
+    eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, title, message));
+  }
+
   public static void info(final String title, final String message, final String id,
       final boolean closeable) {
     sendEventImpl(title, message, id, closeable, NotifyLevel.info);

Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -132,6 +132,18 @@
     return flow.remove(w);
   }
 
+  // @Deprecated
+  // private void setDirection(final Direction dir) {
+  // setIconRTL(iconLeft, dir);
+  // setIconRTL(iconRight, dir);
+  // label.addStyleName(dir.equals(Direction.LTR) ? "k-fr" : "k-fl");
+  // }
+  //
+  @Deprecated
+  private void setIconRTL(final Widget widget, final Direction direction) {
+    widget.addStyleName(direction.equals(Direction.LTR) ? "k-fl" : "k-fr");
+  }
+
   public void setId(final String id) {
     self.ensureDebugId(id);
   }
@@ -153,6 +165,8 @@
   private void setLeftIconResourceImpl(final ImageResource res) {
     iconLeft.setResource(res);
     iconLeft.addStyleName("k-iconlabel-left");
+    // setting floats again, because with setResource we lost them
+    setIconRTL(iconLeft, getTextDirection());
     iconLeft.setVisible(true);
   }
 
@@ -176,6 +190,8 @@
   public void setRightIconResource(final ImageResource res) {
     iconRight.setResource(res);
     iconRight.addStyleName("k-iconlabel-right");
+    // setting floats again, because with setResource we lost them
+    setIconRTL(iconRight, getTextDirection());
     iconRight.setVisible(true);
   }
 
@@ -193,11 +209,13 @@
 
   @Override
   public void setText(final String text) {
-    label.setText(text);
+    // setDirection(Direction.LTR);
+    label.setText(text, Direction.LTR);
   }
 
   @Override
   public void setText(final String text, final Direction dir) {
+    // setDirection(dir);
     label.setText(text, dir);
   }
 

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -282,7 +282,7 @@
   public void setTitle(final String title) {
     this.title = title;
     if (dialog != null) {
-      dialog.getTitleText().setText(title);
+      dialog.getTitleText().setText(title, direction);
     }
   }
 

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/TabTitleGenerator.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/TabTitleGenerator.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/TabTitleGenerator.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -4,6 +4,7 @@
 import cc.kune.common.client.ui.IconLabel;
 import cc.kune.common.client.utils.TextUtils;
 
+import com.google.gwt.i18n.client.HasDirection.Direction;
 import com.google.gwt.resources.client.ImageResource;
 
 public class TabTitleGenerator {
@@ -23,8 +24,9 @@
     return tabTitle;
   }
 
-  public static void setText(final IconLabel tabTitle, final String title, final int maxLength) {
-    tabTitle.setText(format(title, maxLength));
+  public static void setText(final IconLabel tabTitle, final String title, final int maxLength,
+      final Direction direction) {
+    tabTitle.setText(format(title, maxLength), direction);
     setTooltip(title, maxLength, tabTitle);
   }
 

Added: trunk/src/main/java/cc/kune/common/public/kune-common-rtl.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common-rtl.css	                        (rev 0)
+++ trunk/src/main/java/cc/kune/common/public/kune-common-rtl.css	2011-11-12 15:47:35 UTC (rev 1604)
@@ -0,0 +1,33 @@
+/* Here the styles of cc.kune.commom (reused by other projects like gadgets and so on) */
+.k-iconlabel-text {
+  float: left;
+}
+
+.k-iconlabel-left {
+  float: right;
+}
+
+.k-iconlabel-right {
+  float: right;
+}
+
+.gwt-MenuBar .gwt-MenuItem {
+  float: right;
+}
+
+.k-menuimtem-title {
+  float: right;
+}
+
+.k-tool-panel {
+  text-align: rigth;
+}
+
+.entityTools {
+  text-align: right;
+}
+
+.docHeader {
+  text-align: right;
+  padding-right: 10px;
+}
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-11-12 15:47:35 UTC (rev 1604)
@@ -473,9 +473,18 @@
   vertical-align: top;
   padding-left: 3px;
   padding-right: 3px;
-  /* float: left; */
+  float: right;
 }
 
+.k-iconlabel-left {
+  float: left;
+}
+
+.k-iconlabel-right {
+  float: left;
+ /*   margin-left: 5px; */
+}
+
 .k-menuimtem-title {
   color: white;
   font-size: 15px;
@@ -489,14 +498,7 @@
   margin-top: 4px;
 }
 
-.k-iconlabel-left {
-  float: left;
-}
 
-.k-iconlabel-right { /* float: left; */ /*   margin-left: 5px; */
-
-}
-
 .gwt-MenuBar-vertical .subMenuIcon-selected {
   background: none repeat scroll 0 0 #808080;
 }

Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -20,7 +20,6 @@
 package cc.kune.core.client;
 
 import cc.kune.common.client.ExtendedGinModule;
-import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
 import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
 import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider;
 import cc.kune.common.client.actions.ui.bind.GuiProvider;
@@ -195,7 +194,7 @@
     // UI
     bind(GuiProvider.class).to(DefaultGuiProvider.class).in(Singleton.class);
     s(GxtGuiProvider.class);
-    s(GwtGuiProvider.class);
+    // s(GwtGuiProvider.class);
 
     bind(MaskWidgetView.class).to(MaskWidget.class).in(Singleton.class);
 

Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -21,11 +21,14 @@
 
 import cc.kune.common.client.actions.Action;
 import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
 import cc.kune.core.client.rpcservices.ContentServiceAsync;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
 
 import com.google.inject.Provider;
 
@@ -33,12 +36,15 @@
 
   private final Provider<ContentServiceAsync> contentService;
   private final String gadgetName;
+  private final I18nTranslationService i18n;
   private final Session session;
 
   public AddGadgetAction(final Provider<ContentServiceAsync> contentService, final Session session,
-      final AccessRolDTO rol, final boolean authNeeded, final String gadgetName, final String iconUrl) {
+      final I18nTranslationService i18n, final AccessRolDTO rol, final boolean authNeeded,
+      final String gadgetName, final String iconUrl) {
     super(rol, authNeeded);
     this.contentService = contentService;
+    this.i18n = i18n;
     this.gadgetName = gadgetName;
     this.session = session;
     putValue(Action.SMALL_ICON, iconUrl);
@@ -50,6 +56,8 @@
         gadgetName, new AsyncCallbackSimple<Void>() {
           @Override
           public void onSuccess(final Void result) {
+            NotifyUser.info(i18n.t("'[%s]' created succesfully", gadgetName),
+                i18n.t(CoreMessages.GADGETS_EXPERIMENTAL));
           }
         });
   }

Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -23,6 +23,7 @@
 import cc.kune.common.client.actions.ActionEvent;
 import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
 import cc.kune.core.client.rpcservices.ContentServiceAsync;
 import cc.kune.core.client.state.Session;
@@ -70,7 +71,8 @@
         gadgetName, typeId, i18n.t(title), i18n.t(body), new AsyncCallbackSimple<StateContentDTO>() {
           @Override
           public void onSuccess(final StateContentDTO result) {
-            NotifyUser.info(i18n.t("[%s] created succesfully", title));
+            NotifyUser.info(i18n.t("'[%s]' created succesfully", title),
+                i18n.t(CoreMessages.GADGETS_EXPERIMENTAL));
             stateManager.setRetrievedStateAndGo(result);
             contentViewer.blinkTitle();
           }

Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -171,7 +171,7 @@
           if (origTypeId.equals(destTypeId)) {
             // We are adding a gadget in a doc (nor creating a gadget in a
             // container)
-            action = new AddGadgetAction(contentService, session,
+            action = new AddGadgetAction(contentService, session, i18n,
                 descrip.getRol().getRolRequired(), descrip.getRol().isAuthNeed(),
                 extension.getExtName(), extension.getIconUrl());
           } else {

Modified: trunk/src/main/java/cc/kune/core/client/cnt/FoldableContentPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/cnt/FoldableContentPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/cnt/FoldableContentPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -39,148 +39,154 @@
 @Deprecated
 public abstract class FoldableContentPanel extends AbstractContentPanel implements AbstractContentView {
 
-    private static final String DEF_CONTENT_MARGINS_STYLE = "kune-Margin-7-trbl";
-    private final I18nTranslationService i18n;
-    private final IconLabel messageLabel;
-    private final FlowPanel messagePanel;
+  private static final String DEF_CONTENT_MARGINS_STYLE = "kune-Margin-7-trbl";
+  private final I18nTranslationService i18n;
+  private final IconLabel messageLabel;
+  private final FlowPanel messagePanel;
 
-    public FoldableContentPanel(final GSpaceArmor ws, final I18nTranslationService i18n, final CoreResources res,
-            final WaveClientManager waveClientManager) {
-        super(ws);
-        this.i18n = i18n;
-        messageLabel = new IconLabel("");
-        messageLabel.setLeftIconResource(res.info());
-        messageLabel.addStyleName("k-preview-msg-lab");
-        messagePanel = new FlowPanel();
-        messagePanel.add(messageLabel);
-        messagePanel.addStyleName("k-preview-msg");
-        messagePanel.addStyleName("kune-Margin-7-b");
-    }
+  public FoldableContentPanel(final GSpaceArmor ws, final I18nTranslationService i18n,
+      final CoreResources res, final WaveClientManager waveClientManager) {
+    super(ws);
+    this.i18n = i18n;
+    messageLabel = new IconLabel("");
+    messageLabel.setLeftIconResource(res.info());
+    messageLabel.addStyleName("k-preview-msg-lab");
+    messagePanel = new FlowPanel();
+    messagePanel.add(messageLabel);
+    messagePanel.addStyleName("k-preview-msg");
+    messagePanel.addStyleName("kune-Margin-7-b");
+  }
 
-    private VerticalPanel createMessageVp(final boolean showMsg) {
-        final VerticalPanel vp = new VerticalPanel();
-        if (showMsg) {
-            setDefPreviewMsg();
-            vp.add(messagePanel);
-        }
-        return vp;
+  private VerticalPanel createMessageVp(final boolean showMsg) {
+    final VerticalPanel vp = new VerticalPanel();
+    if (showMsg) {
+      setDefPreviewMsg();
+      vp.add(messagePanel);
     }
+    return vp;
+  }
 
-    @Override
-    public void setContent(final String content, final boolean showPreviewMsg) {
-        final VerticalPanel vp = createMessageVp(showPreviewMsg);
-        final HTML html = new HTML(content);
-        vp.add(html);
-        setWidgetAsContent(vp, true);
-    }
+  @Override
+  public void setContent(final String content, final boolean showPreviewMsg) {
+    final VerticalPanel vp = createMessageVp(showPreviewMsg);
+    final HTML html = new HTML(content);
+    vp.add(html);
+    setWidgetAsContent(vp, true);
+  }
 
-    private void setContent(final Widget widget) {
-        setWidget(widget);
-        attach();
-    }
+  private void setContent(final Widget widget) {
+    setWidget(widget);
+    attach();
+  }
 
-    private void setDefPreviewMsg() {
-        messageLabel.setText(i18n.t("This is only a preview, download it to get the complete file"));
-    }
+  private void setDefPreviewMsg() {
+    messageLabel.setText(i18n.t("This is only a preview, download it to get the complete file"),
+        i18n.getDirection());
+  }
 
-    private void setDefStyle(final Widget widget) {
-        widget.setStyleName("kune-Content-Main");
-        widget.addStyleName(DEF_CONTENT_MARGINS_STYLE);
-    }
+  private void setDefStyle(final Widget widget) {
+    widget.setStyleName("kune-Content-Main");
+    widget.addStyleName(DEF_CONTENT_MARGINS_STYLE);
+  }
 
-    @Override
-    public void setEditableWaveContent(final WaveRef waveRef, final boolean isNewWave) { // NOPMD by vjrj on 27/04/11 8:40
-        // FIXME
-    }
+  @Override
+  public void setEditableWaveContent(final WaveRef waveRef, final boolean isNewWave) { // NOPMD
+                                                                                       // by
+                                                                                       // vjrj
+                                                                                       // on
+                                                                                       // 27/04/11
+                                                                                       // 8:40
+    // FIXME
+  }
 
-    // public void setWave(final String waveId, final Listener0 onLoaded) {
-    // final WaveWidget waveWidget = new
-    // WaveWidget("http://wave.google.com/a/wavesandbox.com/");
-    // waveWidget.setUIConfig("white", "black", "arial, sans", "10pt");
-    // waveWidget.setHeight("100%");
-    // waveWidget.addWaveLoadHandler(new WaveLoadHandler() {
-    // public void onWaveLoad(final WaveLoadEvent event) {
-    // Log.info("Wave '" + event.getWaveId() + "' loaded!");
-    // onLoaded.onEvent();
-    // }
-    // });
-    // waveWidget.loadWave(waveId);
-    // setWidgetAsContent(waveWidget, false);
-    // waveWidget.setToolbarVisible(true);
-    // waveWidget.setEditMode(false);
-    // }
+  // public void setWave(final String waveId, final Listener0 onLoaded) {
+  // final WaveWidget waveWidget = new
+  // WaveWidget("http://wave.google.com/a/wavesandbox.com/");
+  // waveWidget.setUIConfig("white", "black", "arial, sans", "10pt");
+  // waveWidget.setHeight("100%");
+  // waveWidget.addWaveLoadHandler(new WaveLoadHandler() {
+  // public void onWaveLoad(final WaveLoadEvent event) {
+  // Log.info("Wave '" + event.getWaveId() + "' loaded!");
+  // onLoaded.onEvent();
+  // }
+  // });
+  // waveWidget.loadWave(waveId);
+  // setWidgetAsContent(waveWidget, false);
+  // waveWidget.setToolbarVisible(true);
+  // waveWidget.setEditMode(false);
+  // }
 
-    @Override
-    public void setInfo(final String info) {
-        setLabel(info);
-    }
+  @Override
+  public void setInfo(final String info) {
+    setLabel(info);
+  }
 
-    @Override
-    public void setInfoMessage(final String text) {
-        final VerticalPanel vp = createMessageVp(true);
-        messageLabel.setText(text);
-        setWidgetAsContent(vp, true);
-    }
+  @Override
+  public void setInfoMessage(final String text) {
+    final VerticalPanel vp = createMessageVp(true);
+    messageLabel.setText(text, i18n.getDirection());
+    setWidgetAsContent(vp, true);
+  }
 
-    public void setLabel(final String text) {
-        final Label label = new Label(text);
-        setDefStyle(label);
-        setWidget(label);
-    }
+  public void setLabel(final String text) {
+    final Label label = new Label(text);
+    setDefStyle(label);
+    setWidget(label);
+  }
 
-    @Override
-    public void setNoPreview() {
-        final VerticalPanel vp = createMessageVp(true);
-        setNoPreviewLabelMsg();
-        setWidgetAsContent(vp, true);
-    }
+  @Override
+  public void setNoPreview() {
+    final VerticalPanel vp = createMessageVp(true);
+    setNoPreviewLabelMsg();
+    setWidgetAsContent(vp, true);
+  }
 
-    private void setNoPreviewLabelMsg() {
-        messageLabel.setText(i18n.t("Preview not available"));
-    }
+  private void setNoPreviewLabelMsg() {
+    messageLabel.setText(i18n.t("Preview not available"), i18n.getDirection());
+  }
 
-    @Override
-    public void setRawContent(final String content) {
-        final HTML html = new HTML(content);
-        setDefStyle(html);
-        setContent(html);
-    }
+  @Override
+  public void setRawContent(final String content) {
+    final HTML html = new HTML(content);
+    setDefStyle(html);
+    setContent(html);
+  }
 
-    @Override
-    public void setWidgetAsContent(final Widget widget, final boolean setDefMargins) {
-        if (setDefMargins) {
-            widget.addStyleName(DEF_CONTENT_MARGINS_STYLE);
-        }
-        setContent(widget);
+  @Override
+  public void setWidgetAsContent(final Widget widget, final boolean setDefMargins) {
+    if (setDefMargins) {
+      widget.addStyleName(DEF_CONTENT_MARGINS_STYLE);
     }
+    setContent(widget);
+  }
 
-    @Override
-    public void showImage(final String imageUrl, final String imageResizedUrl, final boolean showPreviewMsg) {
-        final VerticalPanel vp = createMessageVp(showPreviewMsg);
-        final Image imgOrig = new Image(imageUrl);
-        final Image imgResized = new Image(imageResizedUrl);
-        imgOrig.setTitle(i18n.t("Click to zoom out"));
-        imgResized.setTitle(i18n.t("Click to zoom in"));
-        setDefStyle(imgOrig);
-        setDefStyle(imgResized);
-        imgOrig.addStyleName("kune-pointer");
-        imgResized.addStyleName("kune-pointer");
-        imgResized.addClickHandler(new ClickHandler() {
-            @Override
-            public void onClick(final ClickEvent event) {
-                imgResized.removeFromParent();
-                vp.add(imgOrig);
-            }
-        });
-        imgOrig.addClickHandler(new ClickHandler() {
-            @Override
-            public void onClick(final ClickEvent event) {
-                imgOrig.removeFromParent();
-                vp.add(imgResized);
-            }
-        });
+  @Override
+  public void showImage(final String imageUrl, final String imageResizedUrl, final boolean showPreviewMsg) {
+    final VerticalPanel vp = createMessageVp(showPreviewMsg);
+    final Image imgOrig = new Image(imageUrl);
+    final Image imgResized = new Image(imageResizedUrl);
+    imgOrig.setTitle(i18n.t("Click to zoom out"));
+    imgResized.setTitle(i18n.t("Click to zoom in"));
+    setDefStyle(imgOrig);
+    setDefStyle(imgResized);
+    imgOrig.addStyleName("kune-pointer");
+    imgResized.addStyleName("kune-pointer");
+    imgResized.addClickHandler(new ClickHandler() {
+      @Override
+      public void onClick(final ClickEvent event) {
+        imgResized.removeFromParent();
+        vp.add(imgOrig);
+      }
+    });
+    imgOrig.addClickHandler(new ClickHandler() {
+      @Override
+      public void onClick(final ClickEvent event) {
+        imgOrig.removeFromParent();
         vp.add(imgResized);
-        setWidgetAsContent(vp, true);
-        Image.prefetch(imageUrl);
-    }
+      }
+    });
+    vp.add(imgResized);
+    setWidgetAsContent(vp, true);
+    Image.prefetch(imageUrl);
+  }
 }

Added: trunk/src/main/java/cc/kune/core/client/i18n/I18nStyles.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/I18nStyles.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/i18n/I18nStyles.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -0,0 +1,46 @@
+package cc.kune.core.client.i18n;
+
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.dom.client.HeadElement;
+import com.google.gwt.dom.client.LinkElement;
+
+/**
+ * 
+ * Some code from the StyleSheetLoader.java GWT's showcase
+ * 
+ */
+public class I18nStyles {
+
+  /**
+   * Convenience method for getting the document's head element.
+   * 
+   * 
+   * @return the document's head element
+   */
+  private static native HeadElement getHeadElement()
+  /*-{
+		return $doc.getElementsByTagName("head")[0];
+  }-*/;
+
+  /**
+   * Load a style sheet onto the page.
+   * 
+   * @param href
+   *          the url of the style sheet
+   */
+  private static void loadStyleSheet(final String href) {
+    final LinkElement linkElem = Document.get().createLinkElement();
+    linkElem.setRel("stylesheet");
+    linkElem.setType("text/css");
+    linkElem.setHref(href);
+    getHeadElement().appendChild(linkElem);
+  }
+
+  public static void setRTL(final boolean isRTL) {
+    if (isRTL) {
+      loadStyleSheet("ws/kune-common-rtl.css");
+      loadStyleSheet("ws/ws-rtl.css");
+    }
+  }
+
+}
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -105,6 +105,7 @@
               isCurrentLangRTL = currentLang.getDirection().equals(RTL);
               eventBus.fireEvent(new I18nReadyEvent());
             }
+            I18nStyles.setRTL(isCurrentLangRTL);
           }
         });
         session.onUserSignIn(true, new UserSignInHandler() {

Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -27,6 +27,7 @@
   public final static String ENT_LOGO_SELECTOR_PERSON_TITLE = "Avatar";
   public final static String FIELD_MUST_BE_BETWEEN_3_AND_15 = "The name must be between 3 and 15 lowercase Western characters and/or numbers";
   public final static String FIELD_MUST_BE_BETWEEN_3_AND_15_NO_CHARS = "The name must be between 3 and 15 lowercase characters.";
+  public final static String GADGETS_EXPERIMENTAL = "Nowadays the gadgets (maps, polls, etc) are experimental. In some browsers you might experience problems with certain gadgets";
   public final static String GROUP_OPTIONS_DIALOG_TITLE = "Group options";
   public final static String GROUPNAME_RESTRICTED = "This group name can not be used. Please try with a different name";
   public final static String INCORRECT_NICKNAME_EMAIL_OR_PASSWORD = "The username/password is incorrect";

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -57,7 +57,7 @@
     dialog = new BasicTopDialog.Builder(ERROR_LOGGER_ID, true, true, i18n.getDirection()).title(
         i18n.t("Errors info")).autoscroll(true).firstButtonTitle(i18n.t("Ok")).firstButtonId(
         ERROR_LOGGER_BUTTON_ID).tabIndexStart(1).width("400px").height("400px").build();
-    dialog.getTitleText().setText(i18n.t("Info about errors"));
+    dialog.getTitleText().setText(i18n.t("Info about errors"), i18n.getDirection());
     final InlineLabel subTitle = new InlineLabel(
         i18n.t("Please copy/paste this info to report problems"));
     dialog.getInnerPanel().add(subTitle);
@@ -76,7 +76,7 @@
         final NotifyLevel level = event.getLevel();
         final IconLabel iconMessage = new IconLabel();
         iconMessage.setLeftIconResource(UserMessageImagesUtil.getIcon(level));
-        iconMessage.setText(event.getMessage());
+        iconMessage.setText(event.getMessage(), i18n.getDirection());
         iconMessage.setWordWrap(true);
         panel.insert(iconMessage, 0);
       }

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -71,7 +71,7 @@
   private void create() {
     dialog.getTitleText().setText(
         i18n.t(searchOnlyUsers ? "Type the name of the user and select him/her:"
-            : "Type the name of the user or group and select it:"));
+            : "Type the name of the user or group and select it:"), i18n.getDirection());
     final MultivalueSuggestBox multivalueSBox = SearchBoxFactory.create(i18n, searchOnlyUsers, callback);
     suggestBox = multivalueSBox.getSuggestBox();
     searchTextBox = suggestBox.getTextBox();

Added: trunk/src/main/java/cc/kune/core/public/ws-rtl.css
===================================================================

Modified: trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -26,24 +26,25 @@
 import cc.kune.domain.I18nTranslation;
 
 import com.google.inject.Inject;
+import com.google.inject.Provider;
 import com.google.inject.Singleton;
 
 @Singleton
 public class I18nTranslationServiceDefault extends I18nTranslationService {
 
   private final I18nTranslationManager translationManager;
-  private final UserSessionManager userSessionManager;
+  private final Provider<UserSessionManager> userSessionManager;
 
   @Inject
   public I18nTranslationServiceDefault(final I18nTranslationManager translationManager,
-      final UserSessionManager userSessionManager) {
+      final Provider<UserSessionManager> userSessionManager) {
     this.translationManager = translationManager;
     this.userSessionManager = userSessionManager;
   }
 
   @Override
   public boolean isRTL() {
-    return userSessionManager.isUserLoggedIn() ? userSessionManager.getUser().getLanguage().getDirection().equals(
+    return userSessionManager.get().isUserLoggedIn() ? userSessionManager.get().getUser().getLanguage().getDirection().equals(
         RTL)
         : false;
   }
@@ -77,8 +78,8 @@
   @Override
   public String tWithNT(final String text, final String noteForTranslators) {
     String language;
-    if (userSessionManager.isUserLoggedIn()) {
-      language = userSessionManager.getUser().getLanguage().getCode();
+    if (userSessionManager.get().isUserLoggedIn()) {
+      language = userSessionManager.get().getUser().getLanguage().getCode();
     } else {
       language = I18nTranslation.DEFAULT_LANG;
     }

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -26,80 +26,84 @@
 import com.google.gwt.user.client.rpc.IsSerializable;
 
 public class ContainerDTO implements IsSerializable {
-    private Long id;
-    private String name;
-    private String typeId;
-    private StateToken stateToken;
-    private Long parentFolderId;
-    private ContainerSimpleDTO[] absolutePath;
-    private List<ContainerSimpleDTO> childs;
-    private List<ContentSimpleDTO> contents;
+  private ContainerSimpleDTO[] absolutePath;
+  private List<ContainerSimpleDTO> childs;
+  private List<ContentSimpleDTO> contents;
+  private Long id;
+  private String name;
+  private Long parentFolderId;
+  private StateToken stateToken;
+  private String typeId;
 
-    public ContainerDTO() {
-    }
+  public ContainerDTO() {
+  }
 
-    public ContainerSimpleDTO[] getAbsolutePath() {
-        return absolutePath;
-    }
+  public ContainerSimpleDTO[] getAbsolutePath() {
+    return absolutePath;
+  }
 
-    public List<ContainerSimpleDTO> getChilds() {
-        return childs;
-    }
+  public List<ContainerSimpleDTO> getChilds() {
+    return childs;
+  }
 
-    public List<ContentSimpleDTO> getContents() {
-        return contents;
-    }
+  public List<ContentSimpleDTO> getContents() {
+    return contents;
+  }
 
-    public Long getId() {
-        return id;
-    }
+  public Long getId() {
+    return id;
+  }
 
-    public String getName() {
-        return name;
-    }
+  public String getName() {
+    return name;
+  }
 
-    public Long getParentFolderId() {
-        return parentFolderId;
-    }
+  public Long getParentFolderId() {
+    return parentFolderId;
+  }
 
-    public StateToken getStateToken() {
-        return stateToken;
-    }
+  public StateToken getStateToken() {
+    return stateToken;
+  }
 
-    public String getTypeId() {
-        return typeId;
-    }
+  public String getTypeId() {
+    return typeId;
+  }
 
-    public void setAbsolutePath(final ContainerSimpleDTO[] absolutePath) {
-        this.absolutePath = absolutePath;
-    }
+  public boolean isRoot() {
+    return parentFolderId == null;
+  }
 
-    public void setChilds(final List<ContainerSimpleDTO> childs) {
-        this.childs = childs;
-    }
+  public void setAbsolutePath(final ContainerSimpleDTO[] absolutePath) {
+    this.absolutePath = absolutePath;
+  }
 
-    public void setContents(final List<ContentSimpleDTO> contents) {
-        this.contents = contents;
-    }
+  public void setChilds(final List<ContainerSimpleDTO> childs) {
+    this.childs = childs;
+  }
 
-    public void setId(final Long id) {
-        this.id = id;
-    }
+  public void setContents(final List<ContentSimpleDTO> contents) {
+    this.contents = contents;
+  }
 
-    public void setName(final String name) {
-        this.name = name;
-    }
+  public void setId(final Long id) {
+    this.id = id;
+  }
 
-    public void setParentFolderId(final Long parentFolderId) {
-        this.parentFolderId = parentFolderId;
-    }
+  public void setName(final String name) {
+    this.name = name;
+  }
 
-    public void setStateToken(final StateToken stateToken) {
-        this.stateToken = stateToken;
-    }
+  public void setParentFolderId(final Long parentFolderId) {
+    this.parentFolderId = parentFolderId;
+  }
 
-    public void setTypeId(final String typeId) {
-        this.typeId = typeId;
-    }
+  public void setStateToken(final StateToken stateToken) {
+    this.stateToken = stateToken;
+  }
 
+  public void setTypeId(final String typeId) {
+    this.typeId = typeId;
+  }
+
 }

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -26,100 +26,101 @@
 
 public class StateContainerDTO extends StateAbstractDTO implements IsSerializable, HasContent {
 
-    private AccessListsDTO accessLists;
-    private ContainerDTO container;
-    private AccessRights containerRights;
-    private I18nLanguageDTO language;
-    private LicenseDTO license;
-    private ContainerDTO rootContainer;
-    private TagCloudResult tagCloudResult;
-    private String toolName;
-    private String typeId;
+  private AccessListsDTO accessLists;
+  private ContainerDTO container;
+  private AccessRights containerRights;
+  private I18nLanguageDTO language;
+  private LicenseDTO license;
+  private ContainerDTO rootContainer;
+  private TagCloudResult tagCloudResult;
+  private String toolName;
+  private String typeId;
 
-    public StateContainerDTO() {
-    }
+  public StateContainerDTO() {
+  }
 
-    public AccessListsDTO getAccessLists() {
-        return accessLists;
-    }
+  public AccessListsDTO getAccessLists() {
+    return accessLists;
+  }
 
-    public ContainerDTO getContainer() {
-        return container;
-    }
+  @Override
+  public ContainerDTO getContainer() {
+    return container;
+  }
 
-    public AccessRights getContainerRights() {
-        return containerRights;
-    }
+  public AccessRights getContainerRights() {
+    return containerRights;
+  }
 
-    public I18nLanguageDTO getLanguage() {
-        return language;
-    }
+  public I18nLanguageDTO getLanguage() {
+    return language;
+  }
 
-    public LicenseDTO getLicense() {
-        return license;
-    }
+  public LicenseDTO getLicense() {
+    return license;
+  }
 
-    public ContainerDTO getRootContainer() {
-        return rootContainer;
-    }
+  public ContainerDTO getRootContainer() {
+    return rootContainer;
+  }
 
-    public TagCloudResult getTagCloudResult() {
-        return tagCloudResult;
-    }
+  public TagCloudResult getTagCloudResult() {
+    return tagCloudResult;
+  }
 
-    public String getToolName() {
-        return toolName;
-    }
+  public String getToolName() {
+    return toolName;
+  }
 
-    @Override
-    public String getTypeId() {
-        return typeId;
-    }
+  @Override
+  public String getTypeId() {
+    return typeId;
+  }
 
-    public boolean isType(final String type) {
-        return getTypeId().equals(type);
-    }
+  public boolean isType(final String type) {
+    return getTypeId().equals(type);
+  }
 
-    public void setAccessLists(final AccessListsDTO accessLists) {
-        this.accessLists = accessLists;
-    }
+  public void setAccessLists(final AccessListsDTO accessLists) {
+    this.accessLists = accessLists;
+  }
 
-    public void setContainer(final ContainerDTO container) {
-        this.container = container;
-    }
+  public void setContainer(final ContainerDTO container) {
+    this.container = container;
+  }
 
-    public void setContainerRights(final AccessRights containerRights) {
-        this.containerRights = containerRights;
-    }
+  public void setContainerRights(final AccessRights containerRights) {
+    this.containerRights = containerRights;
+  }
 
-    public void setLanguage(final I18nLanguageDTO language) {
-        this.language = language;
-    }
+  public void setLanguage(final I18nLanguageDTO language) {
+    this.language = language;
+  }
 
-    public void setLicense(final LicenseDTO license) {
-        this.license = license;
-    }
+  public void setLicense(final LicenseDTO license) {
+    this.license = license;
+  }
 
-    public void setRootContainer(final ContainerDTO rootContainer) {
-        this.rootContainer = rootContainer;
-    }
+  public void setRootContainer(final ContainerDTO rootContainer) {
+    this.rootContainer = rootContainer;
+  }
 
-    public void setTagCloudResult(final TagCloudResult tagCloudResult) {
-        this.tagCloudResult = tagCloudResult;
-    }
+  public void setTagCloudResult(final TagCloudResult tagCloudResult) {
+    this.tagCloudResult = tagCloudResult;
+  }
 
-    public void setToolName(final String toolName) {
-        this.toolName = toolName;
-    }
+  public void setToolName(final String toolName) {
+    this.toolName = toolName;
+  }
 
-    @Override
-    public void setTypeId(final String typeId) {
-        this.typeId = typeId;
-    }
+  @Override
+  public void setTypeId(final String typeId) {
+    this.typeId = typeId;
+  }
 
-    @Override
-    public String toString() {
-        return "StateDTO[" + getStateToken() + "/" + getTypeId() + "]";
-    }
+  @Override
+  public String toString() {
+    return "StateDTO[" + getStateToken() + "/" + getTypeId() + "]";
+  }
 
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-11-12 15:47:35 UTC (rev 1604)
@@ -93,6 +93,7 @@
                   </g:south>
                 </g:DockLayoutPanel>
               </g:center>
+              <!-- east to RTL (plus css changes in corners and menus -->
               <g:west size="200.0">
                 <g:DockLayoutPanel unit="PX"
                   styleName="{res.style.entityTools}" ui:field="splitEast">

Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptLogoPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptLogoPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptLogoPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -100,7 +100,8 @@
     uploader.setLabelText(i18n.t("Select an image from your computer as the logo for this group. "
         + "For best results use a [%d]x[%d] pixel image. Bigger images will be automatically resized.",
         FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT));
-    TabTitleGenerator.setText(tabTitle, CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE, MAX_TABTITLE_LENGTH);
+    TabTitleGenerator.setText(tabTitle, CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE,
+        MAX_TABTITLE_LENGTH, i18n.getDirection());
   }
 
   @Override
@@ -108,7 +109,8 @@
     uploader.setLabelText(i18n.t("Select an image from your computer as your avatar. "
         + "For best results use a [%d]x[%d] pixel image. Bigger images will be automatically resized.",
         FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT));
-    TabTitleGenerator.setText(tabTitle, CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE, MAX_TABTITLE_LENGTH);
+    TabTitleGenerator.setText(tabTitle, CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE,
+        MAX_TABTITLE_LENGTH, i18n.getDirection());
   }
 
   @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/options/style/EntityOptStylePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/style/EntityOptStylePanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/options/style/EntityOptStylePanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -57,12 +57,14 @@
   private final String chooseImage;
   private final Button clearBtn;
   private final String hasBackLabel;
+  private final I18nTranslationService i18n;
   private final String noHasBacklabel;
   private final IconLabel tabTitle;
   private final EntityUploaderForm uploader;
 
   public EntityOptStylePanel(final I18nTranslationService i18n, final CoreResources res,
       final GSpaceThemeSelectorPanel styleSelector) {
+    this.i18n = i18n;
     tabTitle = TabTitleGenerator.generate(res.themeChoose(), i18n.t("Style"), MAX_TABTITLE_LENGTH);
     // super.setHeight(String.valueOf(EntityOptionsView.HEIGHT) + "px");
     super.setWidth(String.valueOf(EntityOptionsView.WIDTH_WOUT_MARGIN) + "px");
@@ -171,7 +173,7 @@
   private void setBackImageVisibleImpl(final boolean visible) {
     backImage.setVisible(visible);
     clearBtn.setVisible(visible);
-    backgroundLabel.setText(visible ? hasBackLabel : noHasBacklabel);
+    backgroundLabel.setText(visible ? hasBackLabel : noHasBacklabel, i18n.getDirection());
     uploader.getBtn().setText(visible ? changeImage : chooseImage);
   }
 

Modified: trunk/src/main/java/cc/kune/gspace/client/tool/AbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/AbstractClientTool.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/AbstractClientTool.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -23,12 +23,14 @@
 import cc.kune.gspace.client.tool.selector.ToolSelectorItemPanel;
 import cc.kune.gspace.client.tool.selector.ToolSelectorItemPresenter;
 
+import com.google.gwt.i18n.client.HasDirection.Direction;
+
 public abstract class AbstractClientTool {
 
   public AbstractClientTool(final String shortName, final String longName, final String tooltip,
-      final ToolSelector toolSelector) {
+      final ToolSelector toolSelector, final Direction direction) {
     final ToolSelectorItemPresenter presenter = new ToolSelectorItemPresenter(shortName, longName,
-        tooltip, toolSelector);
+        tooltip, toolSelector, direction);
     final ToolSelectorItemPanel panel = new ToolSelectorItemPanel();
     presenter.init(panel);
   }

Modified: trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -38,7 +38,7 @@
   public FoldableAbstractClientTool(final String shortName, final String longName, final String tooltip,
       final ToolSelector toolSelector, final ContentCapabilitiesRegistry contentCapabilitiesRegistry,
       final I18nTranslationService i18n, final NavResources navResources) {
-    super(shortName, longName, tooltip, toolSelector);
+    super(shortName, longName, tooltip, toolSelector, i18n.getDirection());
     this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
     this.i18n = i18n;
     this.navResources = navResources;

Modified: trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -33,7 +33,7 @@
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.FocusPanel;
 import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.HasDirectionalText;
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.InlineLabel;
 import com.google.gwt.user.client.ui.Widget;
@@ -84,7 +84,7 @@
   }
 
   @Override
-  public HasText getLabel() {
+  public HasDirectionalText getLabel() {
     return label;
   }
 

Modified: trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPresenter.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPresenter.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -24,8 +24,9 @@
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.i18n.client.HasDirection.Direction;
 import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.HasDirectionalText;
 import com.google.gwt.user.client.ui.IsWidget;
 
 public class ToolSelectorItemPresenter implements ToolSelectorItem {
@@ -33,7 +34,7 @@
 
     HasClickHandlers getFocus();
 
-    HasText getLabel();
+    HasDirectionalText getLabel();
 
     void setSelected(boolean selected);
 
@@ -42,6 +43,7 @@
     void setVisible(boolean visible);
   }
 
+  private final Direction direction;
   private final String longName;
   private final String shortName;
   private StateToken token;
@@ -50,11 +52,12 @@
   private ToolSelectorItemView view;
 
   public ToolSelectorItemPresenter(final String shortName, final String longName, final String tooltip,
-      final ToolSelector toolSelector) {
+      final ToolSelector toolSelector, final Direction direction) {
     this.shortName = shortName;
     this.longName = longName;
     this.tooltip = tooltip;
     this.toolSelector = toolSelector;
+    this.direction = direction;
   }
 
   @Override
@@ -76,7 +79,7 @@
         History.newItem(token.toString());
       }
     });
-    view.getLabel().setText(longName);
+    view.getLabel().setText(longName, direction);
     view.setTooltip(tooltip);
   }
 

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2011-11-12 02:58:35 UTC (rev 1603)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2011-11-12 15:47:35 UTC (rev 1604)
@@ -109,7 +109,8 @@
 
   @Override
   public void setContainer(final StateContainerDTO state) {
-    contentTitle.setTitle(state.getTitle(), state.getTypeId(), state.getContainerRights().isEditable()
+    final String title = state.getContainer().isRoot() ? i18n.t(state.getTitle()) : state.getTitle();
+    contentTitle.setTitle(title, state.getTypeId(), state.getContainerRights().isEditable()
         && capabilitiesRegistry.isRenamable(state.getTypeId()));
     Window.setTitle(state.getGroup().getLongName() + ": " + state.getTitle());
   }




More information about the kune-commits mailing list