diff --git a/core/src/main/java/hudson/lifecycle/WindowsSlaveInstaller.java b/core/src/main/java/hudson/lifecycle/WindowsSlaveInstaller.java index 5b7a3ec252e2965403ccd2c0030c1611b4aa3143..2d94aa7934c4f8881d420fb1b67b387c36c24d72 100644 --- a/core/src/main/java/hudson/lifecycle/WindowsSlaveInstaller.java +++ b/core/src/main/java/hudson/lifecycle/WindowsSlaveInstaller.java @@ -93,21 +93,19 @@ public class WindowsSlaveInstaller implements Callable, A */ public void actionPerformed(ActionEvent e) { int r = JOptionPane.showConfirmDialog(dialog, - "This will install a slave agent as a Windows service,\n" + - "so that this slave will connect to Hudson as soon as the machine boots.\n" + - "Do you want to proceed with installation?", + Messages.WindowsSlaveInstaller_ConfirmInstallation(), Messages.WindowsInstallerLink_DisplayName(), OK_CANCEL_OPTION); if(r!=JOptionPane.OK_OPTION) return; if(!DotNet.isInstalled(2,0)) { - JOptionPane.showMessageDialog(dialog,".NET Framework 2.0 or later is required for this feature", + JOptionPane.showMessageDialog(dialog,Messages.WindowsSlaveInstaller_DotNetRequired(), Messages.WindowsInstallerLink_DisplayName(), ERROR_MESSAGE); return; } final File dir = new File(rootDir); if (!dir.exists()) { - JOptionPane.showMessageDialog(dialog,"Slave root directory '"+rootDir+"' doesn't exist", + JOptionPane.showMessageDialog(dialog,Messages.WindowsSlaveInstaller_RootFsDoesntExist(rootDir), Messages.WindowsInstallerLink_DisplayName(), ERROR_MESSAGE); return; } @@ -139,8 +137,7 @@ public class WindowsSlaveInstaller implements Callable, A } r = JOptionPane.showConfirmDialog(dialog, - "Installation was successful. Would you like to\n" + - "Stop this slave agent and start the newly installed service?", + Messages.WindowsSlaveInstaller_InstallationSuccessful(), Messages.WindowsInstallerLink_DisplayName(), OK_CANCEL_OPTION); if(r!=JOptionPane.OK_OPTION) return; @@ -162,8 +159,7 @@ public class WindowsSlaveInstaller implements Callable, A } catch (Exception t) { StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); - JOptionPane.showMessageDialog( - dialog,sw.toString(),"Error", ERROR_MESSAGE); + JOptionPane.showMessageDialog(dialog,sw.toString(),"Error", ERROR_MESSAGE); } } diff --git a/core/src/main/resources/hudson/lifecycle/Messages.properties b/core/src/main/resources/hudson/lifecycle/Messages.properties index 9e91aa1441d76b62b49aaa3e38352affb4af6618..8080b88f83d8cb18b050d61b65b554e721f7ec18 100644 --- a/core/src/main/resources/hudson/lifecycle/Messages.properties +++ b/core/src/main/resources/hudson/lifecycle/Messages.properties @@ -21,4 +21,8 @@ # THE SOFTWARE. WindowsInstallerLink.DisplayName=Install as Windows Service -WindowsInstallerLink.Description=Installs Hudson as a Windows service to this system, so that Hudson starts automatically when the machine boots. \ No newline at end of file +WindowsInstallerLink.Description=Installs Hudson as a Windows service to this system, so that Hudson starts automatically when the machine boots. +WindowsSlaveInstaller.ConfirmInstallation=This will install a slave agent as a Windows service, +WindowsSlaveInstaller.DotNetRequired=.NET Framework 2.0 or later is required for this feature +WindowsSlaveInstaller.InstallationSuccessful=Installation was successful. Would you like to +WindowsSlaveInstaller.RootFsDoesntExist=Slave root directory ''{0}'' doesn''t exist \ No newline at end of file