From 9241deba04f8af154c991b444aa5319bee3b01ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 8 Apr 2011 06:29:54 +0200 Subject: [PATCH] Adjust displayed times. --- .../net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java | 14 +++++++------- src/main/resources/i18n/sone.en.properties | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java index 5711257..b17e4a2 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java @@ -125,22 +125,22 @@ public class GetTimesAjaxPage extends JsonPage { if (age < 0) { text = webInterface.getL10n().getDefaultString("View.Time.InTheFuture"); refresh = 5 * Time.MINUTE; - } else if (age < 30 * Time.SECOND) { + } else if (age < 20 * Time.SECOND) { text = webInterface.getL10n().getDefaultString("View.Time.AFewSecondsAgo"); - refresh = 5 * Time.SECOND; - } else if (age < 1 * Time.MINUTE) { - text = webInterface.getL10n().getString("View.Time.XSecondsAgo", "sec", String.valueOf((int) Digits.round(age / Time.SECOND, 10))); refresh = 10 * Time.SECOND; - } else if (age < 2 * Time.MINUTE) { + } else if (age < 45 * Time.SECOND) { + text = webInterface.getL10n().getString("View.Time.HalfAMinuteAgo"); + refresh = 20 * Time.SECOND; + } else if (age < 90 * Time.SECOND) { text = webInterface.getL10n().getString("View.Time.AMinuteAgo"); refresh = Time.MINUTE; } else if (age < 30 * Time.MINUTE) { text = webInterface.getL10n().getString("View.Time.XMinutesAgo", "min", String.valueOf((int) Digits.round(age / Time.MINUTE, 1))); - refresh = Time.MINUTE; + refresh = 1 * Time.MINUTE; } else if (age < 45 * Time.MINUTE) { text = webInterface.getL10n().getString("View.Time.HalfAnHourAgo"); refresh = 10 * Time.MINUTE; - } else if (age < 2 * Time.HOUR) { + } else if (age < 90 * Time.MINUTE) { text = webInterface.getL10n().getString("View.Time.AnHourAgo"); refresh = Time.HOUR; } else if (age < 21 * Time.HOUR) { diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index bdf3e72..cfdb100 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -241,7 +241,7 @@ View.Trust.Tooltip.Untrust=Remove your trust assignment for this person View.Time.InTheFuture=in the future View.Time.AFewSecondsAgo=a few seconds ago -View.Time.XSecondsAgo=${sec} seconds ago +View.Time.HalfAMinuteAgo=about half a minute ago View.Time.AMinuteAgo=about a minute ago View.Time.XMinutesAgo=${min} minutes ago View.Time.HalfAnHourAgo=half an hour ago -- 2.7.4