diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 76611efbd9..e9a1d06e01 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -753,10 +753,12 @@ public class Util { /** * Get a human readable string representing strings like "xxx days ago", * which should be used to point to the occurrence of an event in the past. + * @deprecated Actually identical to {@link #getTimeSpanString}, does not add {@code ago}. */ + @Deprecated @Nonnull public static String getPastTimeString(long duration) { - return Messages.Util_pastTime(getTimeSpanString(duration)); + return getTimeSpanString(duration); } diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index b466779e1a..b0a6b4a45c 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -767,7 +767,7 @@ public class Executor extends Thread implements ModelObject { * string like "3 minutes" "1 day" etc. */ public String getTimestampString() { - return Util.getPastTimeString(getElapsedTime()); + return Util.getTimeSpanString(getElapsedTime()); } /** diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index 3194505027..b5644b0d5b 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -943,7 +943,7 @@ public class Fingerprint implements ModelObject, Saveable { */ public @Nonnull String getTimestampString() { long duration = System.currentTimeMillis()-timestamp.getTime(); - return Util.getPastTimeString(duration); + return Util.getTimeSpanString(duration); } /** diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index a7d85f6735..caf0513b32 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -718,7 +718,7 @@ public abstract class Run ,RunT extends Run extends Descriptor hudson.Util.getTimeSpanString($d);; diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties index 20f79ad0b0..f8804aae4f 100644 --- a/core/src/main/resources/hudson/Messages.properties +++ b/core/src/main/resources/hudson/Messages.properties @@ -47,10 +47,6 @@ Util.day ={0} {0,choice,0#days|1#day|1~) wird in Ant-Patterns nicht als Home-Verzeichnis interpretiert. FilePath.validateAntFileMask.matchWithCaseInsensitive=\u2018{0}\u2019 konnte keine Treffer finden, da Gro\u00DF- und Kleinschreibung ber\u00FCcksichtigt wird. Sie k\u00F6nnen dies deaktivieren, damit das Suchmuster Ergebnisse findet. FilePath.validateAntFileMask.whitespaceSeparator=Leerzeichen k\u00F6nnen nicht mehr als Trennzeichen verwendet werden. Bitte verwenden Sie \u2018,\u2019 stattdessen. diff --git a/core/src/main/resources/hudson/Messages_es.properties b/core/src/main/resources/hudson/Messages_es.properties index d7c9350298..58ffaf90e1 100644 --- a/core/src/main/resources/hudson/Messages_es.properties +++ b/core/src/main/resources/hudson/Messages_es.properties @@ -46,7 +46,6 @@ Util.year ={0} A\u00F1o # ideally it should be "{0} ago" but this saves more space # another implication of this is that where we use this, # we often want to add "ago" there -Util.pastTime={0} FilePath.TildaDoesntWork=El caracter ''~'' s\u00F3lo est\u00E1 soportado en UNIX. PluginManager.DisplayName=Gestor de plugins AboutJenkins.DisplayName=Acerca de Jenkins diff --git a/core/src/main/resources/hudson/Messages_fr.properties b/core/src/main/resources/hudson/Messages_fr.properties index 9ea4d38b53..148321a271 100644 --- a/core/src/main/resources/hudson/Messages_fr.properties +++ b/core/src/main/resources/hudson/Messages_fr.properties @@ -46,10 +46,6 @@ Util.day ={0} j Util.month ={0} mo. Util.year ={0} an. -# ideally it should be "{0} ago" but this saves more space -# another implication of this is that where we use this, -# we often want to add "ago" there -Util.pastTime={0} FilePath.TildaDoesntWork=''~'' n''est support\u00e9 que sur les shells Unix. PluginManager.DisplayName=Gestion des plugins diff --git a/core/src/main/resources/hudson/Messages_it.properties b/core/src/main/resources/hudson/Messages_it.properties index 48deedea69..1263c764ec 100644 --- a/core/src/main/resources/hudson/Messages_it.properties +++ b/core/src/main/resources/hudson/Messages_it.properties @@ -22,7 +22,6 @@ Util.hour ={0} h Util.day ={0} g Util.month ={0} m Util.year ={0} a -Util.pastTime={0} Util.millisecond={0} ms Util.minute={0} min diff --git a/core/src/main/resources/hudson/Messages_ja.properties b/core/src/main/resources/hudson/Messages_ja.properties index 86bd6f3759..98186ca534 100644 --- a/core/src/main/resources/hudson/Messages_ja.properties +++ b/core/src/main/resources/hudson/Messages_ja.properties @@ -50,7 +50,6 @@ Util.hour ={0} \u6642\u9593 Util.day ={0} \u65e5 Util.month ={0} \u30f6\u6708 Util.year ={0} \u5e74 -Util.pastTime={0} \u524d FilePath.TildaDoesntWork=''~'' \u306f\u3001Unix\u306e\u30b7\u30a7\u30eb\u3067\u306e\u307f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 @@ -67,4 +66,4 @@ AboutJenkins.Description=\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u30e9\u30a4\u30bb\ ProxyConfiguration.TestUrlRequired=\u30c6\u30b9\u30c8URL\u306f\u5fc5\u9808\u3067\u3059\u3002 ProxyConfiguration.FailedToConnectViaProxy={0} \u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 ProxyConfiguration.FailedToConnect={0} \u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002(\u30b3\u30fc\u30c9 {1}). -ProxyConfiguration.Success=\u6210\u529f \ No newline at end of file +ProxyConfiguration.Success=\u6210\u529f diff --git a/core/src/main/resources/hudson/Messages_nl.properties b/core/src/main/resources/hudson/Messages_nl.properties index d49f439d74..7e3df7f461 100644 --- a/core/src/main/resources/hudson/Messages_nl.properties +++ b/core/src/main/resources/hudson/Messages_nl.properties @@ -31,10 +31,5 @@ Util.hour ={0} {0,choice,0#uren|1#uur|1