diff options
author | rsuen | 2007-04-17 12:10:08 +0000 |
---|---|---|
committer | rsuen | 2007-04-17 12:10:08 +0000 |
commit | 89c67dab52e15e85d122802f0e928ead5a464ac0 (patch) | |
tree | 5856521e3acd9bf2397d6326d0a294290d557d05 /providers/bundles/org.eclipse.ecf.provider.msn.ui | |
parent | 801756c043b9d739e79bf13345b31609a3951420 (diff) | |
download | org.eclipse.ecf-89c67dab52e15e85d122802f0e928ead5a464ac0.tar.gz org.eclipse.ecf-89c67dab52e15e85d122802f0e928ead5a464ac0.tar.xz org.eclipse.ecf-89c67dab52e15e85d122802f0e928ead5a464ac0.zip |
Externalize strings.
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.msn.ui')
6 files changed, 68 insertions, 16 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.properties b/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.properties index e94245ce1..3f22bbae0 100644 --- a/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.properties +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.properties @@ -11,3 +11,5 @@ pluginName = ECF MSN Provider UI providerName = Eclipse.org + +wizardLabel = MSN diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.xml index 6e56cd100..ead4f11ac 100644 --- a/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.xml +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/plugin.xml @@ -7,7 +7,7 @@ class="org.eclipse.ecf.internal.provider.msn.ui.MSNConnectWizard" containerFactoryName="ecf.msn.gokigenyou" id="org.eclipse.ecf.provider.ui.msn.connectWizard" - name="MSN"/> + name="%wizardLabel"/> </extension> </plugin> diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizard.java index 458b3cf3a..a03caf681 100644 --- a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizard.java +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizard.java @@ -155,8 +155,8 @@ public class MSNConnectWizard extends Wizard implements IConnectWizard { } catch (IDCreateException e) { new ContainerConnectErrorDialog(workbench .getActiveWorkbenchWindow().getShell(), 1, - "The target ID to connect to could not be created", - targetID.getName(), e).open(); + Messages.MSNConnectWizard_CannotCreateTargetID, page + .getEmail(), e).open(); return true; } @@ -197,9 +197,8 @@ public class MSNConnectWizard extends Wizard implements IConnectWizard { public void run() { new ContainerConnectErrorDialog(workbench .getActiveWorkbenchWindow() - .getShell(), 1, "See Details", - targetID.getName(), exception) - .open(); + .getShell(), 1, null, targetID + .getName(), exception).open(); } }); } diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizardPage.java index fd99b9219..6588dd7db 100644 --- a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizardPage.java +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/MSNConnectWizardPage.java @@ -27,8 +27,8 @@ final class MSNConnectWizardPage extends WizardPage { private Text passwordText; MSNConnectWizardPage() { - super(""); - setTitle("MSN Connection Wizard"); + super(MSNConnectWizardPage.class.getName()); + setTitle(Messages.MSNConnectWizardPage_Title); setPageComplete(false); } @@ -37,11 +37,11 @@ final class MSNConnectWizardPage extends WizardPage { public void modifyText(ModifyEvent e) { String email = emailText.getText().trim(); if (email.equals("")) { //$NON-NLS-1$ - setErrorMessage("An e-mail address must be entered."); + setErrorMessage(Messages.MSNConnectWizardPage_EmailAddressRequired); } else if (email.indexOf('@') == -1) { - setErrorMessage("A valid e-mail address must be entered."); + setErrorMessage(Messages.MSNConnectWizardPage_EmailAddressInvalid); } else if (passwordText.getText().trim().equals("")) { //$NON-NLS-1$ - setErrorMessage("A password must be entered."); + setErrorMessage(Messages.MSNConnectWizardPage_PasswordRequired); } else { setErrorMessage(null); } @@ -58,27 +58,27 @@ final class MSNConnectWizardPage extends WizardPage { GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false); Label label = new Label(parent, SWT.LEFT); - label.setText("E-mail address:"); + label.setText(Messages.MSNConnectWizardPage_EmailAddressLabel); emailText = new Text(parent, SWT.SINGLE | SWT.BORDER); emailText.setLayoutData(data); label = new Label(parent, SWT.LEFT); - label.setText("Password:"); + label.setText(Messages.MSNConnectWizardPage_PasswordLabel); passwordText = new Text(parent, SWT.SINGLE | SWT.PASSWORD | SWT.BORDER); passwordText.setLayoutData(data); addListeners(); setControl(parent); } - + String getEmail() { return emailText.getText(); } - + String getPassword() { return passwordText.getText(); } - + public void setErrorMessage(String message) { super.setErrorMessage(message); setPageComplete(message == null); diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/Messages.java b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/Messages.java new file mode 100644 index 000000000..01bd98a87 --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/Messages.java @@ -0,0 +1,32 @@ +/**************************************************************************** + * Copyright (c) 2007 Remy Suen 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: + * Remy Suen <remy.suen@gmail.com> - initial API and implementation + *****************************************************************************/ +package org.eclipse.ecf.internal.provider.msn.ui; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.msn.ui.messages"; //$NON-NLS-1$ + + public static String MSNConnectWizard_CannotCreateTargetID; + + public static String MSNConnectWizardPage_Title; + public static String MSNConnectWizardPage_EmailAddressRequired; + public static String MSNConnectWizardPage_EmailAddressInvalid; + public static String MSNConnectWizardPage_PasswordRequired; + public static String MSNConnectWizardPage_EmailAddressLabel; + public static String MSNConnectWizardPage_PasswordLabel; + + static { + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + +} diff --git a/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/messages.properties b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/messages.properties new file mode 100644 index 000000000..7bb66be26 --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.msn.ui/src/org/eclipse/ecf/internal/provider/msn/ui/messages.properties @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2007 Remy Suen 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: +# Remy Suen <remy.suen@gmail.com> - initial API and implementation +################################################################################ + +MSNConnectWizard_CannotCreateTargetID = The target ID for connecting could not be created + +MSNConnectWizardPage_Title = MSN Connection Wizard +MSNConnectWizardPage_EmailAddressRequired = An e-mail address must be entered +MSNConnectWizardPage_EmailAddressInvalid = A valid e-mail address must be entered +MSNConnectWizardPage_PasswordRequired = A password must be entered +MSNConnectWizardPage_EmailAddressLabel = E-mail: +MSNConnectWizardPage_PasswordLabel = Password:
\ No newline at end of file |