removed a_moment_ago (looks silly and is hard to translate properly)
This commit is contained in:
parent
7688265451
commit
63cd69d06b
|
@ -21,7 +21,6 @@
|
|||
<!--Playback history-->
|
||||
<string name="clear_history_label">Chronik löschen</string>
|
||||
<!--Other-->
|
||||
<string name="a_moment_ago">Vor Kurzem</string>
|
||||
<string name="confirm_label">Bestätigen</string>
|
||||
<string name="cancel_label">Abbrechen</string>
|
||||
<string name="author_label">Autor</string>
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
<string name="processing_label">Processing</string>
|
||||
<string name="loading_label">Loading...</string>
|
||||
<string name="image_of_prefix">Image of:\u0020</string>
|
||||
<string name="a_moment_ago">a moment ago</string>
|
||||
|
||||
<!-- 'Add Feed' Activity labels -->
|
||||
<string name="feedurl_label">Feed URL</string>
|
||||
|
|
|
@ -82,15 +82,10 @@ public final class Converter {
|
|||
return String.format("%02d:%02d", h, m);
|
||||
}
|
||||
|
||||
/** Converts milliseconds to a relative time span,
|
||||
* will return "a moment ago" if it's less than a minute ago */
|
||||
/** Converts milliseconds to a relative time span, */
|
||||
public static String getRelativeTimeSpanString(Context context, long millis) {
|
||||
long now = System.currentTimeMillis();
|
||||
if (now - millis <= 60 * 1000) {
|
||||
return context.getString(R.string.a_moment_ago);
|
||||
} else {
|
||||
return DateUtils.getRelativeTimeSpanString(
|
||||
millis, now, 0, 0).toString();
|
||||
}
|
||||
return DateUtils.getRelativeTimeSpanString(
|
||||
millis, now, 0, 0).toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue