Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-07-08 11:31:05 -0400
committerslewis2009-07-08 11:31:05 -0400
commit6e462711a7aa7de9c4212d06bff9ef053feb858d (patch)
tree1909ff188e635cdd169f70ed9a1ff9282362078e /examples/bundles/org.eclipse.ecf.example.collab
parent4bd2244e18872851d2250f03983db7539b20e769 (diff)
downloadorg.eclipse.ecf-6e462711a7aa7de9c4212d06bff9ef053feb858d.tar.gz
org.eclipse.ecf-6e462711a7aa7de9c4212d06bff9ef053feb858d.tar.xz
org.eclipse.ecf-6e462711a7aa7de9c4212d06bff9ef053feb858d.zip
Fixes for externalized string for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259439
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.example.collab')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java11
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties14
6 files changed, 19 insertions, 18 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index a5c45f293..7d552ccd7 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -621,7 +621,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
});
shells.put(id, showImageShell);
}
- showImageShell.initialize(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM + fromUser, imageWrapper);
+ showImageShell.initialize(Messages.bind(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM, fromUser), imageWrapper);
showImageShell.open();
}
});
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
index dbcaa84e8..61ed20dc1 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
@@ -44,7 +44,7 @@ public class EclipseFileTransferAndLaunch extends EclipseFileTransfer {
try {
Program.launch(fileName);
} catch (final IllegalArgumentException e1) {
- ClientPlugin.log(MessageLoader.getString("EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING") + localFile, e1); //$NON-NLS-1$
+ ClientPlugin.log(MessageLoader.getFormattedString("EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING", localFile), e1); //$NON-NLS-1$
Display.getDefault().asyncExec(new Runnable() {
public void run() {
MessageDialog
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
index 595330935..bb1251513 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
@@ -36,7 +36,7 @@ EclipseCollabSharedObject_MARKER_NAME=ECF marker
EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION=Open shared editor for {0} from {1}?
EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT=Private Message from {0}
EclipseCollabSharedObject_PROJECT_NAME=Collaboration for {0} \n\n
-EclipseCollabSharedObject_SCREEN_CAPTURE_FROM=Screen capture from
+EclipseCollabSharedObject_SCREEN_CAPTURE_FROM=Screen capture from {0}
EclipseCollabSharedObject_TITLE_BAR=Collaboration: {0}
EclipseCollabSharedObject_TREE_TOP_LABEL=Presence
EclipseCollabSharedObject_UNKNOWN_USERNAME=<unknown>
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
index b0374e28e..6c86fb962 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
@@ -12,8 +12,6 @@
package org.eclipse.ecf.internal.example.collab.ui;
-import org.eclipse.ecf.example.collab.share.io.FileSenderUI;
-
import java.io.File;
import java.io.IOException;
import java.util.*;
@@ -24,6 +22,7 @@ import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.user.IUser;
import org.eclipse.ecf.core.util.StringUtils;
+import org.eclipse.ecf.example.collab.share.io.FileSenderUI;
import org.eclipse.ecf.example.collab.share.io.FileTransferParams;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
import org.eclipse.ecf.presence.IPresenceContainerAdapter;
@@ -435,7 +434,9 @@ public class ChatComposite extends Composite {
// This is a menu to us
final Action sendMessageToUser = new Action() {
public void run() {
- MessageDialog.openError(null, MessageLoader.getString("ChatComposite.MESSAGE_TO_TITLE") + user.getNickname(), MessageLoader.getString("ChatComposite.MESSAGE_TO_TEXT") + user.getNickname() + "\n\tID: " + user.getID().getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ MessageDialog.openError(null, MessageLoader.getFormattedString("ChatComposite.MESSAGE_TO_TITLE", user.getNickname()), //$NON-NLS-1$
+ MessageLoader.getFormattedString("ChatComposite.MESSAGE_TO_TEXT", user.getNickname()) //$NON-NLS-1$
+ + "\n\tID: " + user.getID().getName()); //$NON-NLS-1$
}
};
sendMessageToUser.setText(MessageLoader.getString("ChatComposite.MENU_SEND_MESSAGE_TO_YOURSELF_TEXT")); //$NON-NLS-1$
@@ -974,7 +975,7 @@ public class ChatComposite extends Composite {
String res = null;
if (this.view.lch != null) {
if (data != null) {
- res = getID(MessageLoader.getString("ChatComposite.RING_TITLE") + data.getNickname(), MessageLoader.getString("ChatComposite.RING_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ res = getID(MessageLoader.getFormattedString("ChatComposite.RING_TITLE", data.getNickname()), MessageLoader.getString("ChatComposite.RING_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
res = getID(MessageLoader.getString("ChatComposite.RING_GROUP_TITLE"), MessageLoader.getString("ChatComposite.RING_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@@ -989,7 +990,7 @@ public class ChatComposite extends Composite {
if (ud == null) {
res = getID(MessageLoader.getString("ChatComposite.START_PROGRAM_GROUP_TITLE"), MessageLoader.getString("ChatComposite.START_PROGRAM_GROUP_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- res = getID(MessageLoader.getString("ChatComposite.START_PROGRAM_TITLE") + ud.getNickname(), MessageLoader.getString("ChatComposite.START_PROGRAM_TEXT") + ud.getNickname() + ":", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ res = getID(MessageLoader.getFormattedString("ChatComposite.START_PROGRAM_TITLE", ud.getNickname()), MessageLoader.getFormattedString("ChatComposite.START_PROGRAM_TEXT", ud.getNickname()) + ":", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
receiver = ud.getID();
}
if (res != null)
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
index 121b51848..f29806ff1 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
@@ -11,9 +11,9 @@
package org.eclipse.ecf.internal.example.collab.ui;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
public class MessageLoader {
@@ -40,7 +40,7 @@ public class MessageLoader {
* @return formatted string
*/
public static String getFormattedString(String key, Object arg) {
- return MessageFormat.format(getString(key), new Object[] {arg});
+ return NLS.bind(getString(key), new Object[] {arg});
}
/**
@@ -50,7 +50,7 @@ public class MessageLoader {
* @return formatted string.
*/
public static String getFormattedString(String key, Object[] args) {
- return MessageFormat.format(getString(key), args);
+ return NLS.bind(getString(key), args);
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
index 3114f8936..e1e6e2e75 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
@@ -16,15 +16,15 @@ ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT1=File {0} not found.
ChatComposite.MENU_SEND_MESSAGE_TO_YOURSELF_TEXT=Send Message to Yourself
ChatComposite.MESSAGE_TO_GROUP_TEXT=Message For Group:
ChatComposite.MESSAGE_TO_GROUP_TITLE=Send Message to Group
-ChatComposite.MESSAGE_TO_TEXT=Talking to yourself again aren't you\!\!\n\n\tUsername:
-ChatComposite.MESSAGE_TO_TITLE=Message to
+ChatComposite.MESSAGE_TO_TEXT=Talking to yourself again aren't you\!\!\n\n\tUsername: {0}
+ChatComposite.MESSAGE_TO_TITLE=Message to {0}
ChatComposite.NO_HYPERLINKING=Source viewer not available. Hyperlinking will be disabled.
ChatComposite.PRIVATE_MESSAGE_TEXT=Message:
-ChatComposite.PRIVATE_MESSAGE_TITLE=Private Message for
+ChatComposite.PRIVATE_MESSAGE_TITLE=Private Message for {0}
ChatComposite.RING_GROUP_TITLE=Ring Group
ChatComposite.RING_MESSAGE_TEXT=Ring Message:
ChatComposite.RING_OTHER_TEXT=Ring {0}...
-ChatComposite.RING_TITLE=Ring
+ChatComposite.RING_TITLE=Ring {0}
ChatComposite.SELECT_FILE_FOR_GROUP_TEXT=Select File for Group
ChatComposite.SELECt_FILE_TITLE=Select File for {0}
ChatComposite.SEND_FILE_AND_LAUNCH_TEXT=Send File to {0} and launch...
@@ -37,9 +37,9 @@ ChatComposite.SEND_SHOW_VIEW_REQUEST_TEXT=Send Show View Request to {0}...
ChatComposite.SHOW_CHAT_WINDOW_TEXT=Show chat window
ChatComposite.START_PROGRAM_GROUP_TEXT=Program to Start:
ChatComposite.START_PROGRAM_GROUP_TITLE=Start Program for Group
-ChatComposite.START_PROGRAM_TEXT=Program to Start for
-ChatComposite.START_PROGRAM_TITLE=Start Program for
-EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING=Exception launching
+ChatComposite.START_PROGRAM_TEXT=Program to Start for {0}
+ChatComposite.START_PROGRAM_TITLE=Start Program for {0}
+EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING=Exception launching {0}
EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TEXT=Program launch failed for {0}\nException: {1}
EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TITLE=Program Launch Failed
LineChatClientView.contextmenu.send=Send EclipseProjectComponent...

Back to the top