1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00

lldb: Replace a concatenated string with NLS.bind

To make it more translation-friendly.

Change-Id: Icc1a94b2db2f90b060f90e16d56aadf57573b2c6
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
Marc-Andre Laperle 2020-07-01 14:35:17 -04:00 committed by Marc-André Laperle
parent 0798984bc8
commit 6aa232bd23
3 changed files with 4 additions and 3 deletions

View file

@ -19,6 +19,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.ISourceLocator; import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.osgi.util.NLS;
/** /**
* A specific LLDB launch delegate that allows customization such as setting the * A specific LLDB launch delegate that allows customization such as setting the
@ -52,7 +53,7 @@ public class LLDBLaunchDelegate extends GdbLaunchDelegate {
if (path == null) { if (path == null) {
path = LLDBLaunch.getLLDBPath(config); path = LLDBLaunch.getLLDBPath(config);
} }
return path.toString().trim() + " (" + Messages.LLDBLaunchDelegate_mimicking_gdb + " gdb " + gdbVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return NLS.bind(Messages.LLDBLaunchDelegate_cli_label, path.toString().trim(), gdbVersion);
} }
@Override @Override

View file

@ -20,7 +20,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS { public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.llvm.dsf.lldb.core.internal.launching.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.llvm.dsf.lldb.core.internal.launching.messages"; //$NON-NLS-1$
public static String LLDBLaunch_minimum_version_error; public static String LLDBLaunch_minimum_version_error;
public static String LLDBLaunchDelegate_mimicking_gdb; public static String LLDBLaunchDelegate_cli_label;
static { static {
// initialize resource bundle // initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class); NLS.initializeMessages(BUNDLE_NAME, Messages.class);

View file

@ -10,4 +10,4 @@
############################################################################### ###############################################################################
LLDBLaunch_minimum_version_error=The lldb debugger does not meet the minimum version requirement. Current: {0}, required: {1} {2}. LLDBLaunch_minimum_version_error=The lldb debugger does not meet the minimum version requirement. Current: {0}, required: {1} {2}.
LLDBLaunchDelegate_mimicking_gdb=mimicking LLDBLaunchDelegate_cli_label={0} (mimicking gdb {1})