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.debug.core.ILaunchConfiguration;
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
@ -52,7 +53,7 @@ public class LLDBLaunchDelegate extends GdbLaunchDelegate {
if (path == null) {
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

View file

@ -20,7 +20,7 @@ import org.eclipse.osgi.util.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$
public static String LLDBLaunch_minimum_version_error;
public static String LLDBLaunchDelegate_mimicking_gdb;
public static String LLDBLaunchDelegate_cli_label;
static {
// initialize resource bundle
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}.
LLDBLaunchDelegate_mimicking_gdb=mimicking
LLDBLaunchDelegate_cli_label={0} (mimicking gdb {1})