Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Activator.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java36
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPCompoundContributionItem.java15
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java25
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizardPage.java14
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPSConnectWizardPage.java12
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties24
7 files changed, 93 insertions, 35 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Activator.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Activator.java
index b779243c4..acfd88d00 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Activator.java
@@ -9,7 +9,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.ecf.provider.xmpp.ui";
+ public static final String PLUGIN_ID = "org.eclipse.ecf.provider.xmpp.ui"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java
new file mode 100644
index 000000000..298934e55
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java
@@ -0,0 +1,36 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.internal.provider.xmpp.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ *
+ */
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.xmpp.ui.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPCompoundContributionItem.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPCompoundContributionItem.java
index a65a3656d..1ae41894d 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPCompoundContributionItem.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPCompoundContributionItem.java
@@ -10,7 +10,6 @@ import org.eclipse.ecf.filetransfer.OutgoingFileTransferException;
import org.eclipse.ecf.filetransfer.events.IFileTransferEvent;
import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent;
import org.eclipse.ecf.internal.provider.xmpp.XMPPContainer;
-import org.eclipse.ecf.internal.ui.Messages;
import org.eclipse.ecf.presence.IPresence;
import org.eclipse.ecf.presence.roster.IRosterEntry;
import org.eclipse.ecf.presence.ui.roster.AbstractRosterEntryContributionItem;
@@ -61,7 +60,7 @@ public class XMPPCompoundContributionItem extends
sendFileToTarget(ioftca, entry.getUser().getID());
}
};
- fileSendAction.setText("Send File");
+ fileSendAction.setText(Messages.getString("XMPPCompoundContributionItem.SEND_FILE")); //$NON-NLS-1$
fileSendAction.setImageDescriptor(PlatformUI.getWorkbench()
.getSharedImages().getImageDescriptor(
ISharedImages.IMG_OBJ_FILE));
@@ -78,8 +77,8 @@ public class XMPPCompoundContributionItem extends
final ID targetID) {
FileDialog fd = new FileDialog(shell, SWT.OPEN);
// XXX this should be some default path set by preferences
- fd.setFilterPath(System.getProperty("user.home"));
- fd.setText(NLS.bind(Messages.RosterView_SendFile_title, targetID
+ fd.setFilterPath(System.getProperty("user.home")); //$NON-NLS-1$
+ fd.setText(NLS.bind(Messages.getString("XMPPCompoundContributionItem.CHOOSE_FILE"), targetID //$NON-NLS-1$
.getName()));
final String res = fd.open();
if (res != null) {
@@ -100,10 +99,10 @@ public class XMPPCompoundContributionItem extends
MessageDialog
.openInformation(
shell,
- Messages.RosterView_SendFile_response_title,
+ Messages.getString("XMPPCompoundContributionItem.FILE_SEND_REFUSED_TITLE"), //$NON-NLS-1$
NLS
.bind(
- Messages.RosterView_SendFile_response_message,
+ Messages.getString("XMPPCompoundContributionItem.FILE_SEND_REFUSED_MESSAGE"), //$NON-NLS-1$
res,
targetID
.getName()));
@@ -116,10 +115,10 @@ public class XMPPCompoundContributionItem extends
MessageDialog
.openError(
shell,
- Messages.RosterView_SendFile_requestexception_title,
+ Messages.getString("XMPPCompoundContributionItem.SEND_ERROR_TITLE"), //$NON-NLS-1$
NLS
.bind(
- Messages.RosterView_SendFile_requestexception_message,
+ Messages.getString("XMPPCompoundContributionItem.SEND_ERROR_MESSAGE"), //$NON-NLS-1$
new Object[] { res,
e.getLocalizedMessage() }));
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
index 4824cc743..9e7d96df4 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
@@ -33,7 +33,6 @@ import org.eclipse.ecf.filetransfer.IOutgoingFileTransferContainerAdapter;
import org.eclipse.ecf.filetransfer.events.IFileTransferEvent;
import org.eclipse.ecf.filetransfer.events.IFileTransferRequestEvent;
import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDoneEvent;
-import org.eclipse.ecf.internal.ui.Messages;
import org.eclipse.ecf.presence.IIMMessageEvent;
import org.eclipse.ecf.presence.IIMMessageListener;
import org.eclipse.ecf.presence.IPresenceContainerAdapter;
@@ -84,19 +83,19 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
Object[] bindings = new Object[] {
username,
fileName,
- ((transferInfo.getFileSize() == -1) ? "unknown"
- : (transferInfo.getFileSize() + " bytes")),
- (transferInfo.getDescription() == null) ? "none"
+ ((transferInfo.getFileSize() == -1) ? "unknown" //$NON-NLS-1$
+ : (transferInfo.getFileSize() + " bytes")), //$NON-NLS-1$
+ (transferInfo.getDescription() == null) ? "none" //$NON-NLS-1$
: transferInfo.getDescription() };
if (MessageDialog.openQuestion(shell, NLS.bind(
- Messages.RosterView_ReceiveFile_title, username),
- NLS.bind(Messages.RosterView_ReceiveFile_message,
+ Messages.getString("XMPPConnectWizard.FILE_RECEIVE_TITLE"), username), //$NON-NLS-1$
+ NLS.bind(Messages.getString("XMPPConnectWizard.FILE_RECEIVE_MESSAGE"), //$NON-NLS-1$
bindings))) {
FileDialog fd = new FileDialog(shell, SWT.OPEN);
// XXX this should be some default path gotten from
// preference. For now we'll have it be the user.home
// system property
- fd.setFilterPath(System.getProperty("user.home"));
+ fd.setFilterPath(System.getProperty("user.home")); //$NON-NLS-1$
fd.setFileName(fileName);
int suffixLoc = fileName.lastIndexOf('.');
if (suffixLoc != -1) {
@@ -105,7 +104,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
fd.setFilterExtensions(new String[] { ext });
}
fd.setText(NLS.bind(
- Messages.RosterView_ReceiveFile_filesavetitle,
+ Messages.getString("XMPPConnectWizard.FILE_SAVE_TITLE"), //$NON-NLS-1$
username));
final String res = fd.open();
if (res == null)
@@ -120,8 +119,8 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
// XXX Should have some some UI
// for transfer events
System.out
- .println("handleTransferEvent("
- + event + ")");
+ .println("handleTransferEvent(" //$NON-NLS-1$
+ + event + ")"); //$NON-NLS-1$
if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
try {
fos.close();
@@ -134,10 +133,10 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
MessageDialog
.openError(
shell,
- Messages.RosterView_ReceiveFile_acceptexception_title,
+ Messages.getString("XMPPConnectWizard.RECEIVE_ERROR_TITLE"), //$NON-NLS-1$
NLS
.bind(
- Messages.RosterView_ReceiveFile_acceptexception_message,
+ Messages.getString("XMPPConnectWizard.RECEIVE_ERROR_MESSAGE"), //$NON-NLS-1$
new Object[] {
fileName,
username,
@@ -288,7 +287,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
public void run() {
new ContainerConnectErrorDialog(workbench
.getActiveWorkbenchWindow()
- .getShell(), 1, "See Details",
+ .getShell(), 1, Messages.getString("XMPPConnectWizard.SEE_DETAILS"), //$NON-NLS-1$
targetID.getName(), exception)
.open();
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizardPage.java
index fbfacce65..5653047f8 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizardPage.java
@@ -27,9 +27,9 @@ public class XMPPConnectWizardPage extends WizardPage {
Text passwordText;
XMPPConnectWizardPage() {
- super("");
- setTitle("XMPP Connection Wizard");
- setDescription("Specify a XMPP account to connect to.");
+ super(""); //$NON-NLS-1$
+ setTitle(Messages.getString("XMPPConnectWizardPage.WIZARD_TITLE")); //$NON-NLS-1$
+ setDescription(Messages.getString("XMPPConnectWizardPage.WIZARD_DESCRIPTION")); //$NON-NLS-1$
setPageComplete(false);
}
@@ -39,7 +39,7 @@ public class XMPPConnectWizardPage extends WizardPage {
GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
Label label = new Label(parent, SWT.LEFT);
- label.setText("User ID:");
+ label.setText(Messages.getString("XMPPConnectWizardPage.LABEL_USERID")); //$NON-NLS-1$
connectText = new Text(parent, SWT.SINGLE | SWT.BORDER);
connectText.setLayoutData(fillData);
@@ -48,17 +48,17 @@ public class XMPPConnectWizardPage extends WizardPage {
if (!connectText.getText().equals("")) { //$NON-NLS-1$
updateStatus(null);
} else {
- updateStatus("An connect ID must be specified.");
+ updateStatus(Messages.getString("XMPPConnectWizardPage.WIZARD_STATUS")); //$NON-NLS-1$
}
}
});
label = new Label(parent, SWT.RIGHT);
- label.setText("<user>@<xmppserver>[:port]");
+ label.setText(Messages.getString("XMPPConnectWizardPage.USERID_TEMPLATE")); //$NON-NLS-1$
label.setLayoutData(endData);
label = new Label(parent, SWT.LEFT);
- label.setText("Password:");
+ label.setText(Messages.getString("XMPPConnectWizardPage.WIZARD_PASSWORD")); //$NON-NLS-1$
passwordText = new Text(parent, SWT.SINGLE | SWT.PASSWORD | SWT.BORDER);
passwordText.setLayoutData(fillData);
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPSConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPSConnectWizardPage.java
index caa01a3f5..9a37d6c97 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPSConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPSConnectWizardPage.java
@@ -23,8 +23,8 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage {
XMPPSConnectWizardPage() {
super();
- setTitle("XMPPS Connection Wizard");
- setDescription("Specify a XMPP account to connect to.");
+ setTitle(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_TITLE")); //$NON-NLS-1$
+ setDescription(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_DESCRIPTION")); //$NON-NLS-1$
setPageComplete(false);
}
@@ -34,7 +34,7 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage {
GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
Label label = new Label(parent, SWT.LEFT);
- label.setText("User ID:");
+ label.setText(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_USERID")); //$NON-NLS-1$
connectText = new Text(parent, SWT.SINGLE | SWT.BORDER);
connectText.setLayoutData(fillData);
@@ -43,17 +43,17 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage {
if (!connectText.getText().equals("")) { //$NON-NLS-1$
updateStatus(null);
} else {
- updateStatus("An connect ID must be specified.");
+ updateStatus(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_STATUS")); //$NON-NLS-1$
}
}
});
label = new Label(parent, SWT.RIGHT);
- label.setText("<user>@<xmppserver>[:port]");
+ label.setText(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_TEMPLATE")); //$NON-NLS-1$
label.setLayoutData(endData);
label = new Label(parent, SWT.LEFT);
- label.setText("Password:");
+ label.setText(Messages.getString("XMPPSConnectWizardPage.WIZARD_PAGE_PASSWORD")); //$NON-NLS-1$
passwordText = new Text(parent, SWT.SINGLE | SWT.PASSWORD | SWT.BORDER);
passwordText.setLayoutData(fillData);
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties
new file mode 100644
index 000000000..dbfc93f55
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties
@@ -0,0 +1,24 @@
+XMPPConnectWizardPage.WIZARD_TITLE=XMPP Connection Wizard
+XMPPConnectWizardPage.WIZARD_DESCRIPTION=Specify a XMPP account to connect to.
+XMPPCompoundContributionItem.CHOOSE_FILE=Choose File For {0}
+XMPPConnectWizard.RECEIVE_ERROR_MESSAGE=Error receiving file {0} from {1}. Error: {2}
+XMPPSConnectWizardPage.WIZARD_PAGE_TITLE=XMPPS Connection Wizard
+XMPPSConnectWizardPage.WIZARD_PAGE_USERID=User ID:
+XMPPSConnectWizardPage.WIZARD_PAGE_STATUS=An connect ID must be specified.
+XMPPConnectWizardPage.LABEL_USERID=User ID:
+XMPPConnectWizard.FILE_SAVE_TITLE=Save File From {0}
+XMPPConnectWizard.SEE_DETAILS=See Details
+XMPPConnectWizardPage.WIZARD_STATUS=An connect ID must be specified.
+XMPPConnectWizardPage.USERID_TEMPLATE=<user>@<xmppserver>[:port]
+XMPPConnectWizardPage.WIZARD_PASSWORD=Password:
+XMPPConnectWizard.FILE_RECEIVE_TITLE=File Receive Request From {0}
+XMPPConnectWizard.FILE_RECEIVE_MESSAGE=User {0} would like to send you a file called {1}\n\nThe size of the file is {2}\nDescription: {3}\n\nDo you want to receive this file?
+XMPPCompoundContributionItem.SEND_FILE=Send File
+XMPPConnectWizard.RECEIVE_ERROR_TITLE=Receive Error
+XMPPSConnectWizardPage.WIZARD_PAGE_DESCRIPTION=Specify a XMPP account to connect to.
+XMPPCompoundContributionItem.SEND_ERROR_TITLE=Send Error
+XMPPCompoundContributionItem.SEND_ERROR_MESSAGE=Error sending file {0}. Error: {1}
+XMPPSConnectWizardPage.WIZARD_PAGE_TEMPLATE=<user>@<xmppserver>[:port]
+XMPPSConnectWizardPage.WIZARD_PAGE_PASSWORD=Password:
+XMPPCompoundContributionItem.FILE_SEND_REFUSED_TITLE=File Send Refused
+XMPPCompoundContributionItem.FILE_SEND_REFUSED_MESSAGE=Send of {0} refused by {1}

Back to the top