[kune-commits] r973 - in trunk/src:
main/java/org/ourproject/kune/app/client
main/java/org/ourproject/kune/blogs/client
main/java/org/ourproject/kune/chat/client
main/java/org/ourproject/kune/docs/client
main/java/org/ourproject/kune/gallery/client
main/java/org/ourproject/kune/platf/client
main/java/org/ourproject/kune/wiki/client
main/java/org/ourproject/kune/workspace/client
main/java/org/ourproject/kune/workspace/client/entitylogo
main/java/org/ourproject/kune/workspace/client/newgroup
main/java/org/ourproject/kune/workspace/client/nohomepage
main/java/org/ourproject/kune/workspace/client/signin
main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu
main/java/org/ourproject/kune/workspace/client/socialnet
test/java/org/ourproject/kune/platf/integration/selenium
vjrj
vjrj at ourproject.org
Mon Dec 1 00:11:33 CET 2008
Author: vjrj
Date: 2008-12-01 00:11:28 +0100 (Mon, 01 Dec 2008)
New Revision: 973
Added:
trunk/src/main/java/org/ourproject/kune/app/client/AppMessages.java
trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatMessages.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocsMessages.java
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java
trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java
trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/NewGroupSeleniumTest.java
trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/SignInSeleniumTest.java
Log:
Messages refactorization
Added: trunk/src/main/java/org/ourproject/kune/app/client/AppMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/client/AppMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/app/client/AppMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.app.client;
+
+public interface AppMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.blogs.client;
+
+public interface BlogsMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/chat/client/ChatMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.chat.client;
+
+public interface ChatMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/docs/client/DocsMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocsMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocsMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.docs.client;
+
+public interface DocsMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.gallery.client;
+
+public interface GalleryMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,16 @@
+package org.ourproject.kune.platf.client;
+
+public interface PlatfMessages {
+ String BUDDIES_NOT_PUBLIC = "The buddies of this user are not public";
+ String MEMBERS_NOT_PUBLIC = "The members of this group are not public";
+ String REGISTER_TITLE = "Register";
+ String SIGN_IN_TITLE = "Sign in";
+ String EMAIL_IN_USE = "This email in in use by other person, try with another.";
+ String NAME_IN_USE = "This name in already in use, try with a different name.";
+ String INCORRECT_NICKNAME_EMAIL_OR_PASSWORD = "Incorrect nickname/email or password";
+ String YOUR_HOMEPAGE = "Your homepage";
+ String USER_DON_T_HAVE_A_HOMEPAGE = "This user don't have a homepage";
+ String ENT_LOGO_SELECTOR_NORMAL_TITLE = "Select a logo for your group";
+ String ENT_LOGO_SELECTOR_PERSON_TITLE = "Select your avatar";
+
+}
Added: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.wiki.client;
+
+public interface WikiMessages {
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -0,0 +1,8 @@
+package org.ourproject.kune.workspace.client;
+
+public interface WorkspaceMessages {
+ String REGISTER_A_NEW_GROUP_TITLE = "Register a new Group";
+ String MUST_BE_BETWEEN_3_AND_15 = "Must be between 3 and 15 lowercase characters. Can only contain occidental characters, numbers, and dashes";
+ String NAME_IN_ALREADY_IN_USE = "This name in already in use, try with a different name.";
+ String REGISTER_TO_CREATE_A_GROUP = "Sign in or register to create a group";
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.entitylogo;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.ui.dialogs.BasicDialogExtended;
import org.ourproject.kune.platf.client.ui.download.FileParams;
@@ -39,8 +40,6 @@
public class EntityLogoSelectorPanel implements EntityLogoSelectorView {
- public static final String NORMAL_TITLE = "Select a logo for your group";
- public static final String PERSON_TITLE = "Select your avatar";
public static final String ICON_UPLOAD_SERVLET = "/kune/servlets/EntityLogoUploadManager";
public static final String SUBID = "k-elogoselp-subb";
public static final String CANCELID = "k-elogoselp-canb";
@@ -56,8 +55,8 @@
public EntityLogoSelectorPanel(final EntityLogoSelectorPresenter presenter, final WorkspaceSkeleton ws,
I18nTranslationService i18n) {
this.i18n = i18n;
- dialog = new BasicDialogExtended(i18n.t(NORMAL_TITLE), true, true, 400, 200, "", i18n.t("Select"), SUBID,
- i18n.tWithNT("Cancel", "used in button"), CANCELID, new Listener0() {
+ dialog = new BasicDialogExtended(i18n.t(PlatfMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE), true, true, 400, 200,
+ "", i18n.t("Select"), SUBID, i18n.tWithNT("Cancel", "used in button"), CANCELID, new Listener0() {
public void onEvent() {
String filename = file.getValueAsString();
if (filename != null && filename.length() > 0) {
@@ -146,7 +145,7 @@
+ "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT, EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT)
+ "<br/><br/>");
- dialog.setTitle(NORMAL_TITLE);
+ dialog.setTitle(PlatfMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
}
public void setPersonalGroupsLabels() {
@@ -154,7 +153,7 @@
+ "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT, EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT)
+ "<br/><br/>");
- dialog.setTitle(PERSON_TITLE);
+ dialog.setTitle(PlatfMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
}
public void setUploadParams(String userHash, String token) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -26,6 +26,7 @@
import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar;
import org.ourproject.kune.platf.client.ui.dialogs.WizardDialog;
import org.ourproject.kune.platf.client.ui.dialogs.WizardListener;
+import org.ourproject.kune.workspace.client.WorkspaceMessages;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.licensechoose.LicenseChoose;
import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePanel;
@@ -49,8 +50,6 @@
import com.gwtext.client.widgets.layout.FitLayout;
public class NewGroupPanel extends WizardDialog implements NewGroupView {
- public static final String REGISTER_A_NEW_GROUP_TITLE = "Register a new Group";
- public static final String MUST_BE_BETWEEN_3_AND_15 = "Must be between 3 and 15 lowercase characters. Can only contain occidental characters, numbers, and dashes";
public static final String SHORTNAME_FIELD = "k-ngp-short_name";
public static final String LONGNAME_FIELD = "k-ngp-long_name";
public static final String PUBLICDESC_FIELD = "k-ngp-public_desc";
@@ -84,7 +83,7 @@
public NewGroupPanel(final NewGroupPresenter presenter, final I18nUITranslationService i18n,
final Provider<LicenseChoose> licenseChooseProvider, Images img) {
- super(i18n.t(REGISTER_A_NEW_GROUP_TITLE), true, false, 460, 430, new WizardListener() {
+ super(i18n.t(WorkspaceMessages.REGISTER_A_NEW_GROUP_TITLE), true, false, 460, 430, new WizardListener() {
public void onBack() {
presenter.onBack();
}
@@ -234,9 +233,9 @@
shortNameField.setMaxLength(15);
shortNameField.setAllowBlank(false);
shortNameField.setRegex("^[a-z0-9_\\-]+$");
- shortNameField.setMinLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameField.setMaxLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameField.setRegexText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.setMinLengthText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.setMaxLengthText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.setRegexText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
shortNameField.setValidationDelay(1000);
form.add(shortNameField);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -30,6 +30,7 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.WorkspaceMessages;
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.site.SiteToken;
@@ -39,8 +40,7 @@
import com.google.gwt.user.client.rpc.AsyncCallback;
public class NewGroupPresenter implements NewGroup {
- public static final String NAME_IN_ALREADY_IN_USE = "This name in already in use, try with a different name.";
- public static final String REGISTER_TO_CREATE_A_GROUP = "Sign in or register to create a group";
+
private NewGroupView view;
private final I18nTranslationService i18n;
private final Session session;
@@ -70,7 +70,7 @@
Site.hideProgress();
} else {
stateManager.restorePreviousToken();
- Site.info(i18n.t(REGISTER_TO_CREATE_A_GROUP));
+ Site.info(i18n.t(WorkspaceMessages.REGISTER_TO_CREATE_A_GROUP));
}
}
});
@@ -118,7 +118,7 @@
} catch (final GroupNameInUseException e) {
onBack();
view.unMask();
- setMessage(i18n.t(NAME_IN_ALREADY_IN_USE), SiteErrorType.error);
+ setMessage(i18n.t(WorkspaceMessages.NAME_IN_ALREADY_IN_USE), SiteErrorType.error);
} catch (final Throwable e) {
onBack(); // The messageP is in first page of wizard :-/
view.unMask();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.nohomepage;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.workspace.client.skel.EntityWorkspace;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
@@ -25,8 +26,6 @@
import com.google.gwt.user.client.ui.Label;
public class NoHomePagePanel implements NoHomePageView {
-
- public static final String USER_DON_T_HAVE_A_HOMEPAGE = "This user don't have a homepage";
public static final String NO_HOME_PAGE_LABEL = "k-nhpp-l";
private final Label noHomepageCtnLabel;
private final Label noHomepageCtxLabel;
@@ -34,7 +33,7 @@
public NoHomePagePanel(final NoHomePagePresenter presenter, final WorkspaceSkeleton ws, I18nTranslationService i18n) {
this.ws = ws;
- noHomepageCtnLabel = new Label(i18n.t(USER_DON_T_HAVE_A_HOMEPAGE));
+ noHomepageCtnLabel = new Label(i18n.t(PlatfMessages.USER_DON_T_HAVE_A_HOMEPAGE));
noHomepageCtnLabel.ensureDebugId(NO_HOME_PAGE_LABEL);
noHomepageCtnLabel.setStyleName("kune-Content-Main");
noHomepageCtnLabel.addStyleName("kune-Margin-7-trbl");
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -20,6 +20,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
+import org.ourproject.kune.workspace.client.WorkspaceMessages;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import com.gwtext.client.data.SimpleStore;
@@ -34,8 +35,6 @@
public class RegisterForm extends DefaultForm {
- private static final String MUST_BE_BETWEEN_3_AND_15 = "Must be between 3 and 15 lowercase characters. Can only contain characters, numbers, and dashes";
-
public static final String NICK_FIELD = "k-urf-nick-f";
public static final String EMAIL_FIELD = "k-urf-email-f";
public static final String LONGNAME_FIELD = "k-urf-long_name-f";
@@ -73,9 +72,9 @@
shortNameRegField.setMinLength(3);
shortNameRegField.setMaxLength(15);
shortNameRegField.setRegex("^[a-z0-9_\\-]+$");
- shortNameRegField.setMinLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameRegField.setMaxLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameRegField.setRegexText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
+ shortNameRegField.setMinLengthText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
+ shortNameRegField.setMaxLengthText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
+ shortNameRegField.setRegexText(i18n.t(WorkspaceMessages.MUST_BE_BETWEEN_3_AND_15));
shortNameRegField.setValidationEvent(false);
add(shortNameRegField);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -1,5 +1,6 @@
package org.ourproject.kune.workspace.client.signin;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.ui.dialogs.InfoDialog;
@@ -13,7 +14,6 @@
public class RegisterPanel extends SignInAbstractPanel implements RegisterView {
- public static final String REGISTER_TITLE = "Register";
public static final String ERRMSG = "k-regp-errmsg";
static RegisterForm registerForm;
@@ -27,8 +27,9 @@
public RegisterPanel(final RegisterPresenter presenter, I18nUITranslationService i18n, final WorkspaceSkeleton ws,
Session session, Images images) {
- super(i18n, i18n.t(REGISTER_TITLE), true, true, 390, 450, "", i18n.t(REGISTER_TITLE), REGISTER_BUTTON_ID,
- i18n.tWithNT("Cancel", "used in button"), CANCEL_BUTTON_ID, new Listener0() {
+ super(i18n, i18n.t(PlatfMessages.REGISTER_TITLE), true, true, 390, 450, "",
+ i18n.t(PlatfMessages.REGISTER_TITLE), REGISTER_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"),
+ CANCEL_BUTTON_ID, new Listener0() {
public void onEvent() {
registerForm.validate();
if (registerForm.isValid()) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -1,5 +1,6 @@
package org.ourproject.kune.workspace.client.signin;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.I18nCountryDTO;
import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
@@ -22,8 +23,6 @@
public class RegisterPresenter extends SignInAbstractPresenter implements Register {
- public static final String EMAIL_IN_USE = "This email in in use by other person, try with another.";
- public static final String NAME_IN_USE = "This name in already in use, try with a different name.";
private RegisterView view;
private final Provider<UserServiceAsync> userServiceProvider;
private final Provider<SignIn> signInProvider;
@@ -79,9 +78,9 @@
try {
throw caught;
} catch (final EmailAddressInUseException e) {
- view.setErrorMessage(i18n.t(EMAIL_IN_USE), SiteErrorType.error);
+ view.setErrorMessage(i18n.t(PlatfMessages.EMAIL_IN_USE), SiteErrorType.error);
} catch (final GroupNameInUseException e) {
- view.setErrorMessage(i18n.t(NAME_IN_USE), SiteErrorType.error);
+ view.setErrorMessage(i18n.t(PlatfMessages.NAME_IN_USE), SiteErrorType.error);
} catch (final Throwable e) {
view.setErrorMessage(i18n.t("Error during registration."), SiteErrorType.error);
GWT.log("Other kind of exception in user registration" + e.getMessage() + ", "
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -1,5 +1,6 @@
package org.ourproject.kune.workspace.client.signin;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
@@ -15,7 +16,6 @@
public class SignInPanel extends SignInAbstractPanel implements SignInView {
- public static final String SIGN_IN_TITLE = "Sign in";
public static final String ERROR_MSG = "k-sigp-errmsg";
public static final String CANCEL_BUTTON_ID = "k-signinp-cb";
public static final String SIGN_IN_BUTTON_ID = "k-signinp-sib";
@@ -25,8 +25,8 @@
public SignInPanel(final SignInPresenter presenter, I18nUITranslationService i18n, final WorkspaceSkeleton ws,
Images images) {
- super(i18n, i18n.t(SIGN_IN_TITLE), true, true, 340, 240, "", i18n.t(SIGN_IN_TITLE), SIGN_IN_BUTTON_ID,
- i18n.tWithNT("Cancel", "used in button"), CANCEL_BUTTON_ID, new Listener0() {
+ super(i18n, i18n.t(PlatfMessages.SIGN_IN_TITLE), true, true, 340, 240, "", i18n.t(PlatfMessages.SIGN_IN_TITLE),
+ SIGN_IN_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"), CANCEL_BUTTON_ID, new Listener0() {
public void onEvent() {
signInForm.validate();
if (signInForm.isValid()) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -1,5 +1,6 @@
package org.ourproject.kune.workspace.client.signin;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.UserDTO;
import org.ourproject.kune.platf.client.dto.UserInfoDTO;
@@ -18,7 +19,6 @@
public class SignInPresenter extends SignInAbstractPresenter implements SignIn {
- public static final String INCORRECT_NICKNAME_EMAIL_OR_PASSWORD = "Incorrect nickname/email or password";
SignInView view;
private final Provider<UserServiceAsync> userServiceProvider;
private final Provider<Register> registerProvider;
@@ -77,7 +77,8 @@
try {
throw caught;
} catch (final UserAuthException e) {
- view.setErrorMessage(i18n.t(INCORRECT_NICKNAME_EMAIL_OR_PASSWORD), SiteErrorType.error);
+ view.setErrorMessage(i18n.t(PlatfMessages.INCORRECT_NICKNAME_EMAIL_OR_PASSWORD),
+ SiteErrorType.error);
} catch (final Throwable e) {
view.setErrorMessage("Error in login", SiteErrorType.error);
Log.error("Other kind of exception in LoginFormPresenter/doLogin");
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.sitebar.siteusermenu;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.ui.MenuItemCollection;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
@@ -35,7 +36,6 @@
public class SiteUserMenuPanel implements SiteUserMenuView {
- public static final String YOUR_HOMEPAGE = "Your homepage";
public static final String LOGGED_USER_MENU = "kune-sump-lum";
public static final String USER_PREFERENCES_MENU_ITEM = "kune-sump-uprmi";
public static final String USER_HOME_PAGE_MENU_ITEM = "kune-sump-hpmi";
@@ -58,7 +58,7 @@
userMenu.showAt(sender.getAbsoluteLeft(), sender.getAbsoluteTop() + 10);
}
});
- final Item userHomePage = new Item(i18n.t(YOUR_HOMEPAGE));
+ final Item userHomePage = new Item(i18n.t(PlatfMessages.YOUR_HOMEPAGE));
userHomePage.setId(USER_HOME_PAGE_MENU_ITEM);
userHomePage.setIcon("images/group-home.gif");
userHomePage.addListener(new BaseItemListenerAdapter() {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.socialnet;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.actions.ActionItem;
import org.ourproject.kune.platf.client.actions.ActionItemCollection;
import org.ourproject.kune.platf.client.actions.ActionManager;
@@ -80,8 +81,6 @@
nick.setText(nickName);
}
}
-
- public static final String NOT_PUBLIC = "The buddies of this user are not public";
private final MenuItemsContainer<UserSimpleDTO> menuItemsContainer;
private final FlowPanel flowPanel;
private final Label otherBuddiesLabel;
@@ -107,7 +106,7 @@
vp.add(toolbar);
super.add(vp);
addInSummary();
- noBuddiesPublic = new Label(i18n.t(NOT_PUBLIC));
+ noBuddiesPublic = new Label(i18n.t(PlatfMessages.BUDDIES_NOT_PUBLIC));
noBuddiesPublic.addStyleName("kune-Margin-7-trbl");
noBuddiesPublic.addStyleName("k-text-gray");
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.socialnet;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
@@ -42,7 +43,6 @@
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
public class GroupMembersSummaryPanel extends SummaryPanel implements GroupMembersSummaryView {
- public static final String NOT_PUBLIC = "The members of this group are not public";
// private static final int MAX_HEIGHT = 110;
private final GridMenuPanel<GroupDTO> gridMenuPanel;
private final I18nUITranslationService i18n;
@@ -71,7 +71,7 @@
gridMenuPanel.getBottomBar().setCls("k-blank-toolbar");
super.add(gridMenuPanel);
- noMembersPublic = new Label(i18n.t(NOT_PUBLIC));
+ noMembersPublic = new Label(i18n.t(PlatfMessages.MEMBERS_NOT_PUBLIC));
noMembersPublic.addStyleName("kune-Margin-7-trbl");
noMembersPublic.addStyleName("k-text-gray");
noMembersPublic.setVisible(false);
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -4,6 +4,7 @@
import java.io.IOException;
import org.junit.Test;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.workspace.client.entitylogo.EntityLogoPanel;
import org.ourproject.kune.workspace.client.entitylogo.EntityLogoSelectorPanel;
import org.ourproject.kune.workspace.client.entitylogo.EntityLogoView;
@@ -20,7 +21,7 @@
private void setLogo(String filename) throws Exception, IOException {
click(gid(EntityLogoPanel.PUT_YOUR_LOGO_LINK));
- waitForTextInside(EntityLogoSelectorPanel.DIALOG_ID, EntityLogoSelectorPanel.NORMAL_TITLE);
+ waitForTextInside(EntityLogoSelectorPanel.DIALOG_ID, PlatfMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
File dir = new File(".");
type(EntityLogoView.LOGO_FORM_FIELD, dir.getCanonicalPath() + File.separator + "img" + File.separator
+ filename);
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/NewGroupSeleniumTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/NewGroupSeleniumTest.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/NewGroupSeleniumTest.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -5,9 +5,9 @@
import org.junit.Test;
import org.ourproject.kune.platf.client.dto.GroupType;
+import org.ourproject.kune.workspace.client.WorkspaceMessages;
import org.ourproject.kune.workspace.client.entitylogo.EntityLogoPanel;
import org.ourproject.kune.workspace.client.newgroup.NewGroupPanel;
-import org.ourproject.kune.workspace.client.newgroup.NewGroupPresenter;
import org.ourproject.kune.workspace.client.site.SiteToken;
public class NewGroupSeleniumTest extends KuneSeleniumTestHelper {
@@ -19,17 +19,17 @@
click(NewGroupPanel.CANCEL_BUTTON);
assertFalse(selenium.isTextPresent(NewGroupPanel.NEWGROUP_WIZARD));
open(SiteToken.newgroup);
- waitForTextInside(NewGroupPanel.NEWGROUP_WIZARD, NewGroupPanel.REGISTER_A_NEW_GROUP_TITLE);
+ waitForTextInside(NewGroupPanel.NEWGROUP_WIZARD, WorkspaceMessages.REGISTER_A_NEW_GROUP_TITLE);
}
@Test
public void newGroupNotLogged() throws Exception {
openDefPage();
assertFalse(selenium.isTextPresent(NewGroupPanel.NEWGROUP_WIZARD));
- assertFalse(selenium.isTextPresent(NewGroupPresenter.REGISTER_TO_CREATE_A_GROUP));
+ assertFalse(selenium.isTextPresent(WorkspaceMessages.REGISTER_TO_CREATE_A_GROUP));
open(SiteToken.newgroup);
wait(1000);
- assertTrue(selenium.isTextPresent(NewGroupPresenter.REGISTER_TO_CREATE_A_GROUP));
+ assertTrue(selenium.isTextPresent(WorkspaceMessages.REGISTER_TO_CREATE_A_GROUP));
}
@Test
@@ -39,7 +39,7 @@
GroupType.ORGANIZATION);
click(NewGroupPanel.NEXT_BUTTON);
click(NewGroupPanel.FINISH_BUTTON);
- waitForTextInside(gid(NewGroupPanel.ERROR_MSG_BAR), NewGroupPresenter.NAME_IN_ALREADY_IN_USE);
+ waitForTextInside(gid(NewGroupPanel.ERROR_MSG_BAR), WorkspaceMessages.NAME_IN_ALREADY_IN_USE);
}
@Test
@@ -87,6 +87,6 @@
signIn();
open(SiteToken.newgroup);
verifyLoggedUserShorName("admin");
- waitForTextInside(NewGroupPanel.NEWGROUP_WIZARD, NewGroupPanel.REGISTER_A_NEW_GROUP_TITLE);
+ waitForTextInside(NewGroupPanel.NEWGROUP_WIZARD, WorkspaceMessages.REGISTER_A_NEW_GROUP_TITLE);
}
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/SignInSeleniumTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/SignInSeleniumTest.java 2008-11-30 01:12:34 UTC (rev 972)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/SignInSeleniumTest.java 2008-11-30 23:11:28 UTC (rev 973)
@@ -5,12 +5,11 @@
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePanel;
import org.ourproject.kune.workspace.client.signin.RegisterPanel;
-import org.ourproject.kune.workspace.client.signin.RegisterPresenter;
import org.ourproject.kune.workspace.client.signin.SignInForm;
import org.ourproject.kune.workspace.client.signin.SignInPanel;
-import org.ourproject.kune.workspace.client.signin.SignInPresenter;
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.site.SiteToken;
import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLinkPanel;
@@ -24,7 +23,7 @@
openDefPage();
register("u" + genPrefix(), "Site Administrator", "somepasswd", "somepasswd", "some" + genPrefix()
+ "@example.com", "Andorra", "Afrikaans", "MIT", true);
- waitForTextInside(gid(RegisterPanel.ERRMSG), RegisterPresenter.NAME_IN_USE);
+ waitForTextInside(gid(RegisterPanel.ERRMSG), PlatfMessages.NAME_IN_USE);
click(RegisterPanel.CANCEL_BUTTON_ID);
}
@@ -33,7 +32,7 @@
openDefPage();
register("admin", "some name" + genPrefix(), "somepasswd", "somepasswd", "some" + genPrefix() + "@example.com",
"Andorra", "Afrikaans", "MIT", true);
- waitForTextInside(gid(RegisterPanel.ERRMSG), RegisterPresenter.NAME_IN_USE);
+ waitForTextInside(gid(RegisterPanel.ERRMSG), PlatfMessages.NAME_IN_USE);
click(RegisterPanel.CANCEL_BUTTON_ID);
}
@@ -51,8 +50,8 @@
selenium.isTextPresent("Welcome");
click(RegisterPanel.WELCOME_OK_BUTTON);
clickOnPushButton(gid(SiteUserMenuPanel.LOGGED_USER_MENU));
- click(linkId(SiteUserMenuPanel.YOUR_HOMEPAGE));
- waitForTextInside(gid(NoHomePagePanel.NO_HOME_PAGE_LABEL), NoHomePagePanel.USER_DON_T_HAVE_A_HOMEPAGE);
+ click(linkId(PlatfMessages.YOUR_HOMEPAGE));
+ waitForTextInside(gid(NoHomePagePanel.NO_HOME_PAGE_LABEL), PlatfMessages.USER_DON_T_HAVE_A_HOMEPAGE);
}
@Test
@@ -81,9 +80,9 @@
@Test
public void testRegisterToken() throws Exception {
open(SiteToken.register);
- assertFalse(selenium.isTextPresent(RegisterPanel.REGISTER_TITLE));
+ assertFalse(selenium.isTextPresent(PlatfMessages.REGISTER_TITLE));
waitForTextInside(gid(EntityTitlePanel.ENTITY_TITLE_RIGHT_TITLE), "Welcome to kune");
- assertTrue(selenium.isTextPresent(RegisterPanel.REGISTER_TITLE));
+ assertTrue(selenium.isTextPresent(PlatfMessages.REGISTER_TITLE));
}
@Test
@@ -107,7 +106,7 @@
public void testSignInFailed() throws Exception {
openDefPage();
signIn("something", "wrong");
- waitForTextInside(gid(SignInPanel.ERROR_MSG), SignInPresenter.INCORRECT_NICKNAME_EMAIL_OR_PASSWORD);
+ waitForTextInside(gid(SignInPanel.ERROR_MSG), PlatfMessages.INCORRECT_NICKNAME_EMAIL_OR_PASSWORD);
signOut();
}
@@ -135,8 +134,8 @@
@Test
public void testSignInToken() throws Exception {
open(SiteToken.signin);
- assertFalse(selenium.isTextPresent(SignInPanel.SIGN_IN_TITLE));
+ assertFalse(selenium.isTextPresent(PlatfMessages.SIGN_IN_TITLE));
waitForTextInside(gid(EntityTitlePanel.ENTITY_TITLE_RIGHT_TITLE), "Welcome to kune");
- assertTrue(selenium.isTextPresent(SignInPanel.SIGN_IN_TITLE));
+ assertTrue(selenium.isTextPresent(PlatfMessages.SIGN_IN_TITLE));
}
}
More information about the kune-commits
mailing list