From: Patrick Plitzner
Date: Tue, 21 Jun 2016 08:34:18 +0000 (+0200)
Subject: I18n for RemoteLoginDialog #5146
X-Git-Tag: 4.2.0^2~46
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/271ec193cea812d7a02464eef7ce894319380930
I18n for RemoteLoginDialog #5146
---
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
index 9675726a1..7d26acc32 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
@@ -53,3 +53,44 @@ CdmStoreConnector_REASON=Reason:
CdmStoreConnector_SCHEME_NOT_COMPATIBLE=The database schema for the chosen datasource '%s' \n is not compatible for this version of the taxonomic editor. \n\n%s
CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE=Please update the chosen datasource or choose a new data source to connect to in the Datasource View.
CdmStoreConnector_UPDATE_EDITOR_OR_CHOOSE_COMPATIBLE_DATASOURCE=Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible datasource
+
+RemotingLoginDialog_CHOOSE_COMPATIBLE_CDM_SERVER=Please choose a compatible cdm-server or update the chosen cdm-server
+RemotingLoginDialog_LABEL_ADVANCED=advanced
+RemotingLoginDialog_LABEL_CDM_INSTANCE=CDM Instance :
+RemotingLoginDialog_LABEL_CDM_SERVER=CDM Server :
+RemotingLoginDialog_LABEL_CONNECT=Connect
+RemotingLoginDialog_LABEL_EDITOR_CDM_VERSION=Editor CDM Version :
+RemotingLoginDialog_LABEL_EDITOR_CDMLIB_VERSION=Editor Cdmlib Version :
+RemotingLoginDialog_LABEL_LOGIN=Login
+RemotingLoginDialog_LABEL_LOGIN_COLON=Login :
+RemotingLoginDialog_LABEL_PASSWORD=Password :
+RemotingLoginDialog_LABEL_PORT=Port :
+RemotingLoginDialog_LABEL_REFRESH=Refresh
+RemotingLoginDialog_LABEL_REMEMBER_ME=Remember Me
+RemotingLoginDialog_LABEL_RETRIEVE_SERVER_INSTANCES=Retrieve Server Instances
+RemotingLoginDialog_LABEL_SERVER_CDM_VERSION=Server CDM Version :
+RemotingLoginDialog_LABEL_SERVER_CDMLIB_VERSION=Server Cdmlib Version :
+RemotingLoginDialog_LABEL_STOP_MANAGED_SERVER=Stop Managed Server
+RemotingLoginDialog_LOGIN_CANNOT_BE_EMPTY=User login cannot be empty
+RemotingLoginDialog_MESSAGE_PORT_SHOULD_BE_INTEGER=Port should be an integer
+RemotingLoginDialog_PASSWORD_CANNOT_BE_EMPTY=Password cannot be empty
+RemotingLoginDialog_SERVER_LAUNCH_ERROR=CDM Server launch error
+RemotingLoginDialog_STATUS_AVAILABLE=Available
+RemotingLoginDialog_STATUS_CHECKING=Checking ...
+RemotingLoginDialog_STATUS_ERROR=Error
+RemotingLoginDialog_STATUS_NO_INSTANCES_FOUND=No Instances Found
+RemotingLoginDialog_STATUS_NOT_AVAILABLE=Not Available
+RemotingLoginDialog_STATUS_NOT_COMPATIBLE=Not Compatible
+RemotingLoginDialog_STATUS_NOT_STARTED=Not Started
+RemotingLoginDialog_STATUS_REMOTING_NOT_ACTIVATED=Remoting not activated
+RemotingLoginDialog_STATUS_RETRIEVING=Retrieving ...
+RemotingLoginDialog_STATUS_STARTED=Started
+RemotingLoginDialog_UPDATE_EDITOR=Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible cdm-server
+RemotingLoginDialog_COULD_NOT_STOP_SERVER=Could not stop managed server running at port %s. Please stop it manually.
+RemotingLoginDialog_ERROR_GENERATING_CONFIG_FILE=Error generating server config file
+RemotingLoginDialog_ERROR_STARTING_SERVER=Error starting managed server
+RemotingLoginDialog_ERROR_STOPPING_SERVER=Error stopping managed server
+RemotingLoginDialog_GENERATING_CONFIG_FILE=Generating datasources config file for %s
+RemotingLoginDialog_JOB_SERVER_LAUNCH=Managed CDM Server Launch
+RemotingLoginDialog_STARTING_MGD_SERVER=Starting Managed CDM Server. This may take a while.
+RemotingLoginDialog_TASK_LAUNCHING_SERVER=Launching Managed CDM Server
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
index 8f3745f4f..c4c2722cc 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
@@ -53,3 +53,44 @@ CdmStoreConnector_REASON=Grund:
CdmStoreConnector_SCHEME_NOT_COMPATIBLE=Das Datenbankschema für die gewählte Datenquelle '%s' \n ist nicht kompatibel mit dieser Version des Editors. \n\n%s
CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE=Bitte aktualisieren Sie die ausgewählte Datenquelle oder wählen Sie eine neue Datenquelle aus.
CdmStoreConnector_UPDATE_EDITOR_OR_CHOOSE_COMPATIBLE_DATASOURCE=Bitte aktualisieren Sie den Taxonomic Editor (Hilfe->Suche nach Updates) oder wählen sie eine kompatible Datenquelle
+
+RemotingLoginDialog_CHOOSE_COMPATIBLE_CDM_SERVER=Please choose a compatible cdm-server or update the chosen cdm-server
+RemotingLoginDialog_LABEL_ADVANCED=advanced
+RemotingLoginDialog_LABEL_CDM_INSTANCE=CDM Instance :
+RemotingLoginDialog_LABEL_CDM_SERVER=CDM Server :
+RemotingLoginDialog_LABEL_CONNECT=Connect
+RemotingLoginDialog_LABEL_EDITOR_CDM_VERSION=Editor CDM Version :
+RemotingLoginDialog_LABEL_EDITOR_CDMLIB_VERSION=Editor Cdmlib Version :
+RemotingLoginDialog_LABEL_LOGIN=Login
+RemotingLoginDialog_LABEL_LOGIN_COLON=Login :
+RemotingLoginDialog_LABEL_PASSWORD=Password :
+RemotingLoginDialog_LABEL_PORT=Port :
+RemotingLoginDialog_LABEL_REFRESH=Refresh
+RemotingLoginDialog_LABEL_REMEMBER_ME=Remember Me
+RemotingLoginDialog_LABEL_RETRIEVE_SERVER_INSTANCES=Retrieve Server Instances
+RemotingLoginDialog_LABEL_SERVER_CDM_VERSION=Server CDM Version :
+RemotingLoginDialog_LABEL_SERVER_CDMLIB_VERSION=Server Cdmlib Version :
+RemotingLoginDialog_LABEL_STOP_MANAGED_SERVER=Stop Managed Server
+RemotingLoginDialog_LOGIN_CANNOT_BE_EMPTY=User login cannot be empty
+RemotingLoginDialog_MESSAGE_PORT_SHOULD_BE_INTEGER=Port should be an integer
+RemotingLoginDialog_PASSWORD_CANNOT_BE_EMPTY=Password cannot be empty
+RemotingLoginDialog_SERVER_LAUNCH_ERROR=CDM Server launch error
+RemotingLoginDialog_STATUS_AVAILABLE=Available
+RemotingLoginDialog_STATUS_CHECKING=Checking ...
+RemotingLoginDialog_STATUS_ERROR=Error
+RemotingLoginDialog_STATUS_NO_INSTANCES_FOUND=No Instances Found
+RemotingLoginDialog_STATUS_NOT_AVAILABLE=Not Available
+RemotingLoginDialog_STATUS_NOT_COMPATIBLE=Not Compatible
+RemotingLoginDialog_STATUS_NOT_STARTED=Not Started
+RemotingLoginDialog_STATUS_REMOTING_NOT_ACTIVATED=Remoting not activated
+RemotingLoginDialog_STATUS_RETRIEVING=Retrieving ...
+RemotingLoginDialog_STATUS_STARTED=Started
+RemotingLoginDialog_UPDATE_EDITOR=Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible cdm-server
+RemotingLoginDialog_COULD_NOT_STOP_SERVER=Could not stop managed server running at port %s. Please stop it manually.
+RemotingLoginDialog_ERROR_GENERATING_CONFIG_FILE=Error generating server config file
+RemotingLoginDialog_ERROR_STARTING_SERVER=Error starting managed server
+RemotingLoginDialog_ERROR_STOPPING_SERVER=Error stopping managed server
+RemotingLoginDialog_GENERATING_CONFIG_FILE=Generating datasources config file for %s
+RemotingLoginDialog_JOB_SERVER_LAUNCH=Managed CDM Server Launch
+RemotingLoginDialog_STARTING_MGD_SERVER=Starting Managed CDM Server. This may take a while.
+RemotingLoginDialog_TASK_LAUNCHING_SERVER=Launching Managed CDM Server
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
index e71b2d0a2..31af5d0ba 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
@@ -71,7 +71,47 @@ public class Messages extends NLS {
public static String CdmStoreConnector_SCHEME_NOT_COMPATIBLE;
public static String CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE;
public static String CdmStoreConnector_UPDATE_EDITOR_OR_CHOOSE_COMPATIBLE_DATASOURCE;
- static {
+ public static String RemotingLoginDialog_CHOOSE_COMPATIBLE_CDM_SERVER;
+ public static String RemotingLoginDialog_LABEL_ADVANCED;
+ public static String RemotingLoginDialog_LABEL_CDM_INSTANCE;
+ public static String RemotingLoginDialog_LABEL_CDM_SERVER;
+ public static String RemotingLoginDialog_LABEL_CONNECT;
+ public static String RemotingLoginDialog_LABEL_EDITOR_CDM_VERSION;
+ public static String RemotingLoginDialog_LABEL_EDITOR_CDMLIB_VERSION;
+ public static String RemotingLoginDialog_LABEL_LOGIN;
+ public static String RemotingLoginDialog_LABEL_LOGIN_COLON;
+ public static String RemotingLoginDialog_LABEL_PASSWORD;
+ public static String RemotingLoginDialog_LABEL_PORT;
+ public static String RemotingLoginDialog_LABEL_REFRESH;
+ public static String RemotingLoginDialog_LABEL_REMEMBER_ME;
+ public static String RemotingLoginDialog_RETRIEVE_SERVER_INSTANCES;
+ public static String RemotingLoginDialog_LABEL_SERVER_CDM_VERSION;
+ public static String RemotingLoginDialog_LABEL_SERVER_CDMLIB_VERSION;
+ public static String RemotingLoginDialog_LABEL_STOP_MANAGED_SERVER;
+ public static String RemotingLoginDialog_LOGIN_CANNOT_BE_EMPTY;
+ public static String RemotingLoginDialog_MESSAGE_PORT_SHOULD_BE_INTEGER;
+ public static String RemotingLoginDialog_PASSWORD_CANNOT_BE_EMPTY;
+ public static String RemotingLoginDialog_SERVER_LAUNCH_ERROR;
+ public static String RemotingLoginDialog_STATUS_AVAILABLE;
+ public static String RemotingLoginDialog_STATUS_CHECKING;
+ public static String RemotingLoginDialog_STATUS_ERROR;
+ public static String RemotingLoginDialog_STATUS_NO_INSTANCES_FOUND;
+ public static String RemotingLoginDialog_STATUS_NOT_AVAILABLE;
+ public static String RemotingLoginDialog_STATUS_NOT_COMPATIBLE;
+ public static String RemotingLoginDialog_STATUS_NOT_STARTED;
+ public static String RemotingLoginDialog_STATUS_REMOTING_NOT_ACTIVATED;
+ public static String RemotingLoginDialog_STATUS_RETRIEVING;
+ public static String RemotingLoginDialog_STATUS_STARTED;
+ public static String RemotingLoginDialog_UPDATE_EDITOR;
+ public static String RemotingLoginDialog_COULD_NOT_STOP_SERVER;
+ public static String RemotingLoginDialog_ERROR_GENERATING_CONFIG_FILE;
+ public static String RemotingLoginDialog_ERROR_STARTING_SERVER;
+ public static String RemotingLoginDialog_ERROR_STOPPING_SERVER;
+ public static String RemotingLoginDialog_GENERATING_CONFIG_FILE;
+ public static String RemotingLoginDialog_JOB_SERVER_LAUNCH;
+ public static String RemotingLoginDialog_STARTING_MGD_SERVER;
+ public static String RemotingLoginDialog_TASK_LAUNCHING_SERVER;
+ static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
index f77ab9033..2a45f5f52 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
@@ -57,6 +57,7 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
+import eu.etaxonomy.taxeditor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -81,7 +82,8 @@ import eu.etaxonomy.taxeditor.webapp.ICDMServerError;
*/
public class RemotingLoginDialog extends Dialog implements ICDMServerError {
- protected Object result;
+ private static final String UBUNTU = "Ubuntu"; //$NON-NLS-1$
+ protected Object result;
protected Shell shlConnect;
private Text txtCdmServerStatus;
private Text txtCdmInstanceStatus;
@@ -91,31 +93,31 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
private final Map csiiMap = new HashMap();
- private final static String STATUS_AVAILABLE = "Available";
- private final static String STATUS_NOT_AVAILABLE = "Not Available";
- private final static String STATUS_STARTED = "Started";
- private final static String STATUS_NOT_STARTED = "Not Started";
- private final static String STATUS_RETRIEVING = "Retrieving ...";
- private final static String STATUS_CHECKING_AVAILABILITY = "Checking ...";
- private final static String STATUS_NO_INSTANCES = "No Instances Found";
- private final static String STATUS_ERROR = "Error";
- private final static String STATUS_REMOTING_NOT_ACTIVATED = "Remoting not activated";
- private final static String STATUS_NOT_COMPATIBLE = "Not Compatible";
+ private final static String STATUS_AVAILABLE = ""; //$NON-NLS-1$
+ private final static String STATUS_NOT_AVAILABLE = ""; //$NON-NLS-1$
+ private final static String STATUS_STARTED = ""; //$NON-NLS-1$
+ private final static String STATUS_NOT_STARTED = ""; //$NON-NLS-1$
+ private final static String STATUS_RETRIEVING = ""; //$NON-NLS-1$
+ private final static String STATUS_CHECKING_AVAILABILITY = ""; //$NON-NLS-1$
+ private final static String STATUS_NO_INSTANCES = ""; //$NON-NLS-1$
+ private final static String STATUS_ERROR = ""; //$NON-NLS-1$
+ private final static String STATUS_REMOTING_NOT_ACTIVATED = ""; //$NON-NLS-1$
+ private final static String STATUS_NOT_COMPATIBLE = ""; //$NON-NLS-1$
- private final static String MESG_COMPATIBLE_EDITOR_OLD = "Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible cdm-server";
- private final static String MESG_COMPATIBLE_SERVER_OLD = "Please choose a compatible cdm-server or update the chosen cdm-server";
+ private final static String MESG_COMPATIBLE_EDITOR_OLD = ""; //$NON-NLS-1$
+ private final static String MESG_COMPATIBLE_SERVER_OLD = ""; //$NON-NLS-1$
- private final static String STORE_PREFERENCES_NODE = "eu.etaxonomy.taxeditor.store";
+ private final static String STORE_PREFERENCES_NODE = "eu.etaxonomy.taxeditor.store"; //$NON-NLS-1$
- private final static String LOGIN_NODE = "login";
- private final static String USERNAME_SUFFIX = "_username";
- private final static String PASSWORD_SUFFIX = "_password";
+ private final static String LOGIN_NODE = "login"; //$NON-NLS-1$
+ private final static String USERNAME_SUFFIX = "_username"; //$NON-NLS-1$
+ private final static String PASSWORD_SUFFIX = "_password"; //$NON-NLS-1$
- private final static String LAST_SERVER_INSTANCE_NODE = "lastServerInstance";
- private final static String LAST_SERVER_KEY = "lastServerKey";
- private final static String LAST_INSTANCE_KEY = "lastInstanceKey";
+ private final static String LAST_SERVER_INSTANCE_NODE = "lastServerInstance"; //$NON-NLS-1$
+ private final static String LAST_SERVER_KEY = "lastServerKey"; //$NON-NLS-1$
+ private final static String LAST_INSTANCE_KEY = "lastInstanceKey"; //$NON-NLS-1$
- private final static String REFRESH_LABEL = "Refresh";
+ private final static String REFRESH_LABEL = ""; //$NON-NLS-1$
private Composite remotingComposite;
private CdmServerInfo selectedCsii;
@@ -161,14 +163,14 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
*/
public RemotingLoginDialog(Shell parent, int style) {
super(parent, style);
- setText("Login");
+ setText(""); //$NON-NLS-1$
}
public Object open(CdmRemoteSource source, boolean loadLoginPrefs, boolean autoConnect) {
this.loadLoginPrefs = loadLoginPrefs;
this.serverName = source.getName();
String contextPath = source.getContextPath();
- this.instanceName = contextPath.substring(contextPath.lastIndexOf("/") + 1);
+ this.instanceName = contextPath.substring(contextPath.lastIndexOf("/") + 1); //$NON-NLS-1$
return open(serverName, instanceName, loadLoginPrefs, autoConnect);
}
@@ -217,7 +219,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
shlConnect = new Shell(getParent(), SWT.DIALOG_TRIM);
shlConnect.setMinimumSize(new Point(MIN_WIDTH, MIN_HEIGHT));
shlConnect.setSize(MIN_WIDTH, MIN_HEIGHT);
- shlConnect.setText("Connect");
+ shlConnect.setText(""); //$NON-NLS-1$
shlConnect.setLayout(new FillLayout(SWT.HORIZONTAL));
remotingComposite = new Composite(shlConnect, SWT.NONE);
@@ -230,8 +232,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
cdmServerComposite.setLayout(new GridLayout(4, false));
Label lblCdmServer = new Label(cdmServerComposite, SWT.NONE);
- lblCdmServer.setText("CDM Server : ");
- lblCdmServer.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblCdmServer.setText(""); //$NON-NLS-1$
+ lblCdmServer.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
lblCdmServer.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
comboCdmServer = new Combo(cdmServerComposite, SWT.READ_ONLY);
@@ -262,14 +264,14 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
});
btnCdmServerRefresh.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
- btnCdmServerRefresh.setText("Refresh");
+ btnCdmServerRefresh.setText(""); //$NON-NLS-1$
Label lblCdmInstance = new Label(cdmServerComposite, SWT.NONE);
GridData gd_lblCdmInstance = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblCdmInstance.heightHint = 30;
lblCdmInstance.setLayoutData(gd_lblCdmInstance);
- lblCdmInstance.setText("CDM Instance : ");
- lblCdmInstance.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblCdmInstance.setText(""); //$NON-NLS-1$
+ lblCdmInstance.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
comboCdmInstance = new Combo(cdmServerComposite, SWT.READ_ONLY);
comboCdmInstance.addSelectionListener(new SelectionAdapter() {
@@ -301,7 +303,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
gd_btnCdmInstanceRefresh.widthHint = 110;
gd_btnCdmInstanceRefresh.heightHint = 30;
btnCdmInstanceRefresh.setLayoutData(gd_btnCdmInstanceRefresh);
- btnCdmInstanceRefresh.setText("Refresh");
+ btnCdmInstanceRefresh.setText(""); //$NON-NLS-1$
loginComposite = new Composite(remotingComposite, SWT.NONE);
GridData gd_loginComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
@@ -316,8 +318,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
GridData gd_lblLogin = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblLogin.widthHint = 50;
lblLogin.setLayoutData(gd_lblLogin);
- lblLogin.setText("Login : ");
- lblLogin.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblLogin.setText(""); //$NON-NLS-1$
+ lblLogin.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtLogin = new Text(loginComposite, SWT.BORDER);
GridData gd_txtLogin = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
@@ -328,8 +330,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
lblPassword = new Label(loginComposite, SWT.CENTER);
lblPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblPassword.setText("Password : ");
- lblPassword.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblPassword.setText(""); //$NON-NLS-1$
+ lblPassword.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtPassword = new Text(loginComposite, SWT.BORDER | SWT.PASSWORD);
GridData gd_txtPassword = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
@@ -351,14 +353,14 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
}
});
- btnConnect.setText("Connect");
+ btnConnect.setText(""); //$NON-NLS-1$
btnRememberMe = new Button(loginComposite, SWT.CHECK);
btnRememberMe.setSelection(true);
GridData gd_btnRememberMe = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_btnRememberMe.widthHint = 107;
btnRememberMe.setLayoutData(gd_btnRememberMe);
- btnRememberMe.setText("Remember Me");
+ btnRememberMe.setText(""); //$NON-NLS-1$
new Label(loginComposite, SWT.NONE);
new Label(loginComposite, SWT.NONE);
new Label(loginComposite, SWT.NONE);
@@ -367,7 +369,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
styledTxtMessage = new StyledText(remotingComposite, SWT.NONE);
styledTxtMessage.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
styledTxtMessage.setForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
- styledTxtMessage.setFont(SWTResourceManager.getFont("Ubuntu", 12, SWT.BOLD));
+ styledTxtMessage.setFont(SWTResourceManager.getFont(UBUNTU, 12, SWT.BOLD));
styledTxtMessage.setSelectionBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_SELECTION_TEXT));
styledTxtMessage.setSelectionForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
styledTxtMessage.setDoubleClickEnabled(false);
@@ -397,7 +399,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
public void expansionStateChanging(ExpansionEvent e) {
}
});
- xpndblcmpstAdvanced.setText("advanced");
+ xpndblcmpstAdvanced.setText(""); //$NON-NLS-1$
xpndblcmpstAdvanced.setExpanded(true);
compAdvanced = new Composite(xpndblcmpstAdvanced, SWT.NONE);
@@ -407,8 +409,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
lblPort = new Label(compAdvanced, SWT.CENTER);
lblPort.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblPort.setSize(0, 0);
- lblPort.setText("Port : ");
- lblPort.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblPort.setText(""); //$NON-NLS-1$
+ lblPort.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtPort = new Text(compAdvanced, SWT.BORDER);
GridData gd_txtPort = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
@@ -418,8 +420,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
lblServerVersion = new Label(compAdvanced, SWT.CENTER);
lblServerVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblServerVersion.setText("Server Cdmlib Version :");
- lblServerVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblServerVersion.setText(""); //$NON-NLS-1$
+ lblServerVersion.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtServerVersion = new Text(compAdvanced, SWT.BORDER);
txtServerVersion.setEditable(false);
@@ -432,12 +434,12 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
stopManagedServer();
}
});
- btnStopServer.setText("Stop Managed Server");
+ btnStopServer.setText(""); //$NON-NLS-1$
lblEditorVersion = new Label(compAdvanced, SWT.CENTER);
lblEditorVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblEditorVersion.setText("Editor Cdmlib Version :");
- lblEditorVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblEditorVersion.setText(""); //$NON-NLS-1$
+ lblEditorVersion.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtEditorVersion = new Text(compAdvanced, SWT.BORDER);
txtEditorVersion.setEditable(false);
@@ -447,8 +449,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
lblServerCDMVersion = new Label(compAdvanced, SWT.CENTER);
lblServerCDMVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblServerCDMVersion.setText("Server CDM Version :");
- lblServerCDMVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblServerCDMVersion.setText(""); //$NON-NLS-1$
+ lblServerCDMVersion.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtServerCDMVersion = new Text(compAdvanced, SWT.BORDER);
txtServerCDMVersion.setEditable(false);
@@ -458,8 +460,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
lblEditorCDMVersion = new Label(compAdvanced, SWT.CENTER);
lblEditorCDMVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblEditorCDMVersion.setText("Editor CDM Version :");
- lblEditorCDMVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+ lblEditorCDMVersion.setText(""); //$NON-NLS-1$
+ lblEditorCDMVersion.setFont(SWTResourceManager.getFont(UBUNTU, 9, SWT.NORMAL));
txtEditorCDMVersion = new Text(compAdvanced, SWT.BORDER);
txtEditorCDMVersion.setEditable(false);
@@ -470,7 +472,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
private void populateCdmServerCombo() {
- Job job = new Job("Retrieve Server Instances") {
+ Job job = new Job("") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
Display.getDefault().syncExec(new Runnable() {
@@ -493,8 +495,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
CdmRemoteSource devRemoteSource = CdmServerInfo.getDevServerRemoteSource();
if(devRemoteSource != null) {
isDevRemoteSource = true;
- String username = System.getProperty("cdm.server.dev.username");
- String password = System.getProperty("cdm.server.dev.password");
+ String username = System.getProperty("cdm.server.dev.username"); //$NON-NLS-1$
+ String password = System.getProperty("cdm.server.dev.password"); //$NON-NLS-1$
if(username != null && !username.isEmpty() && password != null && !password.isEmpty()) {
txtLogin.setText(username);
txtPassword.setText(password);
@@ -534,7 +536,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
private void updatePort() {
- txtPort.setText("");
+ txtPort.setText(""); //$NON-NLS-1$
if(selectedCsii != null) {
int port = selectedCsii.getPort();
if(port == CdmServerInfo.NULL_PORT) {
@@ -551,7 +553,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
port = Integer.valueOf(txtPort.getText());
} catch (NumberFormatException nfe) {
if(!CdmServerInfo.NULL_PORT_STRING.equals(txtPort.getText())) {
- setMessage("Port should be an integer");
+ setMessage(""); //$NON-NLS-1$
}
}
return port;
@@ -567,11 +569,11 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
txtCdmServerStatus.setText(STATUS_AVAILABLE);
populateCdmInstanceCombo(true);
String serverVersionTimestamp = generateLastModifiedTooltip(selectedCsii.getCdmlibLastModified());
- txtServerVersion.setText(selectedCsii.getCdmlibServicesVersion() + ":" + serverVersionTimestamp);
+ txtServerVersion.setText(selectedCsii.getCdmlibServicesVersion() + ":" + serverVersionTimestamp); //$NON-NLS-1$
} else {
txtCdmServerStatus.setText(STATUS_NOT_AVAILABLE);
comboCdmInstance.removeAll();
- disableCdmInstanceControls("", "");
+ disableCdmInstanceControls("", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
updatePort();
@@ -583,9 +585,9 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
comboCdmInstance.setEnabled(false);
btnConnect.setEnabled(false);
txtCdmInstanceStatus.setText(STATUS_RETRIEVING);
- txtCdmInstanceStatus.setToolTipText("");
+ txtCdmInstanceStatus.setToolTipText(""); //$NON-NLS-1$
- serverJob = new Job("Retrieve Server Instances") {
+ serverJob = new Job("") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
@@ -715,21 +717,21 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
- Job job = new Job("Managed CDM Server Launch") {
+ Job job = new Job(Messages.RemotingLoginDialog_JOB_SERVER_LAUNCH) {
@Override
public IStatus run(IProgressMonitor monitor) {
- String mgdServerConfigFileName = "mgd.datasources.xml";
+ String mgdServerConfigFileName = "mgd.datasources.xml"; //$NON-NLS-1$
String config = CDMServerUtils.convertEditorToServerConfig();
File managedServerConfigFile;
int maxUnits = 50;
- monitor.beginTask("Launching Managed CDM Server", maxUnits);
+ monitor.beginTask(Messages.RemotingLoginDialog_TASK_LAUNCHING_SERVER, maxUnits);
try {
- monitor.subTask("Generating datasources config file for " + selectedCdmInstance.getName());
+ monitor.subTask(String.format(Messages.RemotingLoginDialog_GENERATING_CONFIG_FILE, selectedCdmInstance.getName()));
managedServerConfigFile = CDMServerUtils.writeManagedServerConfig(config, mgdServerConfigFileName);
monitor.worked(1);
CdmStore.setManagedServer(new CDMServer(selectedCdmInstance.getName(), managedServerConfigFile));
- monitor.subTask("Starting Managed CDM Server. This may take a while.");
+ monitor.subTask(Messages.RemotingLoginDialog_STARTING_MGD_SERVER);
CdmStore.getManagedServer().start(false, RemotingLoginDialog.this);
int serverUnits = 0;
@@ -754,14 +756,14 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
});
} catch (IOException ioe) {
- MessagingUtils.errorDialog("Error generating server config file",
+ MessagingUtils.errorDialog(Messages.RemotingLoginDialog_ERROR_GENERATING_CONFIG_FILE,
this,
ioe.getMessage(),
TaxeditorStorePlugin.PLUGIN_ID,
ioe,
true);
} catch (CDMEmbeddedServerException cse) {
- MessagingUtils.errorDialog("Error starting managed server",
+ MessagingUtils.errorDialog(Messages.RemotingLoginDialog_ERROR_STARTING_SERVER,
this,
cse.getMessage(),
TaxeditorStorePlugin.PLUGIN_ID,
@@ -786,9 +788,9 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
try {
CdmStore.getManagedServer().stop();
} catch (Exception e) {
- MessagingUtils.errorDialog("Error stopping managed server",
+ MessagingUtils.errorDialog(Messages.RemotingLoginDialog_ERROR_STOPPING_SERVER,
this,
- "Could not stop managed server running at port " + CdmStore.getManagedServer().getPort() + ". Please stop it manually",
+ String.format(Messages.RemotingLoginDialog_COULD_NOT_STOP_SERVER, CdmStore.getManagedServer().getPort()),
TaxeditorStorePlugin.PLUGIN_ID,
e,
true);
@@ -836,7 +838,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
} else {
status = STATUS_AVAILABLE;
available = true;
- message = "";
+ message = ""; //$NON-NLS-1$
}
}
} catch (Exception e) {
@@ -909,9 +911,9 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
String username, password;
IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
Preferences credentialsPrefs = preferences.node(LOGIN_NODE);
- username = credentialsPrefs.get(getUsernamePrefKey(), "");
+ username = credentialsPrefs.get(getUsernamePrefKey(), ""); //$NON-NLS-1$
txtLogin.setText(username);
- password = credentialsPrefs.get(getPasswordPrefKey(),"");
+ password = credentialsPrefs.get(getPasswordPrefKey(),""); //$NON-NLS-1$
txtPassword.setText(password);
if(username.isEmpty() || password.isEmpty()) {
autoConnect = false;
@@ -927,8 +929,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
}
private void emptyCredentials() {
- txtLogin.setText("");
- txtPassword.setText("");
+ txtLogin.setText(""); //$NON-NLS-1$
+ txtPassword.setText(""); //$NON-NLS-1$
}
private String getUsernamePrefKey() {
@@ -941,11 +943,11 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
private boolean validateLogin(ICdmRemoteSource remoteSource) {
if(getUsername() == null || getUsername().isEmpty()) {
- setMessage("User login cannot be empty");
+ setMessage(""); //$NON-NLS-1$
return false;
}
if(getPassword() == null || getPassword().isEmpty()) {
- setMessage("Password cannot be empty");
+ setMessage(""); //$NON-NLS-1$
return false;
}
@@ -979,7 +981,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
if(message != null && !message.isEmpty()) {
if(message.length() > 60) {
styledTxtMessage.setToolTipText(message);
- message = message.substring(0, 60) + "...";
+ message = message.substring(0, 60) + "..."; //$NON-NLS-1$
}
styledTxtMessage.setText(message);
styledTxtMessage.setVisible(true);
@@ -987,7 +989,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
shlConnect.setSize(MIN_WIDTH, getHeightWithoutMessage() + MESSAGE_HEIGHT);
shlConnect.setMinimumSize(MIN_WIDTH, getHeightWithoutMessage() + MESSAGE_HEIGHT);
} else {
- styledTxtMessage.setText("");
+ styledTxtMessage.setText(""); //$NON-NLS-1$
styledTxtMessage.setVisible(false);
((GridData)styledTxtMessage.getLayoutData()).exclude = true;
shlConnect.setSize(MIN_WIDTH, getHeightWithoutMessage());
@@ -1033,11 +1035,11 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
private String generateLastModifiedTooltip(String cdmlibLastModified) {
if(StringUtils.isBlank(cdmlibLastModified)) {
- return "";
+ return ""; //$NON-NLS-1$
}
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd.HH.mm.z");
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd.HH.mm.z"); //$NON-NLS-1$
Date cdmlibLastModifiedDate;
- String cdmlibLastModifiedTimestamp = "";
+ String cdmlibLastModifiedTimestamp = ""; //$NON-NLS-1$
cdmlibLastModifiedDate = new Date(Long.valueOf(cdmlibLastModified));
cdmlibLastModifiedTimestamp = sdf.format(cdmlibLastModifiedDate);
@@ -1048,24 +1050,24 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
private void setEditorInfo() {
txtEditorCDMVersion.setText(CdmMetaData.getDbSchemaVersion());
String editorVersionTimestamp = generateLastModifiedTooltip(CdmApplicationState.getCdmlibLastModified());
- txtEditorVersion.setText(CdmApplicationState.getCdmlibVersion() + ":" + editorVersionTimestamp);
+ txtEditorVersion.setText(CdmApplicationState.getCdmlibVersion() + ":" + editorVersionTimestamp); //$NON-NLS-1$
}
private void clearOnServerChange() {
- setMessage("");
- txtServerCDMVersion.setText("");
- txtServerVersion.setText("");
- txtServerVersion.setToolTipText("");
- txtServerCDMVersion.setText("");
+ setMessage(""); //$NON-NLS-1$
+ txtServerCDMVersion.setText(""); //$NON-NLS-1$
+ txtServerVersion.setText(""); //$NON-NLS-1$
+ txtServerVersion.setToolTipText(""); //$NON-NLS-1$
+ txtServerCDMVersion.setText(""); //$NON-NLS-1$
comboCdmInstance.removeAll();
- txtCdmInstanceStatus.setText("");
+ txtCdmInstanceStatus.setText(""); //$NON-NLS-1$
txtPort.setEditable(false);
txtPort.setEnabled(false);
}
private void clearOnInstanceChange() {
- setMessage("");
- txtServerCDMVersion.setText("");
+ setMessage(""); //$NON-NLS-1$
+ txtServerCDMVersion.setText(""); //$NON-NLS-1$
}
/**
@@ -1079,7 +1081,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
public void run() {
serverJob.cancel();
- String title = "CDM Server launch error";
+ String title = ""; //$NON-NLS-1$
String message = t.getMessage();