Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'containers/org.eclipse.linuxtools.docker.ui/src')
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java15
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DVMessages.properties7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java42
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerEnvironmentVariableDialog.java13
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerLinkDialog.java15
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerPortDialog.java23
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/DataVolumeModel.java12
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EnvironmentVariableModel.java4
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRun.java6
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesModel.java12
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesPage.java74
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionModel.java40
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionPage.java101
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageSearchPage.java59
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnection.java9
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java88
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/WizardMessages.properties120
17 files changed, 461 insertions, 179 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java
index df19eb7587..86c94de421 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java
@@ -57,7 +57,7 @@ public class RunImageCommandHandler extends AbstractHandler {
final IDockerImage selectedImage = getSelectedImage(activePart);
if (selectedImage == null) {
Activator.logErrorMessage(
- "Unable to retrieve Docker Image from current selection.");
+ DVMessages.getString("RunImageUnableToRetrieveError.msg")); //$NON-NLS-1$
} else {
try {
final ImageRun wizard = new ImageRun(selectedImage);
@@ -93,16 +93,20 @@ public class RunImageCommandHandler extends AbstractHandler {
}
// Create the container in a non-UI thread.
- final Job runImageJob = new Job("Create Container") {
+ final Job runImageJob = new Job(
+ DVMessages.getString("RunImageCreateContainer.job")) { //$NON-NLS-1$
@Override
protected IStatus run(final IProgressMonitor monitor) {
- monitor.beginTask("Running image...", 2);
+ monitor.beginTask(
+ DVMessages.getString("RunImageRunningTask.msg"), 2); //$NON-NLS-1$
try {
final SubProgressMonitor createContainerMonitor = new SubProgressMonitor(
monitor, 1);
// create the container
- createContainerMonitor.beginTask("Creating container...",
+ createContainerMonitor.beginTask(
+ DVMessages.getString(
+ "RunImageCreatingContainerTask.msg"), //$NON-NLS-1$
1);
final String containerId = ((DockerConnection) connection)
.createContainer(containerConfig, containerName);
@@ -117,7 +121,8 @@ public class RunImageCommandHandler extends AbstractHandler {
// start the container
final SubProgressMonitor startContainerMonitor = new SubProgressMonitor(
monitor, 1);
- startContainerMonitor.beginTask("Starting container...", 1);
+ startContainerMonitor.beginTask(DVMessages
+ .getString("RunImageStartingContainerTask.msg"), 1); //$NON-NLS-1$
final RunConsole console = getRunConsole(connection,
container);
if (console != null) {
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DVMessages.properties b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DVMessages.properties
index 442f91f260..1ad5f07054 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DVMessages.properties
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DVMessages.properties
@@ -182,3 +182,10 @@ ContainersViewTitle.filtered.msg={0} ({1}/{2} Containers)
ImagesViewTitle.all.msg={0} ({1} Images)
ImagesViewTitle.filtered.msg={0} ({1}/{2} Images)
+
+RunImageUnableToRetrieveError.msg=Unable to retrieve Docker Image from current selection.
+RunImageCreateContainer.job=Create Container
+RunImageRunningTask.msg=Running image...
+RunImageCreatingContainerTask.msg=Creating container...
+RunImageStartingContainerTask.msg=Starting container...
+
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java
index a5b7461f75..ca5c727ee4 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java
@@ -99,7 +99,8 @@ public class ContainerDataVolumeDialog extends Dialog {
protected void configureShell(final Shell shell) {
super.configureShell(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
- shell.setText("Data Volume");
+ shell.setText(
+ WizardMessages.getString("ContainerDataVolumeDialog.title")); //$NON-NLS-1$
}
/**
@@ -132,7 +133,8 @@ public class ContainerDataVolumeDialog extends Dialog {
// Container path
final Label containerPathLabel = new Label(container, SWT.NONE);
- containerPathLabel.setText("Container path:");
+ containerPathLabel.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.containerPathLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(containerPathLabel);
final Text containerPathText = new Text(container, SWT.BORDER);
@@ -146,25 +148,29 @@ public class ContainerDataVolumeDialog extends Dialog {
containerPathObservable);
// mount type
final Label explanationLabel = new Label(container, SWT.NONE);
- explanationLabel.setText("Specify the type of mount:"); //$NON-NLS-1$
+ explanationLabel.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.explanationLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(true, false).applyTo(explanationLabel);
final int INDENT = 20;
// No mount
final Button noMountButton = new Button(container, SWT.RADIO);
- noMountButton.setText("No external mount");
+ noMountButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.noMountButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.indent(INDENT, 0).span(COLUMNS, 1).grab(true, false)
.applyTo(noMountButton);
bindButton(noMountButton, MountType.NONE);
// File System mount
final Button fileSystemMountButton = new Button(container, SWT.RADIO);
- fileSystemMountButton.setText("Mount a host directory or host file");
+ fileSystemMountButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.fileSystemMountButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.indent(INDENT, 0).span(COLUMNS, 1).grab(true, false)
.applyTo(fileSystemMountButton);
final Label hostPathLabel = new Label(container, SWT.NONE);
- hostPathLabel.setText("Path:"); //$NON-NLS-1$
+ hostPathLabel.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.hostPathLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.indent(2 * INDENT, SWT.DEFAULT).grab(false, false)
.applyTo(hostPathLabel);
@@ -178,7 +184,8 @@ public class ContainerDataVolumeDialog extends Dialog {
hostPathObservable);
// browse for directory
final Button hostPathDirectoryButton = new Button(container, SWT.NONE);
- hostPathDirectoryButton.setText("Directory...");
+ hostPathDirectoryButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.directoryButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(hostPathDirectoryButton);
hostPathDirectoryButton.addSelectionListener(onHostDirectoryPath());
@@ -186,9 +193,10 @@ public class ContainerDataVolumeDialog extends Dialog {
.grab(false, false).applyTo(new Label(container, SWT.NONE));
// optional read-only access
final Button readOnlyButton = new Button(container, SWT.CHECK);
- readOnlyButton.setText("Read-only access"); //$NON-NLS-1$
- readOnlyButton.setToolTipText(
- "Specify if the mounted host directory or path is read-only"); //$NON-NLS-1$
+ readOnlyButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.readOnlyButton")); //$NON-NLS-1$
+ readOnlyButton.setToolTipText(WizardMessages
+ .getString("ContainerDataVolumeDialog.readOnlyButtonTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS - 2, 1).grab(true, false).applyTo(readOnlyButton);
final ISWTObservableValue readOnlyButtonObservable = WidgetProperties
@@ -200,7 +208,8 @@ public class ContainerDataVolumeDialog extends Dialog {
.observe(model));
// browse for file
final Button hostPathFileButton = new Button(container, SWT.NONE);
- hostPathFileButton.setText("File...");
+ hostPathFileButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.fileButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(hostPathFileButton);
hostPathFileButton.addSelectionListener(onHostFilePath());
@@ -210,12 +219,14 @@ public class ContainerDataVolumeDialog extends Dialog {
// Container mount
final Button containerMountButton = new Button(container, SWT.RADIO);
- containerMountButton.setText("Mount a data volume container");
+ containerMountButton.setText(WizardMessages
+ .getString("ContainerDataVolumeDialog.containerMountButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.indent(INDENT, 0).span(COLUMNS, 1).grab(true, false)
.applyTo(containerMountButton);
final Label containerSelectionLabel = new Label(container, SWT.NONE);
- containerSelectionLabel.setText("Container:"); //$NON-NLS-1$
+ containerSelectionLabel.setText(WizardMessages.getString(
+ "ContainerDataVolumeDialog.containerSelectionLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.indent(2 * INDENT, SWT.DEFAULT)
.applyTo(containerSelectionLabel);
@@ -458,8 +469,9 @@ public class ContainerDataVolumeDialog extends Dialog {
if (!selectedContainerInfo.volumes()
.containsKey(model.getContainerPath())) {
return ValidationStatus
- .warning("The selected container does not define a "
- + model.getContainerPath() + " volume."); //$NON-NLS-1$
+ .warning(WizardMessages.getFormattedString(
+ "ContainerDataVolumeDialog.volumeWarning", //$NON-NLS-1$
+ model.getContainerPath()));
}
}
return ValidationStatus.ok();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerEnvironmentVariableDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerEnvironmentVariableDialog.java
index d438c32a5c..cf2b61d6d5 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerEnvironmentVariableDialog.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerEnvironmentVariableDialog.java
@@ -55,7 +55,8 @@ public class ContainerEnvironmentVariableDialog extends Dialog {
protected void configureShell(final Shell shell) {
super.configureShell(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
- shell.setText("Environment Variable");
+ shell.setText(WizardMessages
+ .getString("ContainerEnvironmentVariableDialog.title")); //$NON-NLS-1$
}
@Override
@@ -86,19 +87,21 @@ public class ContainerEnvironmentVariableDialog extends Dialog {
GridLayoutFactory.fillDefaults().numColumns(COLUMNS).margins(10, 10)
.applyTo(container);
final Label explanationLabel = new Label(container, SWT.NONE);
- explanationLabel
- .setText("Specify the environment variable name and value:"); //$NON-NLS-1$
+ explanationLabel.setText(WizardMessages.getString(
+ "ContainerEnvironmentVariableDialog.explanationLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(false, false).applyTo(explanationLabel);
final Label variableNameLabel = new Label(container, SWT.NONE);
- variableNameLabel.setText("Name:"); //$NON-NLS-1$
+ variableNameLabel.setText(WizardMessages
+ .getString("ContainerEnvironmentVariableDialog.nameLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(variableNameLabel);
final Text variableNameText = new Text(container, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).applyTo(variableNameText);
final Label variableValueLabel = new Label(container, SWT.NONE);
- variableValueLabel.setText("Value:"); //$NON-NLS-1$
+ variableValueLabel.setText(WizardMessages
+ .getString("ContainerEnvironmentVariableDialog.valueLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(variableValueLabel);
final Text variableValueText = new Text(container, SWT.BORDER);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerLinkDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerLinkDialog.java
index 9287df4e5d..99da54fc24 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerLinkDialog.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerLinkDialog.java
@@ -81,7 +81,7 @@ public class ContainerLinkDialog extends Dialog {
protected void configureShell(final Shell shell) {
super.configureShell(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
- shell.setText("Container Linking");
+ shell.setText(WizardMessages.getString("ContainerLinkDialog.title")); //$NON-NLS-1$
}
@Override
@@ -113,11 +113,13 @@ public class ContainerLinkDialog extends Dialog {
.applyTo(container);
final Label explanationLabel = new Label(container, SWT.NONE);
explanationLabel
- .setText("Select a container to link and give it an alias:"); //$NON-NLS-1$
+.setText(WizardMessages
+ .getString("ContainerLinkDialog.explanationLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(false, false).applyTo(explanationLabel);
final Label containerLabel = new Label(container, SWT.NONE);
- containerLabel.setText("Container:"); //$NON-NLS-1$
+ containerLabel.setText(
+ WizardMessages.getString("ContainerLinkDialog.containerLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(containerLabel);
final Combo containerSelectionCombo = new Combo(container, SWT.NONE);
@@ -144,7 +146,8 @@ public class ContainerLinkDialog extends Dialog {
containerSelectionCombo),
null, null);
final Label aliasLabel = new Label(container, SWT.NONE);
- aliasLabel.setText("Alias:"); //$NON-NLS-1$
+ aliasLabel.setText(
+ WizardMessages.getString("ContainerLinkDialog.aliasLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(aliasLabel);
final Text containerAliasText = new Text(container, SWT.BORDER);
@@ -247,9 +250,9 @@ public class ContainerLinkDialog extends Dialog {
class ContainerLinkDialogModel extends BaseDatabindingModel {
- public static final String CONTAINER_NAME = "containerName";
+ public static final String CONTAINER_NAME = "containerName"; //$NON-NLS-1$
- public static final String CONTAINER_ALIAS = "containerAlias";
+ public static final String CONTAINER_ALIAS = "containerAlias"; //$NON-NLS-1$
private String containerName;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerPortDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerPortDialog.java
index fb97433de0..8eac7e81c4 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerPortDialog.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerPortDialog.java
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Text;
*/
public class ContainerPortDialog extends Dialog {
- private static final String PORT_TYPE = "/tcp";
+ private static final String PORT_TYPE = "/tcp"; //$NON-NLS-1$
private final ContainerPortDialogModel model;
@@ -62,7 +62,8 @@ public class ContainerPortDialog extends Dialog {
protected void configureShell(final Shell shell) {
super.configureShell(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
- shell.setText("Exposing a Container Port");
+ shell.setText(
+ WizardMessages.getString("ContainerPortDialog.shellTitle")); //$NON-NLS-1$
}
/**
@@ -93,25 +94,29 @@ public class ContainerPortDialog extends Dialog {
GridLayoutFactory.fillDefaults().numColumns(COLUMNS).margins(10, 10)
.applyTo(container);
final Label explanationLabel = new Label(container, SWT.NONE);
- explanationLabel.setText("Specify the container port to expose:"); //$NON-NLS-1$
+ explanationLabel.setText(WizardMessages
+ .getString("ContainerPortDialog.explanationLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(false, false).applyTo(explanationLabel);
final Label containerLabel = new Label(container, SWT.NONE);
- containerLabel.setText("Container port:"); //$NON-NLS-1$
+ containerLabel.setText(
+ WizardMessages.getString("ContainerPortDialog.containerLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(containerLabel);
final Text containerPortText = new Text(container, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).applyTo(containerPortText);
final Label hostAddressLabel = new Label(container, SWT.NONE);
- hostAddressLabel.setText("Host address:"); //$NON-NLS-1$
+ hostAddressLabel.setText(WizardMessages
+ .getString("ContainerPortDialog.hostAddressLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(hostAddressLabel);
final Text hostAddressText = new Text(container, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).applyTo(hostAddressText);
final Label hostPortLabel = new Label(container, SWT.NONE);
- hostPortLabel.setText("Host port:"); //$NON-NLS-1$
+ hostPortLabel.setText(
+ WizardMessages.getString("ContainerPortDialog.hostPortLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(hostPortLabel);
final Text hostPortText = new Text(container, SWT.BORDER);
@@ -187,11 +192,11 @@ public class ContainerPortDialog extends Dialog {
class ContainerPortDialogModel extends BaseDatabindingModel {
- public static final String CONTAINER_PORT = "containerPort";
+ public static final String CONTAINER_PORT = "containerPort"; //$NON-NLS-1$
- public static final String HOST_ADDRESS = "hostAddress";
+ public static final String HOST_ADDRESS = "hostAddress"; //$NON-NLS-1$
- public static final String HOST_PORT = "hostPort";
+ public static final String HOST_PORT = "hostPort"; //$NON-NLS-1$
private String containerPort;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/DataVolumeModel.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/DataVolumeModel.java
index 0a670b03c5..9cc4a14021 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/DataVolumeModel.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/DataVolumeModel.java
@@ -22,17 +22,17 @@ import org.eclipse.linuxtools.internal.docker.ui.wizards.ImageRunResourceVolumes
public class DataVolumeModel extends BaseDatabindingModel
implements Comparable<DataVolumeModel> {
- public static final String CONTAINER_PATH = "containerPath";
+ public static final String CONTAINER_PATH = "containerPath"; //$NON-NLS-1$
- public static final String MOUNT_TYPE = "mountType";
+ public static final String MOUNT_TYPE = "mountType"; //$NON-NLS-1$
- public static final String MOUNT = "mount";
+ public static final String MOUNT = "mount"; //$NON-NLS-1$
- public static final String HOST_PATH_MOUNT = "hostPathMount";
+ public static final String HOST_PATH_MOUNT = "hostPathMount"; //$NON-NLS-1$
- public static final String READ_ONLY_VOLUME = "readOnly";
+ public static final String READ_ONLY_VOLUME = "readOnly"; //$NON-NLS-1$
- public static final String CONTAINER_MOUNT = "containerMount";
+ public static final String CONTAINER_MOUNT = "containerMount"; //$NON-NLS-1$
private final String id = UUID.randomUUID().toString();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EnvironmentVariableModel.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EnvironmentVariableModel.java
index 0704218cd8..def2eac997 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EnvironmentVariableModel.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EnvironmentVariableModel.java
@@ -21,9 +21,9 @@ import org.eclipse.linuxtools.internal.docker.ui.databinding.BaseDatabindingMode
*/
public class EnvironmentVariableModel extends BaseDatabindingModel {
- public static final String NAME = "name";
+ public static final String NAME = "name"; //$NON-NLS-1$
- public static final String VALUE = "value";
+ public static final String VALUE = "value"; //$NON-NLS-1$
private String name;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRun.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRun.java
index 13399af89d..09dde9b18f 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRun.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRun.java
@@ -54,7 +54,7 @@ public class ImageRun extends Wizard {
*/
public ImageRun(final IDockerConnection connection) throws DockerException {
super();
- setWindowTitle("Run a Docker Image");
+ setWindowTitle(WizardMessages.getString("ImageRun.title")); //$NON-NLS-1$
setNeedsProgressMonitor(true);
this.imageRunSelectionPage = new ImageRunSelectionPage(connection);
this.imageRunResourceVolumesPage = new ImageRunResourceVolumesVariablesPage(
@@ -69,7 +69,7 @@ public class ImageRun extends Wizard {
* @throws DockerException
*/
public ImageRun(final IDockerImage selectedImage) throws DockerException {
- setWindowTitle("Run a Docker Image");
+ setWindowTitle(WizardMessages.getString("ImageRun.title")); //$NON-NLS-1$
setNeedsProgressMonitor(true);
this.imageRunSelectionPage = new ImageRunSelectionPage(selectedImage);
this.imageRunResourceVolumesPage = new ImageRunResourceVolumesVariablesPage(
@@ -196,7 +196,7 @@ public class ImageRun extends Wizard {
for (Iterator<EnvironmentVariableModel> iterator = resourcesModel
.getEnvironmentVariables().iterator(); iterator.hasNext();) {
final EnvironmentVariableModel var = iterator.next();
- environmentVariables.add(var.getName() + "=" + var.getValue());
+ environmentVariables.add(var.getName() + "=" + var.getValue()); //$NON-NLS-1$
}
config.env(environmentVariables);
return config.build();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesModel.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesModel.java
index 30d9628c67..bca3937a42 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesModel.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesModel.java
@@ -43,17 +43,17 @@ public class ImageRunResourceVolumesVariablesModel
/** the 'high' CPU share weight variableValue. */
public static final int HIGH = 2048;
- public static final String ENABLE_RESOURCE_LIMITATIONS = "enableResourceLimitations";
+ public static final String ENABLE_RESOURCE_LIMITATIONS = "enableResourceLimitations"; //$NON-NLS-1$
- public static final String CPU_SHARE_WEIGHT = "cpuShareWeight";
+ public static final String CPU_SHARE_WEIGHT = "cpuShareWeight"; //$NON-NLS-1$
- public static final String MEMORY_LIMIT = "memoryLimit";
+ public static final String MEMORY_LIMIT = "memoryLimit"; //$NON-NLS-1$
- public static final String DATA_VOLUMES = "dataVolumes";
+ public static final String DATA_VOLUMES = "dataVolumes"; //$NON-NLS-1$
- public static final String SELECTED_DATA_VOLUMES = "selectedDataVolumes";
+ public static final String SELECTED_DATA_VOLUMES = "selectedDataVolumes"; //$NON-NLS-1$
- public static final String ENVIRONMENT_VARIABLES = "environmentVariables";
+ public static final String ENVIRONMENT_VARIABLES = "environmentVariables"; //$NON-NLS-1$
private boolean enableResourceLimitations = false;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesPage.java
index 4f9dbe5835..b377061799 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesPage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunResourceVolumesVariablesPage.java
@@ -71,7 +71,7 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
public ImageRunResourceVolumesVariablesPage(
final IDockerConnection connection) throws DockerException {
super("ImageSelectionPage", //$NON-NLS-1$
- "Volumes, Environment Variables and Resource Limitations", //$NON-NLS-1$
+ WizardMessages.getString("ImageRunResourceVolVarPage.title"), //$NON-NLS-1$
SWTImagesFactory.DESC_BANNER_REPOSITORY);
setPageComplete(true);
this.model = new ImageRunResourceVolumesVariablesModel(connection);
@@ -113,7 +113,8 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
GridLayoutFactory.fillDefaults().spacing(10, 2).applyTo(container);
final Button enableResourceLimitationButton = new Button(container,
SWT.CHECK);
- enableResourceLimitationButton.setText("Enable resource limitations"); //$NON-NLS-1$
+ enableResourceLimitationButton.setText(WizardMessages.getString(
+ "ImageRunResourceVolVarPage.enableLimitationButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.applyTo(enableResourceLimitationButton);
dbc.bindValue(
@@ -134,19 +135,22 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
// specify CPU limitation
final Label cpuPriorityLabel = new Label(subContainer, SWT.NONE);
- cpuPriorityLabel.setText("CPU priority:"); //$NON-NLS-1$
+ cpuPriorityLabel.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.cpuPriorityLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(cpuPriorityLabel);
final Button lowCPULimitationButton = new Button(subContainer,
SWT.RADIO);
- lowCPULimitationButton.setText("Low");
+ lowCPULimitationButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.lowButton")); //$NON-NLS-1$
lowCPULimitationButton.addSelectionListener(
onCpuShareWeighting(ImageRunResourceVolumesVariablesModel.LOW));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.applyTo(lowCPULimitationButton);
final Button mediumCPULimitationButton = new Button(subContainer,
SWT.RADIO);
- mediumCPULimitationButton.setText("Medium");
+ mediumCPULimitationButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.mediumButton")); //$NON-NLS-1$
mediumCPULimitationButton.addSelectionListener(onCpuShareWeighting(
ImageRunResourceVolumesVariablesModel.MEDIUM));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
@@ -154,7 +158,8 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
final Button highCPULimitationButton = new Button(subContainer,
SWT.RADIO);
mediumCPULimitationButton.setSelection(true);
- highCPULimitationButton.setText("High");
+ highCPULimitationButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.highButton")); //$NON-NLS-1$
highCPULimitationButton.addSelectionListener(onCpuShareWeighting(
ImageRunResourceVolumesVariablesModel.HIGH));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(2, 1)
@@ -169,7 +174,8 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
// Memory limitation
final Label memoryLimitLabel = new Label(subContainer, SWT.NONE);
- memoryLimitLabel.setText("Memory limit:"); //$NON-NLS-1$
+ memoryLimitLabel.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.memoryLimit")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(memoryLimitLabel);
final Scale memoryLimitSpinner = new Scale(subContainer, SWT.NONE);
@@ -241,7 +247,8 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
private void createVolumeSettingsContainer(final Composite container) {
final Label volumesLabel = new Label(container, SWT.NONE);
- volumesLabel.setText("Data Volumes:"); //$NON-NLS-1$
+ volumesLabel.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.dataVolumesLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(COLUMNS, 1).applyTo(volumesLabel);
final CheckboxTableViewer dataVolumesTableViewer = createVolumesTable(
@@ -259,19 +266,22 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
final Button addButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(addButton);
- addButton.setText("Add..."); //$NON-NLS-1$
+ addButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.addButton")); //$NON-NLS-1$
addButton.addSelectionListener(onAddDataVolume(dataVolumesTableViewer));
final Button editButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(editButton);
- editButton.setText("Edit..."); //$NON-NLS-1$
+ editButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.editButton")); //$NON-NLS-1$
editButton
.addSelectionListener(onEditDataVolume(dataVolumesTableViewer));
editButton.setEnabled(false);
final Button removeButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(removeButton);
- removeButton.setText("Remove"); //$NON-NLS-1$
+ removeButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.removeButton")); //$NON-NLS-1$
removeButton.addSelectionListener(
onRemoveDataVolumes(dataVolumesTableViewer));
removeButton.setEnabled(false);
@@ -416,11 +426,17 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
BeanProperties
.set(ImageRunResourceVolumesVariablesModel.SELECTED_DATA_VOLUMES)
.observe(model));
- addTableViewerColum(tableViewer, "Container Path", //$NON-NLS-1$
+ addTableViewerColum(tableViewer,
+ WizardMessages.getString(
+ "ImageRunResourceVolVarPage.containerPathColumn"), //$NON-NLS-1$
150);
- addTableViewerColum(tableViewer, "Mount", //$NON-NLS-1$
+ addTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunResourceVolVarPage.mountColumn"), //$NON-NLS-1$
150);
- addTableViewerColum(tableViewer, "Read-only", //$NON-NLS-1$
+ addTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunResourceVolVarPage.readonlyColumn"), //$NON-NLS-1$
60);
return tableViewer;
}
@@ -439,10 +455,11 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
private void createEnvironmentVariablesContainer(
final Composite container) {
- final Label volumesLabel = new Label(container, SWT.NONE);
- volumesLabel.setText("Environment variables:"); //$NON-NLS-1$
+ final Label envVarLabel = new Label(container, SWT.NONE);
+ envVarLabel.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.envVarLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
- .grab(true, false).span(COLUMNS, 1).applyTo(volumesLabel);
+ .grab(true, false).span(COLUMNS, 1).applyTo(envVarLabel);
final TableViewer environmentVariablesTableViewer = createEnvironmentVariablesTable(
container);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
@@ -458,13 +475,15 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
final Button addButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(addButton);
- addButton.setText("Add..."); //$NON-NLS-1$
+ addButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.addButton")); //$NON-NLS-1$
addButton.setEnabled(true);
addButton.addSelectionListener(onAddEnvironmentVariable());
final Button editButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(editButton);
- editButton.setText("Edit..."); //$NON-NLS-1$
+ editButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.editButton")); //$NON-NLS-1$
editButton.setEnabled(true);
editButton.addSelectionListener(
onEditEnvironmentVariable(environmentVariablesTableViewer));
@@ -472,7 +491,8 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
final Button removeButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(removeButton);
- removeButton.setText("Remove"); //$NON-NLS-1$
+ removeButton.setText(WizardMessages
+ .getString("ImageRunResourceVolVarPage.removeButton")); //$NON-NLS-1$
removeButton.addSelectionListener(
onRemoveEnvironmentVariables(environmentVariablesTableViewer));
removeButton.setEnabled(false);
@@ -493,9 +513,13 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
final TableViewer tableViewer = new TableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- addTableViewerColum(tableViewer, "Name", //$NON-NLS-1$
+ addTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunResourceVolVarPage.nameColumn"), //$NON-NLS-1$
200);
- addTableViewerColum(tableViewer, "Value", //$NON-NLS-1$
+ addTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunResourceVolVarPage.valueColumn"), //$NON-NLS-1$
200);
return tableViewer;
}
@@ -602,9 +626,11 @@ public class ImageRunResourceVolumesVariablesPage extends WizardPage {
if (dataVolume.getMountType() != MountType.HOST_FILE_SYSTEM) {
return null;
} else if (dataVolume.isReadOnly()) {
- return "true";
+ return WizardMessages
+ .getString("ImageRunResourceVolVarPage.true"); //$NON-NLS-1$
}
- return "false";
+ return WizardMessages
+ .getString("ImageRunResourceVolVarPage.false"); //$NON-NLS-1$
default:
return null;
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionModel.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionModel.java
index 40abe1eeb1..eeddbd3bfb 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionModel.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionModel.java
@@ -39,27 +39,27 @@ public class ImageRunSelectionModel extends BaseDatabindingModel {
public static final String SELECTED_IMAGE_NEEDS_PULLING = "selectedImageNeedsPulling"; //$NON-NLS-1$
- public static final String IMAGE_NAMES = "imageNames";
+ public static final String IMAGE_NAMES = "imageNames"; //$NON-NLS-1$
- public static final String CONTAINER_NAME = "containerName";
+ public static final String CONTAINER_NAME = "containerName"; //$NON-NLS-1$
- public static final String COMMAND = "command";
+ public static final String COMMAND = "command"; //$NON-NLS-1$
- public static final String ENTRYPOINT = "entrypoint";
+ public static final String ENTRYPOINT = "entrypoint"; //$NON-NLS-1$
- public static final String PUBLISH_ALL_PORTS = "publishAllPorts";
+ public static final String PUBLISH_ALL_PORTS = "publishAllPorts"; //$NON-NLS-1$
- public static final String EXPOSED_PORTS = "exposedPorts";
+ public static final String EXPOSED_PORTS = "exposedPorts"; //$NON-NLS-1$
- public static final String SELECTED_PORTS = "selectedPorts";
+ public static final String SELECTED_PORTS = "selectedPorts"; //$NON-NLS-1$
- public static final String LINKS = "links";
+ public static final String LINKS = "links"; //$NON-NLS-1$
- public static final String INTERACTIVE_MODE = "interactiveMode";
+ public static final String INTERACTIVE_MODE = "interactiveMode"; //$NON-NLS-1$
- public static final String ALLOCATE_PSEUDO_TTY = "allocatePseudoTTY";
+ public static final String ALLOCATE_PSEUDO_TTY = "allocatePseudoTTY"; //$NON-NLS-1$
- public static final String REMOVE_WHEN_EXITS = "removeWhenExits";
+ public static final String REMOVE_WHEN_EXITS = "removeWhenExits"; //$NON-NLS-1$
private final IDockerConnection selectedConnection;
@@ -305,15 +305,15 @@ public class ImageRunSelectionModel extends BaseDatabindingModel {
public static class ExposedPortModel extends BaseDatabindingModel
implements Comparable<ExposedPortModel> {
- public static final String SELECTED = "selected";
+ public static final String SELECTED = "selected"; //$NON-NLS-1$
- public static final String CONTAINER_PORT = "containerPort";
+ public static final String CONTAINER_PORT = "containerPort"; //$NON-NLS-1$
- public static final String PORT_TYPE = "portType";
+ public static final String PORT_TYPE = "portType"; //$NON-NLS-1$
- public static final String HOST_ADDRESS = "hostAddress";
+ public static final String HOST_ADDRESS = "hostAddress"; //$NON-NLS-1$
- public static final String HOST_PORT = "hostPort";
+ public static final String HOST_PORT = "hostPort"; //$NON-NLS-1$
private final String id = UUID.randomUUID().toString();
@@ -338,8 +338,8 @@ public class ImageRunSelectionModel extends BaseDatabindingModel {
public ExposedPortModel(final String privatePort, final String type,
final String hostAddress, final String hostPort) {
Assert.isNotNull(privatePort,
- "Port Mapping privatePort cannot be null");
- Assert.isNotNull(type, "Port Mapping portType cannot be null");
+ "Port Mapping privatePort cannot be null"); //$NON-NLS-1$
+ Assert.isNotNull(type, "Port Mapping portType cannot be null"); //$NON-NLS-1$
this.containerPort = privatePort;
this.hostPort = hostPort;
this.portType = type;
@@ -424,9 +424,9 @@ public class ImageRunSelectionModel extends BaseDatabindingModel {
public class ContainerLinkModel extends BaseDatabindingModel {
- public static final String CONTAINER_NAME = "containerName";
+ public static final String CONTAINER_NAME = "containerName"; //$NON-NLS-1$
- public static final String CONTAINER_ALIAS = "containerAlias";
+ public static final String CONTAINER_ALIAS = "containerAlias"; //$NON-NLS-1$
private String containerName;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionPage.java
index 3b8c2dff12..ff47d3f4f1 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionPage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRunSelectionPage.java
@@ -108,9 +108,10 @@ public class ImageRunSelectionPage extends WizardPage {
*
*/
public ImageRunSelectionPage(final IDockerImage selectedImage) {
- super("ImageSelectionPage", "Docker Container settings", //$NON-NLS-1$ //$NON-NLS-2$
+ super("ImageSelectionPage", //$NON-NLS-1$
+ WizardMessages.getString("ImageSelectionPage.title"), //$NON-NLS-1$
SWTImagesFactory.DESC_BANNER_REPOSITORY);
- setMessage("Run a Docker Image"); //$NON-NLS-1$
+ setMessage(WizardMessages.getString("ImageSelectionPage.runImage")); //$NON-NLS-1$
setPageComplete(true);
this.model = new ImageRunSelectionModel(selectedImage);
}
@@ -124,9 +125,10 @@ public class ImageRunSelectionPage extends WizardPage {
*/
public ImageRunSelectionPage(final IDockerConnection selectedConnection) {
super("ImageSelectionPage", //$NON-NLS-1$
- "Image Selection and Exposed Port Publishing", //$NON-NLS-1$
+ WizardMessages.getString("ImageSelectionPage.exposedPortTitle"), //$NON-NLS-1$
SWTImagesFactory.DESC_BANNER_REPOSITORY);
- setMessage("Select the Docker Image to run and the ports to expose"); //$NON-NLS-1$
+ setMessage(WizardMessages
+ .getString("ImageRunSelectionPage.exposedPortMsg")); //$NON-NLS-1$
setPageComplete(false);
this.model = new ImageRunSelectionModel(selectedConnection);
}
@@ -202,7 +204,8 @@ public class ImageRunSelectionPage extends WizardPage {
final Combo imageSelectionCombo = new Combo(container, SWT.BORDER);
final ComboViewer imageSelectionComboViewer = new ComboViewer(
imageSelectionCombo);
- imageSelectionCombo.setToolTipText("Select the Docker Image to run"); //$NON-NLS-1$
+ imageSelectionCombo.setToolTipText(WizardMessages
+ .getString("ImageRunSelectionPage.selectTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(1, 1).applyTo(imageSelectionCombo);
new ControlDecoration(imageSelectionCombo, SWT.TOP | SWT.LEFT);
@@ -222,7 +225,8 @@ public class ImageRunSelectionPage extends WizardPage {
null, null);
// image search
final Button searchImageButton = new Button(container, SWT.NONE);
- searchImageButton.setText("Search..."); //$NON-NLS-1$
+ searchImageButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.search")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).span(1, 1).applyTo(searchImageButton);
searchImageButton.addSelectionListener(onSearchImage());
@@ -231,7 +235,8 @@ public class ImageRunSelectionPage extends WizardPage {
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).span(1, 1).applyTo(fillerLabel);
final Link pullImageLink = new Link(container, SWT.NONE);
- pullImageLink.setText("<a>Pull this image...</a>");
+ pullImageLink.setText(
+ WizardMessages.getString("ImageRunSelectionPage.pullImage")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(COLUMNS - 1, 1).applyTo(pullImageLink);
pullImageLink.addSelectionListener(onPullImage());
@@ -259,8 +264,8 @@ public class ImageRunSelectionPage extends WizardPage {
.grab(false, false).applyTo(imageSelectionLabel);
containerNameLabel.setText("Name:"); //$NON-NLS-1$
final Text containerNameText = new Text(container, SWT.BORDER);
- containerNameText.setToolTipText(
- "a UUID long identifier, a UUID short identifier or a String"); //$NON-NLS-1$
+ containerNameText.setToolTipText(WizardMessages
+ .getString("ImageRunSelectionPage.containerTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(1, 1).applyTo(containerNameText);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
@@ -277,7 +282,8 @@ public class ImageRunSelectionPage extends WizardPage {
final Label entrypointLabel = new Label(container, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(imageSelectionLabel);
- entrypointLabel.setText("Entrypoint:"); //$NON-NLS-1$
+ entrypointLabel.setText(
+ WizardMessages.getString("ImageRunSelectionPage.entrypoint")); //$NON-NLS-1$
// TODO: include SWT.SEARCH | SWT.ICON_SEARCH to support value reset
final Text entrypointText = new Text(container, SWT.BORDER);
@@ -296,7 +302,8 @@ public class ImageRunSelectionPage extends WizardPage {
final Label commandLabel = new Label(container, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(imageSelectionLabel);
- commandLabel.setText("Command:"); //$NON-NLS-1$
+ commandLabel.setText(
+ WizardMessages.getString("ImageRunSelectionPage.command")); //$NON-NLS-1$
final Text commandText = new Text(container, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(1, 1).applyTo(commandText);
@@ -310,8 +317,8 @@ public class ImageRunSelectionPage extends WizardPage {
private void createPortSettingsSection(final Composite container) {
final Button publishAllPortsButton = new Button(container, SWT.CHECK);
- publishAllPortsButton.setText(
- "Publish all exposed ports to random ports on the host interfaces"); //$NON-NLS-1$
+ publishAllPortsButton.setText(WizardMessages
+ .getString("ImageRunSelectionPage.publishAllPorts")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(true, false)
.applyTo(publishAllPortsButton);
@@ -324,7 +331,7 @@ public class ImageRunSelectionPage extends WizardPage {
// specify ports
final Label portSettingsLabel = new Label(container, SWT.NONE);
portSettingsLabel.setText(
- "Only publish the selected container ports below to the host:");
+ WizardMessages.getString("ImageRunSelectionPage.portSettings")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(COLUMNS, 1).indent(INDENT, 0)
.applyTo(portSettingsLabel);
@@ -342,18 +349,21 @@ public class ImageRunSelectionPage extends WizardPage {
final Button addButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(addButton);
- addButton.setText("Add"); //$NON-NLS-1$
+ addButton
+ .setText(WizardMessages.getString("ImageRunSelectionPage.add")); //$NON-NLS-1$
addButton.addSelectionListener(onAddPort());
final Button editButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(editButton);
- editButton.setText("Edit..."); //$NON-NLS-1$
+ editButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.editButton")); //$NON-NLS-1$
editButton.setEnabled(false);
editButton.addSelectionListener(onEditPort(exposedPortsTableViewer));
final Button removeButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(removeButton);
- removeButton.setText("Remove"); //$NON-NLS-1$
+ removeButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.remove")); //$NON-NLS-1$
removeButton
.addSelectionListener(onRemovePorts(exposedPortsTableViewer));
BeanProperties
@@ -405,13 +415,20 @@ public class ImageRunSelectionPage extends WizardPage {
final CheckboxTableViewer tableViewer = new CheckboxTableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- createTableViewerColum(tableViewer, "Container Port", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunSelectionPage.containerPortColumn"), //$NON-NLS-1$
100);
- createTableViewerColum(tableViewer, "Type", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages.getString("ImageRunSelectionPage.typeColumn"), //$NON-NLS-1$
50);
- createTableViewerColum(tableViewer, "Host Address", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunSelectionPage.hostAddressColumn"), //$NON-NLS-1$
100);
- createTableViewerColum(tableViewer, "Host Port", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunSelectionPage.hostPortColumn"), //$NON-NLS-1$
100);
tableViewer.setContentProvider(new ObservableListContentProvider());
return tableViewer;
@@ -432,7 +449,8 @@ public class ImageRunSelectionPage extends WizardPage {
private void createLinkSettingsSection(final Composite container) {
final Label linksLabel = new Label(container, SWT.NONE);
- linksLabel.setText("Links to other containers:");
+ linksLabel.setText(
+ WizardMessages.getString("ImageRunSelectionPage.links"));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).span(COLUMNS, 1).applyTo(linksLabel);
final TableViewer linksTableViewer = createLinksTable(container);
@@ -449,18 +467,21 @@ public class ImageRunSelectionPage extends WizardPage {
final Button addButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(addButton);
- addButton.setText("Add..."); //$NON-NLS-1$
+ addButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.addButton")); //$NON-NLS-1$
addButton.addSelectionListener(onAddLink());
final Button editButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(editButton);
- editButton.setText("Edit..."); //$NON-NLS-1$
+ editButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.editButton")); //$NON-NLS-1$
editButton.setEnabled(false);
editButton.addSelectionListener(onEditLink(linksTableViewer));
final Button removeButton = new Button(buttonsContainers, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP)
.grab(true, false).applyTo(removeButton);
- removeButton.setText("Remove"); //$NON-NLS-1$
+ removeButton.setText(
+ WizardMessages.getString("ImageRunSelectionPage.remove")); //$NON-NLS-1$
removeButton.addSelectionListener(onRemoveLinks(linksTableViewer));
removeButton.setEnabled(false);
ViewerSupport
@@ -481,9 +502,12 @@ public class ImageRunSelectionPage extends WizardPage {
final TableViewer tableViewer = new TableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- createTableViewerColum(tableViewer, "Container Name", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages
+ .getString("ImageRunSelectionPage.containerNameColumn"), //$NON-NLS-1$
200);
- createTableViewerColum(tableViewer, "Alias", //$NON-NLS-1$
+ createTableViewerColum(tableViewer,
+ WizardMessages.getString("ImageRunSelectionPage.aliasColumn"), //$NON-NLS-1$
150);
return tableViewer;
}
@@ -550,7 +574,7 @@ public class ImageRunSelectionPage extends WizardPage {
// interactive/show in console mode
final Button interactiveButton = new Button(container, SWT.CHECK);
interactiveButton.setText(
- "Keep STDIN open to Console even if not attached (-i)"); //$NON-NLS-1$
+ WizardMessages.getString("ImageRunSelectionPage.openStdin")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(true, false).applyTo(interactiveButton);
dbc.bindValue(WidgetProperties.selection().observe(interactiveButton),
@@ -560,7 +584,8 @@ public class ImageRunSelectionPage extends WizardPage {
.observe(model));
// allocate pseudo-TTY
final Button allocatePseudoTTY = new Button(container, SWT.CHECK);
- allocatePseudoTTY.setText("Allocate pseudo-TTY from Console (-t)"); //$NON-NLS-1$
+ allocatePseudoTTY
+ .setText(WizardMessages.getString("ImageRunSelectionPage.tty")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(true, false).applyTo(allocatePseudoTTY);
dbc.bindValue(WidgetProperties.selection().observe(allocatePseudoTTY),
@@ -572,7 +597,7 @@ public class ImageRunSelectionPage extends WizardPage {
// remove when exits
final Button removeWhenExitsButton = new Button(container, SWT.CHECK);
removeWhenExitsButton.setText(
- "Automatically remove the container when it exits (--rm)"); //$NON-NLS-1$
+ WizardMessages.getString("ImageRunSelectionPage.autoRemove")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.span(COLUMNS, 1).grab(true, false)
.applyTo(removeWhenExitsButton);
@@ -753,9 +778,9 @@ public class ImageRunSelectionPage extends WizardPage {
final String privatePort = exposedPort.substring(0,
exposedPort.indexOf('/'));
final String type = exposedPort
- .substring(exposedPort.indexOf('/'));
+ .substring(exposedPort.indexOf('/')); // $NON-NLS-1$
availablePorts.add(
- new ExposedPortModel(privatePort, type, "", ""));
+ new ExposedPortModel(privatePort, type, "", "")); //$NON-NLS-1$
}
}
model.setExposedPorts(availablePorts);
@@ -787,7 +812,8 @@ public class ImageRunSelectionPage extends WizardPage {
final IDockerConnection connection = model
.getSelectedConnection();
final String imageName = model.getSelectedImageName();
- monitor.beginTask("Pulling image '" + imageName + "'", 1);
+ monitor.beginTask(WizardMessages.getFormattedString(
+ "ImageRunSelectionPage.pullingTask", imageName), 1); //$NON-NLS-1$
try {
connection.pullImage(imageName,
new ImagePullProgressHandler(connection,
@@ -861,16 +887,17 @@ public class ImageRunSelectionPage extends WizardPage {
.getValue();
if (selectedImageName.isEmpty()) {
model.setSelectedImageNeedsPulling(false);
- return ValidationStatus
- .error("Please specify the image to run."); //$NON-NLS-1$
+ return ValidationStatus.error(WizardMessages
+ .getString("ImageRunSelectionPage.specifyImageMsg")); //$NON-NLS-1$
}
if (model.getSelectedImage() != null) {
model.setSelectedImageNeedsPulling(false);
return ValidationStatus.ok();
}
model.setSelectedImageNeedsPulling(true);
- return ValidationStatus.warning("Image named '" + selectedImageName
- + "' does not exist locally. Click on the link under the 'Image' combo to start pulling it."); //$NON-NLS-1$
+ return ValidationStatus.warning(WizardMessages.getFormattedString(
+ "ImageRunSelectionPage.imageNotFoundMessage", //$NON-NLS-1$
+ selectedImageName));
}
@Override
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageSearchPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageSearchPage.java
index 2b860a0afb..08852dec59 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageSearchPage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageSearchPage.java
@@ -78,9 +78,10 @@ public class ImageSearchPage extends WizardPage {
* Default constructor.
*/
public ImageSearchPage(final ImageSearchModel model) {
- super("ImageSearchPage", "Search the Docker Registry for images", //$NON-NLS-1$ //$NON-NLS-2$
+ super("ImageSearchPage", //$NON-NLS-1$
+ WizardMessages.getString("ImageSearchPage.title"), //$NON-NLS-1$
SWTImagesFactory.DESC_BANNER_REPOSITORY);
- setMessage("Search the Docker Registry for images"); //$NON-NLS-1$
+ setMessage(WizardMessages.getString("ImageSearchPage.title")); //$NON-NLS-1$
this.model = model;
}
@@ -100,7 +101,8 @@ public class ImageSearchPage extends WizardPage {
.spacing(10, 2).applyTo(container);
// search text
final Label searchImageLabel = new Label(container, SWT.NONE);
- searchImageLabel.setText("Image:"); //$NON-NLS-1$
+ searchImageLabel.setText(
+ WizardMessages.getString("ImageSearchPage.imageLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(searchImageLabel);
final Text searchImageText = new Text(container,
@@ -110,14 +112,16 @@ public class ImageSearchPage extends WizardPage {
searchImageText.addKeyListener(onKeyPressed());
searchImageText.addTraverseListener(onSearchImageTextTraverse());
searchImageButton = new Button(container, SWT.NONE);
- searchImageButton.setText("Search");
+ searchImageButton
+ .setText(WizardMessages.getString("ImageSearchPage.search")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(false, false).applyTo(searchImageButton);
searchImageButton.addSelectionListener(onSearchImageButtonSelected());
searchImageButton.setEnabled(!searchImageText.getText().isEmpty());
// result table
final Label searchResultLabel = new Label(container, SWT.NONE);
- searchResultLabel.setText("Matching images");
+ searchResultLabel.setText(
+ WizardMessages.getString("ImageSearchPage.searchResultLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).span(COLUMNS, 1).applyTo(searchResultLabel);
final Table table = new Table(container,
@@ -125,15 +129,23 @@ public class ImageSearchPage extends WizardPage {
final TableViewer searchResultTableViewer = new TableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- addTableViewerColum(searchResultTableViewer, "Name", SWT.NONE, //$NON-NLS-1$
+ addTableViewerColum(searchResultTableViewer,
+ WizardMessages.getString("ImageSearchPage.nameColumn"), //$NON-NLS-1$
+ SWT.NONE,
SWT.RIGHT, 290, new ImageNameColumnLabelProvider());
- addTableViewerColum(searchResultTableViewer, "Stars", SWT.NONE, //$NON-NLS-1$
+ addTableViewerColum(searchResultTableViewer,
+ WizardMessages.getString("ImageSearchPage.starsColumn"), //$NON-NLS-1$
+ SWT.NONE,
SWT.RIGHT,
70, new ImageStarsColumnLabelProvider());
- addTableViewerColum(searchResultTableViewer, "Official", SWT.NONE, //$NON-NLS-1$
+ addTableViewerColum(searchResultTableViewer,
+ WizardMessages.getString("ImageSearchPage.officialColumn"), //$NON-NLS-1$
+ SWT.NONE,
SWT.CENTER,
70, new ImageOfficialColumnLabelProvider());
- addTableViewerColum(searchResultTableViewer, "Automated", SWT.NONE, //$NON-NLS-1$
+ addTableViewerColum(searchResultTableViewer,
+ WizardMessages.getString("ImageSearchPage.automatedColumn"), //$NON-NLS-1$
+ SWT.NONE,
SWT.CENTER,
70, new ImageAutomatedColumnLabelProvider());
searchResultTableViewer
@@ -145,7 +157,7 @@ public class ImageSearchPage extends WizardPage {
// description text area
final Group selectedImageDescriptionGroup = new Group(container,
SWT.BORDER);
- selectedImageDescriptionGroup.setText("Description");
+ selectedImageDescriptionGroup.setText(WizardMessages.getString("ImageSearchPage.descriptionGroup")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, true).span(COLUMNS, 1)
.applyTo(selectedImageDescriptionGroup);
@@ -198,7 +210,7 @@ public class ImageSearchPage extends WizardPage {
.observe(model));
// observe the viewer selection to update the description label
final IObservableValue observableSelectedImageDescription = PojoProperties
- .value("description", String.class)
+ .value("description", String.class) // $NON-NLS-1$
.observeDetail(ViewerProperties.singleSelection()
.observe(searchResultTableViewer));
ctx.bindValue(WidgetProperties.text().observe(selectedImageDescription),
@@ -268,15 +280,17 @@ public class ImageSearchPage extends WizardPage {
ImageSearchPage.this.getContainer().run(true, true,
new IRunnableWithProgress() {
@Override
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException,
- InterruptedException {
- monitor.beginTask("Searching...", 1);
+ public void run(IProgressMonitor monitor) {
+ monitor.beginTask(WizardMessages.getString(
+ "ImageSearchPage.searchTask"), 1); //$NON-NLS-1$
try {
final List<IDockerImageSearchResult> searchResults = ImageSearchPage.this.model
.getSelectedConnection()
.searchImages(term);
- monitor.beginTask("Searching...", 1);
+ monitor.beginTask(
+ WizardMessages.getString(
+ "ImageSearchPage.searchTask"), //$NON-NLS-1$
+ 1);
searchResultQueue.offer(searchResults);
} catch (DockerException e) {
Activator.log(e);
@@ -296,15 +310,20 @@ public class ImageSearchPage extends WizardPage {
});
// display a warning in the title area if the search result is empty
if (searchResult.isEmpty()) {
- this.setMessage("No image matched the specified term.",
+ this.setMessage(
+ WizardMessages
+ .getString("ImageSearchPage.noImageWarning"), //$NON-NLS-1$
WARNING);
} else if (searchResult.size() == 1) {
- this.setMessage("1 image matched the specified term.",
+ this.setMessage(
+ WizardMessages
+ .getString("ImageSearchPage.oneImageMatched"), //$NON-NLS-1$
INFORMATION);
} else {
this.setMessage(
- searchResult.size()
- + " images matched the specified term.",
+ WizardMessages.getFormattedString(
+ "ImageSearchPage.imagesMatched", //$NON-NLS-1$
+ Integer.toString(searchResult.size())),
INFORMATION);
}
} catch (InvocationTargetException | InterruptedException e) {
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnection.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnection.java
index 293dbd5d58..fea9897a2b 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnection.java
@@ -47,7 +47,14 @@ public class NewDockerConnection extends Wizard {
DockerConnectionManager.getInstance().addConnection(dockerConnection);
return true;
} catch (DockerException e) {
- new MessageDialog(Display.getDefault().getActiveShell(), "Failure", null, "Failed to connect!", SWT.ICON_ERROR, new String[]{"OK"}, 0).open();
+ new MessageDialog(Display.getDefault().getActiveShell(),
+ WizardMessages.getString("NewDockerConnection.failure"), //$NON-NLS-1$
+ null,
+ WizardMessages.getString("NewDockerConnection.failMessage"), //$NON-NLS-1$
+ SWT.ICON_ERROR,
+ new String[] { WizardMessages
+ .getString("NewDockerConnectionPage.ok") }, //$NON-NLS-1$
+ 0).open(); // ;
}
return false;
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
index 54ef2921b6..45bb0ca382 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
@@ -69,9 +69,10 @@ public class NewDockerConnectionPage extends WizardPage {
private Text tcpCertPathText;
public NewDockerConnectionPage() {
- super("NewDockerConnectionPage", "Connect to a Docker daemon",
+ super("NewDockerConnectionPage", //$NON-NLS-1$
+ WizardMessages.getString("NewDockerConnectionPage.title"),
SWTImagesFactory.DESC_BANNER_REPOSITORY);
- setMessage("Select the binding mode to connect to the Docker daemon");
+ setMessage(WizardMessages.getString("NewDockerConnectionPage.msg")); //$NON-NLS-1$
}
/**
@@ -107,10 +108,12 @@ public class NewDockerConnectionPage extends WizardPage {
// Connection name
final Label connectionNameLabel = new Label(container, SWT.NONE);
- connectionNameLabel.setText("Connection name:");
+ connectionNameLabel.setText(
+ WizardMessages.getString("NewDockerConnectionPage.nameLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(connectionNameLabel);
connectionNameText = new Text(container, SWT.BORDER);
- connectionNameText.setToolTipText("Name of the connection");
+ connectionNameText.setToolTipText(WizardMessages
+ .getString("NewDockerConnectionPage.nameTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1)
.applyTo(connectionNameText);
@@ -126,45 +129,56 @@ public class NewDockerConnectionPage extends WizardPage {
GridLayoutFactory.fillDefaults().numColumns(COLUMNS).margins(6, 6).spacing(10, 2).applyTo(customSettingsGroup);
unixSocketSelectionButton = new Button(customSettingsGroup, SWT.RADIO);
- unixSocketSelectionButton.setText("Unix socket");
+ unixSocketSelectionButton.setText(
+ WizardMessages.getString("NewDockerConnectionPage.unixSocket")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(COLUMNS, 1).applyTo(unixSocketSelectionButton);
final Label unixSocketPathLabel = new Label(customSettingsGroup, SWT.NONE);
- unixSocketPathLabel.setText("Location:");
+ unixSocketPathLabel.setText(
+ WizardMessages.getString("NewDockerConnectionPage.location")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).indent(INDENT, 0).applyTo(unixSocketPathLabel);
unixSocketPathText = new Text(customSettingsGroup, SWT.BORDER);
- unixSocketPathText.setToolTipText("Path to the socket file");
+ unixSocketPathText.setToolTipText(WizardMessages
+ .getString("NewDockerConnectionPage.unixPathTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(unixSocketPathText);
final Button unixSocketPathBrowseButton = new Button(customSettingsGroup, SWT.BUTTON1);
- unixSocketPathBrowseButton.setText("Browse...");
+ unixSocketPathBrowseButton.setText(WizardMessages
+ .getString("NewDockerConnectionPage.browseButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(unixSocketPathBrowseButton);
tcpConnectionSelectionButton = new Button(customSettingsGroup, SWT.RADIO);
- tcpConnectionSelectionButton.setText("TCP Connection");
+ tcpConnectionSelectionButton.setText(WizardMessages
+ .getString("NewDockerConnectionPage.tcpConnection")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(COLUMNS, 1)
.applyTo(tcpConnectionSelectionButton);
final Label tcpHostLabel = new Label(customSettingsGroup, SWT.NONE);
- tcpHostLabel.setText("Host:");
+ tcpHostLabel.setText(
+ WizardMessages.getString("NewDockerConnectionPage.hostLabel")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).indent(INDENT, 0).applyTo(tcpHostLabel);
tcpHostText = new Text(customSettingsGroup, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(2, 1).grab(true, false).applyTo(tcpHostText);
tcpAuthButton = new Button(customSettingsGroup, SWT.CHECK);
- tcpAuthButton.setText("Enable authentication");
+ tcpAuthButton.setText(WizardMessages
+ .getString("NewDockerConnectionPage.tcpAuthButton")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).indent(INDENT, 0).span(3, 1).applyTo(tcpAuthButton);
final Label tcpCertPathLabel = new Label(customSettingsGroup, SWT.NONE);
- tcpCertPathLabel.setText("Path:");
- tcpCertPathLabel.setToolTipText("Path to the certificates folder");
+ tcpCertPathLabel.setText(
+ WizardMessages.getString("NewDockerConnectionPage.tcpPathLabel")); //$NON-NLS-1$
+ tcpCertPathLabel.setToolTipText(WizardMessages
+ .getString("NewDockerConnectionPage.tcpPathTooltip")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).indent(INDENT * 2, 0).applyTo(tcpCertPathLabel);
tcpCertPathText = new Text(customSettingsGroup, SWT.BORDER);
tcpCertPathText.setEnabled(false);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(tcpCertPathText);
final Button tcpCertPathBrowseButton = new Button(customSettingsGroup, SWT.BUTTON1);
- tcpCertPathBrowseButton.setText("Browse...");
+ tcpCertPathBrowseButton.setText(WizardMessages
+ .getString("NewDockerConnectionPage.browseButton")); //$NON-NLS-1$
tcpCertPathText.setEnabled(false);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(tcpCertPathBrowseButton);
// the 'test connection' button
final Button testConnectionButton = new Button(container, SWT.NONE);
- testConnectionButton.setText("Test Connection");
+ testConnectionButton.setText(WizardMessages
+ .getString("NewDockerConnectionPage.testConnection")); //$NON-NLS-1$
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(COLUMNS, 1).align(SWT.END, SWT.CENTER).applyTo(testConnectionButton);
testConnectionButton.addSelectionListener(onTestConnectionButtonSelection());
@@ -209,7 +223,10 @@ public class NewDockerConnectionPage extends WizardPage {
getWizard().getContainer().run(true, true, new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor monitor) {
- monitor.beginTask("Retrieving Docker connection settings...", 1);
+ monitor.beginTask(
+ WizardMessages.getString(
+ "NewDockerConnectionPage.retrieveTask"), //$NON-NLS-1$
+ 1);
try {
final DockerConnection.Defaults defaults = new DockerConnection.Defaults();
NewDockerConnectionPage.this.bindingMode = defaults.getBindingMode();
@@ -407,7 +424,10 @@ public class NewDockerConnectionPage extends WizardPage {
getWizard().getContainer().run(true, false, new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor monitor) {
- monitor.beginTask("Pinging Docker daemon...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(
+ WizardMessages.getString(
+ "NewDockerConnectionPage.pingTask"), //$NON-NLS-1$
+ IProgressMonitor.UNKNOWN);
try {
final DockerConnection dockerConnection = getDockerConnection();
dockerConnection.open(false);
@@ -426,12 +446,40 @@ public class NewDockerConnectionPage extends WizardPage {
try {
final Boolean result = resultQueue.poll(5000, TimeUnit.MILLISECONDS);
if(result) {
- new MessageDialog(Display.getDefault().getActiveShell(), "Success", null, "Ping succeeded !", SWT.ICON_INFORMATION, new String[]{"OK"}, 0).open();
+ new MessageDialog(Display.getDefault().getActiveShell(),
+ WizardMessages.getString(
+ "NewDockerConnectionPage.success"), //$NON-NLS-1$
+ null,
+ WizardMessages.getString(
+ "NewDockerConnectionPage.pingSuccess"), //$NON-NLS-1$
+ SWT.ICON_INFORMATION,
+ new String[] { WizardMessages.getString(
+ "NewDockerConnectionPage.ok") }, //$NON-NLS-1$
+ 0).open();
+
} else {
- new MessageDialog(Display.getDefault().getActiveShell(), "Failure", null, "Ping failed !", SWT.ICON_ERROR, new String[]{"OK"}, 0).open();
+ new MessageDialog(Display.getDefault().getActiveShell(),
+ WizardMessages.getString(
+ "NewDockerConnectionPage.failure"), //$NON-NLS-1$
+ null,
+ WizardMessages.getString(
+ "NewDockerConnectionPage.pingFailure"), //$NON-NLS-1$
+ SWT.ICON_ERROR,
+ new String[] { WizardMessages.getString(
+ "NewDockerConnectionPage.ok") }, //$NON-NLS-1$
+ 0).open();
}
} catch (InterruptedException o_O) {
- new MessageDialog(Display.getDefault().getActiveShell(), "Failure", null, "Ping failed !", SWT.ICON_ERROR, new String[]{"OK"}, 0).open();
+ new MessageDialog(Display.getDefault().getActiveShell(),
+ WizardMessages.getString(
+ "NewDockerConnectionPage.failure"), //$NON-NLS-1$
+ null,
+ WizardMessages.getString(
+ "NewDockerConnectionPage.pingFailure"), //$NON-NLS-1$
+ SWT.ICON_ERROR,
+ new String[] { WizardMessages
+ .getString("NewDockerConnectionPage.ok") }, //$NON-NLS-1$
+ 0).open();
}
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/WizardMessages.properties b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/WizardMessages.properties
index 3504f25d01..b970a19242 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/WizardMessages.properties
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/WizardMessages.properties
@@ -144,3 +144,123 @@ ContainerCommit.name=Commit Container
ImageName.toolTip=Enter name for image (either REPOSITORY or REPOSITORY:TAG)
ErrorInvalidRepo.msg=Image name is invalid
+
+NewDockerConnectionPage.title=Connect to a Docker daemon
+NewDockerConnectionPage.msg=Select the binding mode to connect to the Docker daemon
+NewDockerConnectionPage.nameLabel=Connection name:
+NewDockerConnectionPage.nameTooltip=Name of the connection
+NewDockerConnectionPage.unixSocket=Unix socket
+NewDockerConnectionPage.location=Location:
+NewDockerConnectionPage.unixPathTooltip=Path to the socket file
+NewDockerConnectionPage.browseButton=Browse...
+NewDockerConnectionPage.tcpConnection=TCP Connection
+NewDockerConnectionPage.hostLabel=Host:
+NewDockerConnectionPage.tcpAuthButton=Enable authentication
+NewDockerConnectionPage.tcpPathLabel=Path:
+NewDockerConnectionPage.tcpPathTooltip=Path to the certificates folder
+NewDockerConnectionPage.testConnection=Test Connection
+NewDockerConnectionPage.retrieveTask=Retrieving Docker connection settings...
+NewDockerConnectionPage.pingTask=Pinging Docker daemon...
+NewDockerConnectionPage.success=Success
+NewDockerConnectionPage.pingSuccess=Ping succeeded !
+NewDockerConnectionPage.ok=OK
+NewDockerConnectionPage.failure=Failure
+NewDockerConnectionPage.pingFailure=Ping failed !
+NewDockerConnection.failure=Failure
+NewDockerConnection.failMessage=Failed to connect!
+
+ImageSearchPage.title=Search the Docker Registry for images
+ImageSearchPage.imageLabel=Image:
+ImageSearchPage.search=Search
+ImageSearchPage.searchResultLabel=Matching images
+ImageSearchPage.nameColumn=Name
+ImageSearchPage.starsColumn=Stars
+ImageSearchPage.officialColumn=Official
+ImageSearchPage.automatedColumn=Automated
+ImageSearchPage.descriptionGroup=Description
+ImageSearchPage.searchTask=Searching...
+ImageSearchPage.noImageWarning=No image matched the specified term.
+ImageSearchPage.oneImageMatched=1 image matched the specified term.
+ImageSearchPage.imagesMatched={0} images matched the specified term.
+
+ImageSelectionPage.title=Docker Container settings
+ImageSelectionPage.runImage=Run a Docker Image
+ImageSelectionPage.exposedPortTitle=Image Selection and Exposed Port Publishing
+ImageRunSelectionPage.exposedPortMsg=Select the Docker Image to run and the ports to expose
+ImageRunSelectionPage.selectTooltip=Select the Docker Image to run
+ImageRunSelectionPage.search=Search...
+ImageRunSelectionPage.pullImage=<a>Pull this image...</a>
+ImageRunSelectionPage.containerTooltip=a UUID long identifier, a UUID short identifier or a String
+ImageRunSelectionPage.entrypoint=Entrypoint:
+ImageRunSelectionPage.command=Command:
+ImageRunSelectionPage.publishAllPorts=Publish all exposed ports to random ports on the host interfaces
+ImageRunSelectionPage.portSettings=Only publish the selected container ports below to the host:
+ImageRunSelectionPage.add=Add
+ImageRunSelectionPage.editButton=Edit...
+ImageRunSelectionPage.remove=Remove
+ImageRunSelectionPage.containerPortColumn=Container Port
+ImageRunSelectionPage.typeColumn=Type
+ImageRunSelectionPage.hostAddressColumn=Host Address
+ImageRunSelectionPage.hostPortColumn=Host Port
+ImageRunSelectionPage.links=Links to other containers:
+ImageRunSelectionPage.addButton=Add...
+ImageRunSelectionPage.containerNameColumn=Container Name
+ImageRunSelectionPage.aliasColumn=Alias
+ImageRunSelectionPage.openStdin=Keep STDIN open to Console even if not attached (-i)
+ImageRunSelectionPage.tty=Allocate pseudo-TTY from Console (-t)
+ImageRunSelectionPage.autoRemove=Automatically remove the container when it exits (--rm)
+ImageRunSelectionPage.pullingTask=Pulling image '{0}'
+ImageRunSelectionPage.specifyImageMsg=Please specify the image to run.
+ImageRunSelectionPage.imageNotFoundMessage=Image named '{0}' does not exist locally. Click on the link under the 'Image' combo to start pulling it.
+
+ImageRunResourceVolVarPage.title=Volumes, Environment Variables and Resource Limitations
+ImageRunResourceVolVarPage.enableLimitationButton=Enable resource limitations
+ImageRunResourceVolVarPage.cpuPriorityLabel=CPU priority:
+ImageRunResourceVolVarPage.lowButton=Low
+ImageRunResourceVolVarPage.mediumButton=Medium
+ImageRunResourceVolVarPage.highButton=High
+ImageRunResourceVolVarPage.memoryLimit=Memory limit:
+ImageRunResourceVolVarPage.dataVolumesLabel=Data Volumes:
+ImageRunResourceVolVarPage.addButton=Add...
+ImageRunResourceVolVarPage.editButton=Edit...
+ImageRunResourceVolVarPage.removeButton=Remove
+ImageRunResourceVolVarPage.containerPathColumn=Container Path
+ImageRunResourceVolVarPage.mountColumn=Mount
+ImageRunResourceVolVarPage.readonlyColumn=Read-only
+ImageRunResourceVolVarPage.envVarLabel=Environment variables:
+ImageRunResourceVolVarPage.nameColumn=Name
+ImageRunResourceVolVarPage.valueColumn=Value
+ImageRunResourceVolVarPage.true=true
+ImageRunResourceVolVarPage.false=false
+
+ContainerPortDialog.shellTitle=Exposing a Container Port
+ContainerPortDialog.explanationLabel=Specify the container port to expose:
+ContainerPortDialog.containerLabel=Container port:
+ContainerPortDialog.hostAddressLabel=Host address:
+ContainerPortDialog.hostPortLabel=Host port:
+
+ContainerLinkDialog.title=Container Linking
+ContainerLinkDialog.explanationLabel=Select a container to link and give it an alias:
+ContainerLinkDialog.containerLabel=Container:
+ContainerLinkDialog.aliasLabel=Alias:
+
+ImageRun.title=Run a Docker Image
+
+ContainerEnvironmentVariableDialog.title=Environment Variable
+ContainerEnvironmentVariableDialog.explanationLabel=Specify the environment variable name and value:
+ContainerEnvironmentVariableDialog.nameLabel=Name:
+ContainerEnvironmentVariableDialog.valueLabel=Value:
+
+ContainerDataVolumeDialog.title=Data Volume
+ContainerDataVolumeDialog.containerPathLabel=Container path:
+ContainerDataVolumeDialog.explanationLabel=Specify the type of mount:
+ContainerDataVolumeDialog.noMountButton=No external mount
+ContainerDataVolumeDialog.fileSystemMountButton=Mount a host directory or host file
+ContainerDataVolumeDialog.hostPathLabel=Path:
+ContainerDataVolumeDialog.directoryButton=Directory...
+ContainerDataVolumeDialog.readOnlyButton=Read-only access
+ContainerDataVolumeDialog.readOnlyButtonTooltip=Specify if the mounted host directory or path is read-only
+ContainerDataVolumeDialog.fileButton=File...
+ContainerDataVolumeDialog.containerMountButton=Mount a data volume container
+ContainerDataVolumeDialog.containerSelectionLabel=Container:
+ContainerDataVolumeDialog.volumeWarning=The selected container does not define a {0} volume. \ No newline at end of file

Back to the top