mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
i18n
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6798 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
460c08d445
commit
ba77382fe5
4 files changed
+14
-3
No files matched your search
@@ -9,6 +9,7 @@ import org.apache.tools.ant.types.FileSet;
|
||||
import org.apache.tools.ant.taskdefs.Chmod;
|
||||
import org.apache.tools.ant.taskdefs.Copy;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.jvnet.localizer.Localizable;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayInputStream;
|
||||
@@ -365,6 +366,7 @@ public class Util {
|
||||
|
||||
/**
|
||||
* Returns a human readable text of the time duration.
|
||||
* This version should be used for representing a duration of some activity (like build)
|
||||
*
|
||||
* @param duration
|
||||
* number of milliseconds.
|
||||
@@ -389,6 +391,14 @@ public class Util {
|
||||
return Messages.Util_year(duration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a human readable string representing strings like "xxx days ago",
|
||||
* which should be used to point to the occurence of an event in the past.
|
||||
*/
|
||||
public static String getPastTimeString(long duration) {
|
||||
return Messages.Util_pastTime(getTimeSpanString(duration));
|
||||
}
|
||||
|
||||
/**
|
||||
* Combines number and unit, with a plural suffix if needed.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user