Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2009-05-20 19:24:20 +0000
committerVictor Roldan Betancort2009-05-20 19:24:20 +0000
commit8fa5aebdac03f0ecf8b959397ca291a603dbd9a2 (patch)
treeced49948f50905fc9ed77e561d6553a706272d79
parenta4a7bc418b553e0d1092caffd574787b592d4f90 (diff)
downloadcdo-8fa5aebdac03f0ecf8b959397ca291a603dbd9a2.tar.gz
cdo-8fa5aebdac03f0ecf8b959397ca291a603dbd9a2.tar.xz
cdo-8fa5aebdac03f0ecf8b959397ca291a603dbd9a2.zip
[272193] [UI] Externalize Strings (Net4j)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272193
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/plugin.xml2
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/ChatPane.java9
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/SharedIcons.java18
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/messages.properties14
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/MembershipKey.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolConstants.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolUtil.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ClientFacilityFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/Message.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ServerFacilityFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerBuddy.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/messages.properties11
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/server/ServerConstants.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/plugin.properties6
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/plugin.xml10
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/AbstractItemProvider.java5
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SharedIcons.java22
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ConnectAction.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/DisconnectAction.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/FlashAction.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ReconnectAction.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/StateAction.java15
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/bundle/OM.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/dnd/BuddiesTransfer.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/messages.properties37
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/preferences/BuddiesPreferencePage.java9
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientBuddy.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/SessionManager.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/bundle/OM.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.examples/plugin.properties5
-rw-r--r--plugins/org.eclipse.net4j.examples/plugin.xml8
48 files changed, 309 insertions, 91 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.properties b/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.properties
index 1a645cc6dc..9fb0fe9aef 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.properties
@@ -23,3 +23,5 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+extension-point.name = Hibernate Mapping Provider Factories \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.xml b/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.xml
index 5222ea9ece..e00467c5a6 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/plugin.xml
@@ -13,7 +13,7 @@
<plugin>
- <extension-point id="mappingProviderFactories" name="Hibernate Mapping Provider Factories" schema="schema/mappingProviderFactories.exsd"/>
+ <extension-point id="mappingProviderFactories" name="%extension-point.name" schema="schema/mappingProviderFactories.exsd"/>
<extension
point="org.eclipse.emf.cdo.server.storeFactories">
diff --git a/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/ChatPane.java b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/ChatPane.java
index 993fb39300..585701c56b 100644
--- a/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/ChatPane.java
+++ b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/ChatPane.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.buddies.chat.internal.ui;
import org.eclipse.net4j.buddies.chat.IChat;
import org.eclipse.net4j.buddies.chat.IComment;
+import org.eclipse.net4j.buddies.chat.internal.ui.messages.Messages;
import org.eclipse.net4j.buddies.internal.chat.CommentEvent;
import org.eclipse.net4j.buddies.internal.ui.views.CollaborationsPane;
import org.eclipse.net4j.buddies.internal.ui.views.FacilityPane;
@@ -52,7 +53,7 @@ public class ChatPane extends FacilityPane
CommentEvent e = (CommentEvent)event;
IComment comment = e.getComment();
String text = comment.getText();
- output.append(comment.getSenderID() + ": " + text + StringUtil.NL);
+ output.append(comment.getSenderID() + ": " + text + StringUtil.NL); //$NON-NLS-1$
}
}
@@ -80,7 +81,7 @@ public class ChatPane extends FacilityPane
if ((e.character == SWT.CR || e.character == SWT.LF) && e.stateMask == 0)
{
((IChat)getFacility()).sendComment(input.getText());
- input.setText("");
+ input.setText(""); //$NON-NLS-1$
e.doit = false;
}
}
@@ -97,7 +98,7 @@ public class ChatPane extends FacilityPane
@Override
protected void fillCoolBar(IContributionManager manager)
{
- manager.add(new SafeAction("Vertical Layout", "Vertical Layout", SharedIcons
+ manager.add(new SafeAction(Messages.getString("ChatPane.2"), Messages.getString("ChatPane.3"), SharedIcons //$NON-NLS-1$ //$NON-NLS-2$
.getDescriptor(SharedIcons.ETOOL_VERTICAL))
{
@Override
@@ -107,7 +108,7 @@ public class ChatPane extends FacilityPane
}
});
- manager.add(new SafeAction("Horizontal Layout", "Horizontal Layout", SharedIcons
+ manager.add(new SafeAction(Messages.getString("ChatPane.4"), Messages.getString("ChatPane.5"), SharedIcons //$NON-NLS-1$ //$NON-NLS-2$
.getDescriptor(SharedIcons.ETOOL_HORIZONTAL))
{
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/SharedIcons.java b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/SharedIcons.java
index 8e02bcd8ab..e304961f3a 100644
--- a/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/SharedIcons.java
+++ b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/SharedIcons.java
@@ -25,21 +25,21 @@ public class SharedIcons
{
private static final ImageRegistry REGISTRY = new ImageRegistry(getDisplay());
- private static final String ETOOL = "etool16/";
+ private static final String ETOOL = "etool16/"; //$NON-NLS-1$
- private static final String OBJ = "obj16/";
+ private static final String OBJ = "obj16/"; //$NON-NLS-1$
@SuppressWarnings("unused")
- private static final String VIEW = "view16/";
+ private static final String VIEW = "view16/"; //$NON-NLS-1$
@SuppressWarnings("unused")
- private static final String WIZBAN = "wizban/";
+ private static final String WIZBAN = "wizban/"; //$NON-NLS-1$
- public static final String OBJ_CHAT = OBJ + "chat";
+ public static final String OBJ_CHAT = OBJ + "chat"; //$NON-NLS-1$
- public static final String ETOOL_HORIZONTAL = ETOOL + "horizontal_layout";
+ public static final String ETOOL_HORIZONTAL = ETOOL + "horizontal_layout"; //$NON-NLS-1$
- public static final String ETOOL_VERTICAL = ETOOL + "vertical_layout";
+ public static final String ETOOL_VERTICAL = ETOOL + "vertical_layout"; //$NON-NLS-1$
public static Image getImage(String key)
{
@@ -87,7 +87,7 @@ public class SharedIcons
if (display == null)
{
- throw new IllegalStateException("display == null");
+ throw new IllegalStateException("display == null"); //$NON-NLS-1$
}
return display;
@@ -95,6 +95,6 @@ public class SharedIcons
private static String mangleKey(String key)
{
- return "icons/full/" + key + ".gif";
+ return "icons/full/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/Messages.java b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/Messages.java
new file mode 100644
index 0000000000..0675b1f53a
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.buddies.chat.internal.ui.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.buddies.chat.internal.ui.messages.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/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/messages.properties b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/messages.properties
new file mode 100644
index 0000000000..d32c6206a5
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.chat.ui/src/org/eclipse/net4j/buddies/chat/internal/ui/messages/messages.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+ChatPane.2=Vertical Layout
+ChatPane.3=Vertical Layout
+ChatPane.4=Horizontal Layout
+ChatPane.5=Horizontal Layout
diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java
index dd4af90803..a3b0844bab 100644
--- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java
+++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java
@@ -17,7 +17,7 @@ import org.eclipse.net4j.buddies.common.IFacility;
*/
public interface IChat extends IFacility
{
- public static final String TYPE = "chat";
+ public static final String TYPE = "chat"; //$NON-NLS-1$
public IComment[] getComments();
diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java
index a6cbd21eb8..d4f1589f9d 100644
--- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java
+++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java
@@ -18,7 +18,7 @@ import org.eclipse.net4j.util.factory.ProductCreationException;
*/
public class ChatRoomFactory extends ServerFacilityFactory
{
- public static final String TYPE = "chat";
+ public static final String TYPE = "chat"; //$NON-NLS-1$
public ChatRoomFactory()
{
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
index d4e7f846c2..8ec04b0815 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
@@ -169,7 +169,7 @@ public abstract class Buddy extends MembershipContainer implements IBuddy
@Override
public String toString()
{
- return MessageFormat.format("{0}[{1}]", getClass().getSimpleName(), getUserID());
+ return MessageFormat.format("{0}[{1}]", getClass().getSimpleName(), getUserID()); //$NON-NLS-1$
}
protected Set<String> loadFacilityTypes()
@@ -213,7 +213,7 @@ public abstract class Buddy extends MembershipContainer implements IBuddy
@Override
public String toString()
{
- return MessageFormat.format("BuddyStateEvent[source={0}, oldState={1}, newState={2}]", getSource(),
+ return MessageFormat.format("BuddyStateEvent[source={0}, oldState={1}, newState={2}]", getSource(), //$NON-NLS-1$
getOldState(), getNewState());
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
index 1648cc37bb..16cba64e5e 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
@@ -213,7 +213,7 @@ public class Collaboration extends MembershipContainer implements ICollaboration
@Override
public String toString()
{
- return MessageFormat.format("{0}[{1}]", getClass().getSimpleName(), getTitle());
+ return MessageFormat.format("{0}[{1}]", getClass().getSimpleName(), getTitle()); //$NON-NLS-1$
}
@Override
@@ -283,7 +283,7 @@ public class Collaboration extends MembershipContainer implements ICollaboration
@Override
public String toString()
{
- return MessageFormat.format("FacilityInstalledEvent[source={0}, facility={1}, remote={2}]", getSource(),
+ return MessageFormat.format("FacilityInstalledEvent[source={0}, facility={1}, remote={2}]", getSource(), //$NON-NLS-1$
facility, remote);
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/MembershipKey.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/MembershipKey.java
index 7ca521c7cb..8ed241f566 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/MembershipKey.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/MembershipKey.java
@@ -67,6 +67,6 @@ public class MembershipKey implements IMembershipKey
@Override
public String toString()
{
- return buddy + "(" + collaboration + ")";
+ return buddy + "(" + collaboration + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolConstants.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolConstants.java
index e8b55863ab..8be234828f 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolConstants.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolConstants.java
@@ -15,7 +15,7 @@ package org.eclipse.net4j.buddies.internal.common.protocol;
*/
public interface ProtocolConstants
{
- public static final String PROTOCOL_NAME = "buddies";
+ public static final String PROTOCOL_NAME = "buddies"; //$NON-NLS-1$
public static final short SIGNAL_OPEN_SESSION = 1;
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolUtil.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolUtil.java
index 1d2d927503..124fc4eff7 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolUtil.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/ProtocolUtil.java
@@ -138,7 +138,7 @@ public final class ProtocolUtil
break;
default:
- throw new IllegalArgumentException("Illegal state: " + state);
+ throw new IllegalArgumentException("Illegal state: " + state); //$NON-NLS-1$
}
}
@@ -160,7 +160,7 @@ public final class ProtocolUtil
return IBuddy.State.DO_NOT_DISTURB;
default:
- throw new IllegalArgumentException("Illegal state: " + state);
+ throw new IllegalArgumentException("Illegal state: " + state); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ClientFacilityFactory.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ClientFacilityFactory.java
index d4274744e0..8b4768918c 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ClientFacilityFactory.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ClientFacilityFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.net4j.util.factory.Factory;
*/
public abstract class ClientFacilityFactory extends Factory
{
- public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.clientFacilities";
+ public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.clientFacilities"; //$NON-NLS-1$
public ClientFacilityFactory(String type)
{
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/Message.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/Message.java
index facfe71c24..9a111c2be3 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/Message.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/Message.java
@@ -42,11 +42,11 @@ public abstract class Message extends PlatformObject implements IMessage, Serial
protected String encode(String text)
{
- return text.replaceAll(StringUtil.NL, "\n");
+ return text.replaceAll(StringUtil.NL, "\n"); //$NON-NLS-1$
}
protected String decode(String text)
{
- return text.replaceAll("\n", StringUtil.NL);
+ return text.replaceAll("\n", StringUtil.NL); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ServerFacilityFactory.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ServerFacilityFactory.java
index 656404f878..b8db6f33b9 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ServerFacilityFactory.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/spi/common/ServerFacilityFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.net4j.util.factory.Factory;
*/
public abstract class ServerFacilityFactory extends Factory
{
- public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.serverFacilities";
+ public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.serverFacilities"; //$NON-NLS-1$
public ServerFacilityFactory(String type)
{
diff --git a/plugins/org.eclipse.net4j.buddies.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.buddies.server/META-INF/MANIFEST.MF
index d1c685e2cd..29a72599c1 100644
--- a/plugins/org.eclipse.net4j.buddies.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.buddies.server/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resoluti
org.eclipse.net4j.buddies.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Export-Package: org.eclipse.net4j.buddies.internal.server;version="2.0.0";x-internal:=true,
org.eclipse.net4j.buddies.internal.server.bundle;version="2.0.0";x-internal:=true,
+ org.eclipse.net4j.buddies.internal.server.messages;x-internal:=true,
org.eclipse.net4j.buddies.internal.server.protocol;version="2.0.0";x-internal:=true,
org.eclipse.net4j.buddies.server;version="2.0.0"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
index a8c94fd006..4c554169c7 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
@@ -140,7 +140,7 @@ public class BuddyAdmin extends CollaborationContainer implements IBuddyAdmin, I
if (TRACER.isEnabled())
{
- TRACER.trace("Opened session: " + userID);
+ TRACER.trace("Opened session: " + userID); //$NON-NLS-1$
}
sessions.put(userID, session);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerBuddy.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerBuddy.java
index 016e8dc741..bbb5cc6a87 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerBuddy.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerBuddy.java
@@ -45,18 +45,18 @@ public class ServerBuddy extends Buddy
public IMembership[] initiate(Collection<IBuddy> buddies)
{
// TODO Implement method ServerBuddy.initiate()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
public IMembership join(long collaborationID)
{
// TODO Implement method ServerBuddy.join()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
public IMembership join(Object invitationToken)
{
// TODO Implement method ServerBuddy.join()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/Messages.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/Messages.java
new file mode 100644
index 0000000000..ca98eabd2f
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.buddies.internal.server.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.buddies.internal.server.messages.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/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/messages.properties b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/messages.properties
new file mode 100644
index 0000000000..e0dbdb81fb
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/messages/messages.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+OpenSessionIndication.0=User denied {0}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
index d85e05022d..1f689821f0 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
@@ -16,11 +16,13 @@ import org.eclipse.net4j.buddies.common.ISession;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolUtil;
import org.eclipse.net4j.buddies.internal.server.bundle.OM;
+import org.eclipse.net4j.buddies.internal.server.messages.Messages;
import org.eclipse.net4j.buddies.server.IBuddyAdmin;
import org.eclipse.net4j.signal.IndicationWithResponse;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -63,7 +65,7 @@ public class OpenSessionIndication extends IndicationWithResponse
}
else
{
- OM.LOG.info("User denied: " + userID);
+ OM.LOG.info(MessageFormat.format(Messages.getString("OpenSessionIndication.0"), userID)); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/server/ServerConstants.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/server/ServerConstants.java
index 41781028ac..f188bef79d 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/server/ServerConstants.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/server/ServerConstants.java
@@ -17,5 +17,5 @@ import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
*/
public interface ServerConstants
{
- public static final String TYPE = ProtocolConstants.PROTOCOL_NAME + "server";
+ public static final String TYPE = ProtocolConstants.PROTOCOL_NAME + "server"; //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.buddies.ui/META-INF/MANIFEST.MF
index 687c1091ec..214ee49c05 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.buddies.ui/META-INF/MANIFEST.MF
@@ -19,6 +19,7 @@ Export-Package: org.eclipse.net4j.buddies.internal.ui;version="2.0.0",
org.eclipse.net4j.buddies.internal.ui.actions;version="2.0.0",
org.eclipse.net4j.buddies.internal.ui.bundle;version="2.0.0";x-internal:=true,
org.eclipse.net4j.buddies.internal.ui.dnd;version="2.0.0",
+ org.eclipse.net4j.buddies.internal.ui.messages;x-internal:=true,
org.eclipse.net4j.buddies.internal.ui.preferences;version="2.0.0",
org.eclipse.net4j.buddies.internal.ui.views;version="2.0.0",
org.eclipse.net4j.buddies.ui;version="2.0.0"
diff --git a/plugins/org.eclipse.net4j.buddies.ui/plugin.properties b/plugins/org.eclipse.net4j.buddies.ui/plugin.properties
index c605e8d4c3..a43e0ae3c5 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/plugin.properties
+++ b/plugins/org.eclipse.net4j.buddies.ui/plugin.properties
@@ -23,3 +23,9 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+page.name = Buddies
+category.name = Net4j Buddies
+view.name = Buddies
+view.name.0 = Collaborations
+extension-point.name = Facility Pane Creators \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.buddies.ui/plugin.xml b/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
index 7facbae93b..e3c2d80cec 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
+++ b/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
@@ -13,14 +13,14 @@
<plugin>
- <extension-point id="facilityPaneCreators" name="Facility Pane Creators" schema="schema/facilityPaneCreators.exsd"/>
+ <extension-point id="facilityPaneCreators" name="%extension-point.name" schema="schema/facilityPaneCreators.exsd"/>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.net4j.buddies.internal.ui.preferences.BuddiesPreferencePage"
id="org.eclipse.net4j.buddies.ui.preferences.BuddiesPreferencePage"
- name="Buddies">
+ name="%page.name">
</page>
</extension>
@@ -28,19 +28,19 @@
point="org.eclipse.ui.views">
<category
id="org.eclipse.net4j.buddies"
- name="Net4j Buddies"/>
+ name="%category.name"/>
<view
category="org.eclipse.net4j.buddies"
class="org.eclipse.net4j.buddies.internal.ui.views.BuddiesView"
icon="icons/full/view16/buddies_view.gif"
id="org.eclipse.net4j.BuddiesView"
- name="Buddies"/>
+ name="%view.name"/>
<view
category="org.eclipse.net4j.buddies"
class="org.eclipse.net4j.buddies.internal.ui.views.CollaborationsView"
icon="icons/full/view16/collaborations_view.gif"
id="org.eclipse.net4j.CollaborationsView"
- name="Collaborations"/>
+ name="%view.name.0"/>
</extension>
<extension
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/AbstractItemProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/AbstractItemProvider.java
index 99a2dda8e8..bb35ba0c67 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/AbstractItemProvider.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/AbstractItemProvider.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.buddies.IBuddyCollaboration;
import org.eclipse.net4j.buddies.common.IBuddy;
import org.eclipse.net4j.buddies.common.ICollaboration;
import org.eclipse.net4j.buddies.common.IMembership;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.util.container.IContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.ui.UIUtil;
@@ -188,7 +189,7 @@ public abstract class AbstractItemProvider extends ContainerItemProvider<IContai
else if (obj instanceof IBuddyCollaboration)
{
final IBuddyCollaboration collaboration = (IBuddyCollaboration)obj;
- manager.add(new SafeAction("Leave", "Leave this collaboration")
+ manager.add(new SafeAction(Messages.getString("AbstractItemProvider.0"), Messages.getString("AbstractItemProvider.1")) //$NON-NLS-1$ //$NON-NLS-2$
{
@Override
protected void safeRun() throws Exception
@@ -217,7 +218,7 @@ public abstract class AbstractItemProvider extends ContainerItemProvider<IContai
public RemoveAction(Object object)
{
- super("Remove", "Remove", ContainerView.getDeleteImageDescriptor());
+ super(Messages.getString("AbstractItemProvider.2"), Messages.getString("AbstractItemProvider.3"), ContainerView.getDeleteImageDescriptor()); //$NON-NLS-1$ //$NON-NLS-2$
this.object = object;
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java
index 25452d65b8..2c40670843 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java
@@ -38,7 +38,7 @@ public class MembershipItemProvider extends AbstractItemProvider
@Override
protected String getText(IMembership membership)
{
- return getText(membership.getBuddy()) + "(" + getText(membership.getCollaboration()) + ")";
+ return getText(membership.getBuddy()) + "(" + getText(membership.getCollaboration()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SharedIcons.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SharedIcons.java
index a8c9a678b5..9c87a9b96c 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SharedIcons.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SharedIcons.java
@@ -26,25 +26,25 @@ public class SharedIcons
private static final ImageRegistry REGISTRY = new ImageRegistry(getDisplay());
@SuppressWarnings("unused")
- private static final String ETOOL = "etool16/";
+ private static final String ETOOL = "etool16/"; //$NON-NLS-1$
- private static final String OBJ = "obj16/";
+ private static final String OBJ = "obj16/"; //$NON-NLS-1$
@SuppressWarnings("unused")
- private static final String VIEW = "view16/";
+ private static final String VIEW = "view16/"; //$NON-NLS-1$
@SuppressWarnings("unused")
- private static final String WIZBAN = "wizban/";
+ private static final String WIZBAN = "wizban/"; //$NON-NLS-1$
- public static final String OBJ_COLLABORATION = OBJ + "collaboration";
+ public static final String OBJ_COLLABORATION = OBJ + "collaboration"; //$NON-NLS-1$
- public static final String OBJ_BUDDY = OBJ + "buddy";
+ public static final String OBJ_BUDDY = OBJ + "buddy"; //$NON-NLS-1$
- public static final String OBJ_BUDDY_LONESOME = OBJ + "buddy_lonesome";
+ public static final String OBJ_BUDDY_LONESOME = OBJ + "buddy_lonesome"; //$NON-NLS-1$
- public static final String OBJ_BUDDY_AWAY = OBJ + "buddy_away";
+ public static final String OBJ_BUDDY_AWAY = OBJ + "buddy_away"; //$NON-NLS-1$
- public static final String OBJ_BUDDY_DO_NOT_DISTURB = OBJ + "buddy_do_not_disturb";
+ public static final String OBJ_BUDDY_DO_NOT_DISTURB = OBJ + "buddy_do_not_disturb"; //$NON-NLS-1$
public static Image getImage(String key)
{
@@ -92,7 +92,7 @@ public class SharedIcons
if (display == null)
{
- throw new IllegalStateException("display == null");
+ throw new IllegalStateException("display == null"); //$NON-NLS-1$
}
return display;
@@ -100,6 +100,6 @@ public class SharedIcons
private static String mangleKey(String key)
{
- return "icons/full/" + key + ".gif";
+ return "icons/full/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ConnectAction.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ConnectAction.java
index 6652d66c2d..9c3ecd3ec7 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ConnectAction.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ConnectAction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.actions;
import org.eclipse.net4j.buddies.ISessionManager;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.util.ui.actions.SafeAction;
/**
@@ -20,7 +21,7 @@ public final class ConnectAction extends SafeAction
{
public ConnectAction()
{
- super("Connect", "Connect to buddies server");
+ super(Messages.getString("ConnectAction_0"), Messages.getString("ConnectAction_1")); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/DisconnectAction.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/DisconnectAction.java
index 516998d6b5..eaa663c543 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/DisconnectAction.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/DisconnectAction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.actions;
import org.eclipse.net4j.buddies.ISessionManager;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.util.ui.actions.SafeAction;
/**
@@ -20,7 +21,7 @@ public final class DisconnectAction extends SafeAction
{
public DisconnectAction()
{
- super("Disonnect", "Disconnect from buddies server");
+ super(Messages.getString("DisconnectAction_0"), Messages.getString("DisconnectAction_1")); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/FlashAction.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/FlashAction.java
index 314555cf3c..82f6d4ff41 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/FlashAction.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/FlashAction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.actions;
import org.eclipse.net4j.buddies.ISessionManager;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.util.ui.actions.SafeAction;
/**
@@ -20,7 +21,7 @@ public final class FlashAction extends SafeAction
{
public FlashAction()
{
- super("Flash Me", "Flash Me");
+ super(Messages.getString("FlashAction_0"), Messages.getString("FlashAction_1")); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ReconnectAction.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ReconnectAction.java
index 0ec93b6210..7909372f31 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ReconnectAction.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/ReconnectAction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.actions;
import org.eclipse.net4j.buddies.ISessionManager;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.util.ui.actions.SafeAction;
/**
@@ -20,7 +21,7 @@ public final class ReconnectAction extends SafeAction
{
public ReconnectAction()
{
- super("Reconnect", "Reconnect to buddies server");
+ super(Messages.getString("ReconnectAction_0"), Messages.getString("ReconnectAction_1")); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/StateAction.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/StateAction.java
index e39d313607..4eddca2263 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/StateAction.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/actions/StateAction.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.buddies.IBuddySession;
import org.eclipse.net4j.buddies.ISessionManager;
import org.eclipse.net4j.buddies.common.IBuddy.State;
import org.eclipse.net4j.buddies.internal.ui.SharedIcons;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.internal.buddies.Self;
import org.eclipse.net4j.util.ui.actions.SafeAction;
@@ -23,6 +24,8 @@ import org.eclipse.jface.action.IMenuCreator;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
+import java.text.MessageFormat;
+
/**
* @author Eike Stepper
*/
@@ -33,7 +36,7 @@ public class StateAction extends SafeAction
public StateAction(String text, State state, String key)
{
super(text, Action.AS_RADIO_BUTTON);
- setToolTipText("Set own state to '" + text.toLowerCase() + "'");
+ setToolTipText(MessageFormat.format(Messages.getString("StateAction_0"), text.toLowerCase())); //$NON-NLS-1$
setImageDescriptor(SharedIcons.getDescriptor(key));
this.state = state;
}
@@ -70,7 +73,7 @@ public class StateAction extends SafeAction
public DropDownAction()
{
- setText("Set My State");
+ setText(Messages.getString("StateAction_2")); //$NON-NLS-1$
setMenuCreator(this);
}
@@ -157,7 +160,7 @@ public class StateAction extends SafeAction
{
public AvailableAction()
{
- super("Available", State.AVAILABLE, SharedIcons.OBJ_BUDDY);
+ super(Messages.getString("StateAction_3"), State.AVAILABLE, SharedIcons.OBJ_BUDDY); //$NON-NLS-1$
}
}
@@ -165,7 +168,7 @@ public class StateAction extends SafeAction
{
public LonesomeAction()
{
- super("Lonesome", State.LONESOME, SharedIcons.OBJ_BUDDY_LONESOME);
+ super(Messages.getString("StateAction_4"), State.LONESOME, SharedIcons.OBJ_BUDDY_LONESOME); //$NON-NLS-1$
}
}
@@ -173,7 +176,7 @@ public class StateAction extends SafeAction
{
public AwayAction()
{
- super("Away", State.AWAY, SharedIcons.OBJ_BUDDY_AWAY);
+ super(Messages.getString("StateAction_5"), State.AWAY, SharedIcons.OBJ_BUDDY_AWAY); //$NON-NLS-1$
}
}
@@ -181,7 +184,7 @@ public class StateAction extends SafeAction
{
public DoNotDisturbAction()
{
- super("Do Not Disturb", State.DO_NOT_DISTURB, SharedIcons.OBJ_BUDDY_DO_NOT_DISTURB);
+ super(Messages.getString("StateAction_6"), State.DO_NOT_DISTURB, SharedIcons.OBJ_BUDDY_DO_NOT_DISTURB); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/bundle/OM.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/bundle/OM.java
index a720c499b2..b11c13bad6 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/bundle/OM.java
@@ -26,7 +26,7 @@ public abstract class OM
{
public static final String BUNDLE_ID = "org.eclipse.net4j.buddies.ui"; //$NON-NLS-1$
- public static final String EXT_POINT = "facilityPaneCreators";
+ public static final String EXT_POINT = "facilityPaneCreators"; //$NON-NLS-1$
public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/dnd/BuddiesTransfer.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/dnd/BuddiesTransfer.java
index 1856aee81c..63fc12a81a 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/dnd/BuddiesTransfer.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/dnd/BuddiesTransfer.java
@@ -13,12 +13,14 @@ package org.eclipse.net4j.buddies.internal.ui.dnd;
import org.eclipse.net4j.buddies.IBuddySession;
import org.eclipse.net4j.buddies.common.IBuddy;
import org.eclipse.net4j.buddies.internal.ui.bundle.OM;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.internal.buddies.SessionManager;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.ui.dnd.DNDTransfer;
import java.io.IOException;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -27,7 +29,7 @@ import java.util.List;
*/
public class BuddiesTransfer extends DNDTransfer<IBuddy[]>
{
- public static final String TYPE_NAME = "buddies-transfer-format";
+ public static final String TYPE_NAME = "buddies-transfer-format"; //$NON-NLS-1$
public static final BuddiesTransfer INSTANCE = new BuddiesTransfer();
@@ -52,7 +54,7 @@ public class BuddiesTransfer extends DNDTransfer<IBuddy[]>
IBuddySession session = SessionManager.INSTANCE.getSession();
if (session == null)
{
- OM.LOG.warn("Buddy session is not available");
+ OM.LOG.warn(Messages.getString("BuddiesTransfer_1")); //$NON-NLS-1$
return null;
}
@@ -68,7 +70,7 @@ public class BuddiesTransfer extends DNDTransfer<IBuddy[]>
}
else
{
- OM.LOG.warn("Buddy is not available: " + userID);
+ OM.LOG.warn(MessageFormat.format(Messages.getString("BuddiesTransfer_2"), userID)); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/Messages.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/Messages.java
new file mode 100644
index 0000000000..5f622a6edc
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.buddies.internal.ui.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.buddies.internal.ui.messages.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/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/messages.properties b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/messages.properties
new file mode 100644
index 0000000000..44e8291047
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/messages/messages.properties
@@ -0,0 +1,37 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+AbstractItemProvider.0=Leave
+AbstractItemProvider.1=Leave this collaboration
+AbstractItemProvider.2=Remove
+AbstractItemProvider.3=Remove
+BuddiesPreferencePage_0=Server:
+BuddiesPreferencePage_1=User ID:
+BuddiesPreferencePage_2=Password:
+BuddiesPreferencePage_3=Auto Connect
+BuddiesTransfer_1=Buddy session is not available
+BuddiesTransfer_2=Buddy is not available: {0}
+CollaborationsPane_0=Activate {0} facility
+CollaborationsView_2=Start {0}
+CollaborationsView_3=Start a {0} facility
+ConnectAction_0=Connect
+ConnectAction_1=Connect to buddies server
+DisconnectAction_0=Disonnect
+DisconnectAction_1=Disconnect from buddies server
+FlashAction_0=Flash Me
+FlashAction_1=Flash Me
+ReconnectAction_0=Reconnect
+ReconnectAction_1=Reconnect to buddies server
+StateAction_0=Set own state to \"{0}\"
+StateAction_2=Set My State
+StateAction_3=Available
+StateAction_4=Lonesome
+StateAction_5=Away
+StateAction_6=Do Not Disturb
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/preferences/BuddiesPreferencePage.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/preferences/BuddiesPreferencePage.java
index 5bff90ce8e..3ac947b9da 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/preferences/BuddiesPreferencePage.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/preferences/BuddiesPreferencePage.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.net4j.buddies.internal.ui.preferences;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.internal.buddies.bundle.OM;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.net4j.util.ui.prefs.OMPreferencePage;
@@ -46,21 +47,21 @@ public class BuddiesPreferencePage extends OMPreferencePage
Composite composite = UIUtil.createGridComposite(parent, 2);
composite.setLayoutData(UIUtil.createGridData());
- new Label(composite, SWT.NONE).setText("Server:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("BuddiesPreferencePage_0")); //$NON-NLS-1$
connectorDescription = new Text(composite, SWT.BORDER);
connectorDescription.setLayoutData(UIUtil.createGridData(true, false));
- new Label(composite, SWT.NONE).setText("User ID:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("BuddiesPreferencePage_1")); //$NON-NLS-1$
userID = new Text(composite, SWT.BORDER);
userID.setLayoutData(new GridData(100, SWT.DEFAULT));
- new Label(composite, SWT.NONE).setText("Password:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("BuddiesPreferencePage_2")); //$NON-NLS-1$
password = new Text(composite, SWT.BORDER | SWT.PASSWORD);
password.setLayoutData(new GridData(100, SWT.DEFAULT));
new Label(composite, SWT.NONE);
autoConnect = new Button(composite, SWT.CHECK);
- autoConnect.setText("Auto Connect");
+ autoConnect.setText(Messages.getString("BuddiesPreferencePage_3")); //$NON-NLS-1$
initValues();
return composite;
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
index a14b1e7854..91253b09c4 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
@@ -16,6 +16,7 @@ import org.eclipse.net4j.buddies.common.ICollaboration;
import org.eclipse.net4j.buddies.common.IFacility;
import org.eclipse.net4j.buddies.common.IFacilityInstalledEvent;
import org.eclipse.net4j.buddies.common.IMembership;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.buddies.ui.IFacilityPaneCreator;
import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.net4j.util.StringUtil;
@@ -33,6 +34,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -309,7 +311,7 @@ public class CollaborationsPane extends Composite implements IListener
private ActivateFacilityAction(String type, ImageDescriptor descriptor)
{
super(StringUtil.cap(type), AS_RADIO_BUTTON);
- setToolTipText("Activate " + type + " facility");
+ setToolTipText(MessageFormat.format(Messages.getString("CollaborationsPane_0"), type)); //$NON-NLS-1$
setImageDescriptor(descriptor);
this.type = type;
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
index 6a77d40ee8..a0f698ebaa 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.buddies.internal.ui.views;
import org.eclipse.net4j.buddies.IBuddyCollaboration;
import org.eclipse.net4j.buddies.internal.ui.CollaborationsItemProvider;
import org.eclipse.net4j.buddies.internal.ui.bundle.OM;
+import org.eclipse.net4j.buddies.internal.ui.messages.Messages;
import org.eclipse.net4j.buddies.ui.IFacilityPaneCreator;
import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.ContainerUtil;
@@ -38,6 +39,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchActionConstants;
+import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
@@ -177,11 +179,11 @@ public class CollaborationsView extends SessionManagerView
IConfigurationElement[] elements = registry.getConfigurationElementsFor(OM.BUNDLE_ID, OM.EXT_POINT);
for (final IConfigurationElement element : elements)
{
- if ("facilityPaneCreator".equals(element.getName()))
+ if ("facilityPaneCreator".equals(element.getName())) //$NON-NLS-1$
{
try
{
- IFacilityPaneCreator creator = (IFacilityPaneCreator)element.createExecutableExtension("class");
+ IFacilityPaneCreator creator = (IFacilityPaneCreator)element.createExecutableExtension("class"); //$NON-NLS-1$
facilityPaneCreators.put(creator.getType(), creator);
}
catch (Exception ex)
@@ -203,8 +205,8 @@ public class CollaborationsView extends SessionManagerView
private StartFacilityAction(IBuddyCollaboration collaboration, String type, ImageDescriptor descriptor)
{
- super("Start " + StringUtil.cap(type), AS_RADIO_BUTTON);
- setToolTipText("Start a " + type + " facility");
+ super(MessageFormat.format(Messages.getString("CollaborationsView_2"), StringUtil.cap(type)), AS_RADIO_BUTTON); //$NON-NLS-1$
+ setToolTipText(MessageFormat.format(Messages.getString("CollaborationsView_3"), type)); //$NON-NLS-1$
setImageDescriptor(descriptor);
this.collaboration = collaboration;
this.type = type;
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientBuddy.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientBuddy.java
index f3c3df10d2..ec61121542 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientBuddy.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientBuddy.java
@@ -72,13 +72,13 @@ public class ClientBuddy extends Buddy
protected IAccount loadAccount(String userID)
{
// TODO Implement method ClientBuddy.loadAccount()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
@Override
protected Set<String> loadFacilityTypes()
{
// TODO Implement method ClientBuddy.loadFacilityTypes()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
index 842fb8e4ba..68f7f133fa 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
@@ -83,13 +83,13 @@ public class Self extends Buddy
public IMembership join(long collaborationID)
{
// TODO Implement method Self.join()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
public IMembership join(Object invitationToken)
{
// TODO Implement method Self.join()
- throw new UnsupportedOperationException("Not yet implemented");
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/SessionManager.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/SessionManager.java
index b16465f58d..f7579ff1dd 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/SessionManager.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/SessionManager.java
@@ -98,7 +98,7 @@ public class SessionManager extends Lifecycle implements ISessionManager, IListe
public void connect()
{
- new Thread("buddies-connector")
+ new Thread("buddies-connector") //$NON-NLS-1$
{
@Override
public void run()
@@ -112,7 +112,7 @@ public class SessionManager extends Lifecycle implements ISessionManager, IListe
IConnector connector = Net4jUtil.getConnector(IPluginContainer.INSTANCE, getConnectorDescription());
if (connector == null)
{
- throw new IllegalStateException("connector == null");
+ throw new IllegalStateException("connector == null"); //$NON-NLS-1$
}
boolean connected = connector.waitForConnection(5000L);
@@ -167,7 +167,7 @@ public class SessionManager extends Lifecycle implements ISessionManager, IListe
{
final Self self = (Self)session.getSelf();
final IBuddy.State original = self.getState();
- new Thread("buddies-flasher")
+ new Thread("buddies-flasher") //$NON-NLS-1$
{
@Override
public void run()
@@ -275,7 +275,7 @@ public class SessionManager extends Lifecycle implements ISessionManager, IListe
@Override
public String toString()
{
- return MessageFormat.format("SessionManagerEvent[source={0}, oldState={1}, newState={2}, session={3}]",
+ return MessageFormat.format("SessionManagerEvent[source={0}, oldState={1}, newState={2}, session={3}]", //$NON-NLS-1$
getSource(), getOldState(), getNewState(), getSession());
}
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/bundle/OM.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/bundle/OM.java
index 6bc8658ed9..493c0c0b84 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/bundle/OM.java
@@ -36,10 +36,10 @@ public abstract class OM
public static final OMPreferences PREFS = BUNDLE.preferences();
public static final OMPreference<String> PREF_CONNECTOR_DESCRIPTION = //
- PREFS.init("PREF_CONNECTOR_DESCRIPTION", "tcp://localhost"); //$NON-NLS-1$
+ PREFS.init("PREF_CONNECTOR_DESCRIPTION", "tcp://localhost"); //$NON-NLS-1$ //$NON-NLS-2$
public static final OMPreference<String> PREF_USER_ID = //
- PREFS.init("PREF_USER_ID", System.getProperty("user.name")); //$NON-NLS-1$
+ PREFS.init("PREF_USER_ID", System.getProperty("user.name")); //$NON-NLS-1$ //$NON-NLS-2$
public static final OMPreference<String> PREF_PASSWORD = //
PREFS.initString("PREF_PASSWORD"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
index 3d4696a9ff..3067b33e02 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
@@ -88,6 +88,6 @@ public class BuddiesClientProtocol extends SignalProtocol<ClientSession>
}
}
- throw new IllegalStateException("No session after " + max + " milliseconds");
+ throw new IllegalStateException("No session after " + max + " milliseconds"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.examples/plugin.properties b/plugins/org.eclipse.net4j.examples/plugin.properties
index 322fd68e1d..4b073a0a6f 100644
--- a/plugins/org.eclipse.net4j.examples/plugin.properties
+++ b/plugins/org.eclipse.net4j.examples/plugin.properties
@@ -23,3 +23,8 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+actionSet.label = Net4j Examples
+menu.label = Net4j Examples
+action.label = Upload File
+action.tooltip = Upload file to Net4j server \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.examples/plugin.xml b/plugins/org.eclipse.net4j.examples/plugin.xml
index 6682a4bbb9..cce850e6fa 100644
--- a/plugins/org.eclipse.net4j.examples/plugin.xml
+++ b/plugins/org.eclipse.net4j.examples/plugin.xml
@@ -17,11 +17,11 @@
point="org.eclipse.ui.actionSets">
<actionSet
id="org.eclipse.net4j.examples.actionSet"
- label="Net4j Examples"
+ label="%actionSet.label"
visible="true">
<menu
id="sampleMenu"
- label="Net4j Examples">
+ label="%menu.label">
<separator
name="sampleGroup">
</separator>
@@ -30,10 +30,10 @@
class="org.eclipse.net4j.examples.transfer.UploadClientAction"
icon="icons/sample.gif"
id="org.eclipse.net4j.examples.transfer.TransferClientAction"
- label="Upload File"
+ label="%action.label"
menubarPath="sampleMenu/sampleGroup"
toolbarPath="sampleGroup"
- tooltip="Upload file to Net4j server">
+ tooltip="%action.tooltip">
</action>
</actionSet>
</extension>

Back to the top