Author: sflanigan
Date: 2009-04-09 03:03:18 -0400 (Thu, 09 Apr 2009)
New Revision: 14622
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
Log:
JBIDE-3557 Externalise English strings - replaced concatenated strings with NLS.bind()
calls
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-04-09
07:03:18 UTC (rev 14622)
@@ -6,8 +6,7 @@
JBoss_Runtime_List_Field_Editor_Name=Name
JBoss_Runtime_List_Field_Editor_Version=Version
JBoss_Runtime_List_Field_Editor_Path=Path
-JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be=inputElement must be
-JBoss_Runtime_List_Field_Editor_An_Instance_Of_List=an instance of
List<JBossRuntime>.
+JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be_List=inputElement must be an
instance of List<JBossRuntime>.
JBoss_Runtime_Delete_Confirm_Title=Confirm Runtime Delete
JBoss_Runtime_Delete_Used_Confirm=Runtime ''{0}'' is used by JBoss ESB
projects. Are you sure you want to delete it?
JBoss_Runtime_Delete_Not_Used_Confirm=Are you sure you want to delete runtime
''{0}''?
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -33,8 +33,7 @@
public static String JBoss_Runtime_List_Field_Editor_Name;
public static String JBoss_Runtime_List_Field_Editor_Version;
public static String JBoss_Runtime_List_Field_Editor_Path;
- public static String JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be;
- public static String JBoss_Runtime_List_Field_Editor_An_Instance_Of_List;
+ public static String JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be_List;
public static String JBoss_Runtime_Delete_Confirm_Title;
public static String JBoss_Runtime_Delete_Used_Confirm;
public static String JBoss_Runtime_Delete_Not_Used_Confirm;
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -207,8 +207,7 @@
return ((JBossRuntime) inputElement).getLibraries().toArray();
} else {
throw new IllegalArgumentException(
- JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be
- + JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_An_Instance_Of_List);
+ JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be_List);
}
}
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -222,8 +222,7 @@
return ((List<JBossRuntime>) inputElement).toArray();
} else {
throw new IllegalArgumentException(
- JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be
- + JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_An_Instance_Of_List);
+ JBossESBUIMessages.JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be_List);
}
}
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -20,7 +20,7 @@
public static String ECFExamplesTransport_Internal_Error;
public static String ECFExamplesTransport_IO_error;
public static String ECFExamplesTransport_Loading;
- public static String ECFExamplesTransport_of;
+ public static String ECFExamplesTransport_ReceivedSize_Of_FileSize_At_RatePerSecond;
public static String ECFExamplesTransport_Server_redirected_too_many_times;
public static String
ECFExamplesTransport_Unexpected_interrupt_while_waiting_on_ECF_transfer;
public static String MarkerDialog_Description;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -41,12 +41,12 @@
import org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
import org.eclipse.equinox.internal.provisional.p2.core.repository.IRepository;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.equinox.security.storage.StorageException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.osgi.util.tracker.ServiceTracker;
@@ -226,7 +226,7 @@
long fileLength = rse.getSource().getFileLength();
final long totalWork = ((fileLength == -1) ? 100 : fileLength);
int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int)
totalWork;
- monitor.beginTask(Messages.ECFExamplesTransport_Downloading + name,work);
+ monitor.beginTask(NLS.bind(Messages.ECFExamplesTransport_Downloading, name),
work);
oldWorked=0;
}
} catch (IOException e) {
@@ -251,10 +251,12 @@
int worked = (int) Math.round(factor * received);
double downloadRateBytesPerSecond = (received / ((System.currentTimeMillis() + 1 -
transferStartTime) / 1000.0));
- String rates = String.format(" (at %s/s)",
AbstractRetrieveFileTransfer.toHumanReadableBytes(downloadRateBytesPerSecond));
//$NON-NLS-1$
+ String downloadRateString =
AbstractRetrieveFileTransfer.toHumanReadableBytes(downloadRateBytesPerSecond);
String receivedString =
AbstractRetrieveFileTransfer.toHumanReadableBytes(received);
String fileLengthString =
AbstractRetrieveFileTransfer.toHumanReadableBytes(fileLength);
- monitor.subTask(receivedString + Messages.ECFExamplesTransport_of +
fileLengthString + rates);
+ monitor.subTask(NLS.bind(
+ Messages.ECFExamplesTransport_ReceivedSize_Of_FileSize_At_RatePerSecond,
+ new String[]{receivedString, fileLengthString, downloadRateString}));
monitor.worked(worked-oldWorked);
oldWorked=worked;
}
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2009-04-09
07:03:18 UTC (rev 14622)
@@ -1,9 +1,13 @@
Category_Other=Other
-ECFExamplesTransport_Downloading=Downloading
+ECFExamplesTransport_Downloading=Downloading {0}
ECFExamplesTransport_Internal_Error=Internal Error
ECFExamplesTransport_IO_error=IO error
ECFExamplesTransport_Loading=Loading
-ECFExamplesTransport_of=\ of
+# {0} = amount received (KB/MB/etc)
+# {1} = expected total (KB/MB/etc)
+# {2} = download rate per second (KB/MB/etc)
+# eg 241.73 KB of 30.95 MB (at 34.18 KB/s)
+ECFExamplesTransport_ReceivedSize_Of_FileSize_At_RatePerSecond={0} of {1} (at {2}/s)
ECFExamplesTransport_Server_redirected_too_many_times=Server redirected too many times
ECFExamplesTransport_Unexpected_interrupt_while_waiting_on_ECF_transfer=Unexpected
interrupt while waiting on ECF transfer
MarkerDialog_Description=Description
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -171,7 +171,7 @@
p.load(fis);
}
catch(IOException io) {
- throw new
HibernateConsoleRuntimeException(HibernateConsoleMessages.EclipseLaunchConsoleConfigurationPreferences_could_not_load_property_file
+ propFile, io);
+ throw new
HibernateConsoleRuntimeException(NLS.bind(HibernateConsoleMessages.EclipseLaunchConsoleConfigurationPreferences_could_not_load_property_file,
propFile), io);
}
finally {
if (fis != null) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-04-09
07:03:18 UTC (rev 14622)
@@ -18,7 +18,7 @@
EclipseLaunchConsoleConfigurationPreferences_cannot_read_from_xml=Cannot read from xml
EclipseLaunchConsoleConfigurationPreferences_cannot_write_to_xml=Cannot write to xml
EclipseLaunchConsoleConfigurationPreferences_could_not_compute_classpath=Could not
compute classpath
-EclipseLaunchConsoleConfigurationPreferences_could_not_load_property_file=Could not load
property file
+EclipseLaunchConsoleConfigurationPreferences_could_not_load_property_file=Could not load
property file {0}
EclipseLaunchConsoleConfigurationPreferences_could_not_resolve_to_file=Could not resolve
{0} to a file
HibernateConsolePlugin_could_not_delete_launch_config_for=Could not delete launch
configuration for:
HibernateConsolePlugin_could_not_open_criteria_editor_for_console=Could not open Criteria
editor for console:
@@ -217,7 +217,8 @@
TableFilterView_exclude=Exclude...
TableFilterView_include=Include...
# START NON-TRANSLATABLE
-TableFilterView_not_known_button=\ not a known button
+# internal error message, translation would only cause support problems
+TableFilterView_not_known_button={0} not a known button
# END NON-TRANSLATABLE
TableFilterView_remove_all_filters=Remove all filters
TableFilterView_schema=Schema
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2009-04-09
06:54:58 UTC (rev 14621)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2009-04-09
07:03:18 UTC (rev 14622)
@@ -31,6 +31,7 @@
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TableColumn;
@@ -204,7 +205,7 @@
doExclusion();
break;
default:
- throw new IllegalArgumentException( i +
HibernateConsoleMessages.TableFilterView_not_known_button );
+ throw new
IllegalArgumentException(NLS.bind(HibernateConsoleMessages.TableFilterView_not_known_button,
i) );
}
}