From c09523609e7ef8fed749ae8966b3e1ce6249ecfc Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 28 Aug 2009 01:16:20 +0000 Subject: [PATCH] i18n and clarified what it was trying to install, since that's not obvious. See http://www.nabble.com/Don%27t-understand-build-messages...-td25177740.html git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21144 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/tools/JDKInstaller.java | 6 +++--- core/src/main/resources/hudson/tools/Messages.properties | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/tools/JDKInstaller.java b/core/src/main/java/hudson/tools/JDKInstaller.java index 2a31d60a6c..b9af1a0fcd 100644 --- a/core/src/main/java/hudson/tools/JDKInstaller.java +++ b/core/src/main/java/hudson/tools/JDKInstaller.java @@ -101,7 +101,7 @@ public class JDKInstaller extends ToolInstaller { PrintStream out = log.getLogger(); try { if(!acceptLicense) { - out.println("Unable to perform installation until the license is accepted."); + out.println(Messages.JDKInstaller_UnableToInstallUntilLicenseAccepted()); return expectedLocation; } // already installed? @@ -124,7 +124,7 @@ public class JDKInstaller extends ToolInstaller { file.chmod(0755); if(node.createLauncher(log).launch().cmds(file.getRemote(),"-noregister") .stdin(new ByteArrayInputStream("yes".getBytes())).stdout(out).pwd(expectedLocation).join()!=0) - throw new AbortException("Failed to install JDK"); + throw new AbortException(Messages.JDKInstaller_FailedToInstallJDK()); // JDK creates its own sub-directory, so pull them up List paths = expectedLocation.list(new JdkFinder()); @@ -170,7 +170,7 @@ public class JDKInstaller extends ToolInstaller { args.add("/v/qn REBOOT=Suppress INSTALLDIR=\\\""+normalizedPath+"\\\" /L \\\""+logFile.getRemote()+"\\\""); if(node.createLauncher(log).launch().cmds(args).stdout(out).pwd(expectedLocation).join()!=0) { - out.println("Failed to install JDK"); + out.println(Messages.JDKInstaller_FailedToInstallJDK()); // log file is in UTF-16 InputStreamReader in = new InputStreamReader(logFile.read(), "UTF-16"); try { diff --git a/core/src/main/resources/hudson/tools/Messages.properties b/core/src/main/resources/hudson/tools/Messages.properties index eafa4c3069..84bff0a6ab 100644 --- a/core/src/main/resources/hudson/tools/Messages.properties +++ b/core/src/main/resources/hudson/tools/Messages.properties @@ -24,6 +24,8 @@ ToolLocationNodeProperty.displayName=Tool Locations CommandInstaller.DescriptorImpl.displayName=Run Command CommandInstaller.no_command=Must provide a command to run. CommandInstaller.no_toolHome=Must provide a tool home directory. +JDKInstaller.FailedToInstallJDK=Failed to install JDK +JDKInstaller.UnableToInstallUntilLicenseAccepted=Unable to auto-install JDK until the license is accepted. ZipExtractionInstaller.DescriptorImpl.displayName=Extract *.zip/*.tar.gz ZipExtractionInstaller.bad_connection=Server rejected connection. ZipExtractionInstaller.malformed_url=Malformed URL.