Use proper punctuation when only one or two services applies
authorEd Swartz <ed.swartz@nokia.com>
Wed, 08 Sep 2010 17:14:34 -0500
changeset 1967 86b9e2a7db20
parent 1966 67581ab567b1
child 1968 3482df86a51d
Use proper punctuation when only one or two services applies
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java	Wed Sep 08 17:13:42 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java	Wed Sep 08 17:14:34 2010 -0500
@@ -387,8 +387,8 @@
 		for (int i = 0; i < connectionTypes.length; i++) {
 			IConnectionType type = connectionTypes[i];
 			if (requiredConnectionTypes.length() > 0)
-				requiredConnectionTypes.append(", "); //$NON-NLS-1$
-			if (i == connectionTypes.length - 1)
+				requiredConnectionTypes.append(connectionTypes.length > 2 ? ", " : " "); //$NON-NLS-1$ //$NON-NLS-2$
+			if (i == connectionTypes.length - 1 && connectionTypes.length > 1)
 				requiredConnectionTypes.append(Messages.getString("ClientServiceSiteUI2.Or")); //$NON-NLS-1$
 			requiredConnectionTypes.append(type.getDisplayName());
 		}