aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils
diff options
context:
space:
mode:
authorkruks23 <scardenas@openmailbox.org>2014-05-20 18:49:58 +0200
committerkruks23 <scardenas@openmailbox.org>2014-05-20 18:49:58 +0200
commitaba1ca7918c0797987a185e67f7d6986f88b2314 (patch)
tree6d5d35201f85b9f68800054b337b55834bd662d9 /src/eu/siacs/conversations/utils
parent116456691dcb5484aaa8c11fb4d788a58177ac53 (diff)
Update Spanish Translations + harcoded just_now
Diffstat (limited to 'src/eu/siacs/conversations/utils')
-rw-r--r--src/eu/siacs/conversations/utils/UIHelper.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java
index ff99c091..d626d421 100644
--- a/src/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/eu/siacs/conversations/utils/UIHelper.java
@@ -50,16 +50,16 @@ public class UIHelper {
private static final int FG_COLOR = 0xFFE5E5E5;
private static final int TRANSPARENT = 0x00000000;
- public static String readableTimeDifference(long time) {
+ public static String readableTimeDifference(Context context, long time) {
if (time == 0) {
- return "just now";
+ return context.getString(R.string.just_now);
}
Date date = new Date(time);
long difference = (System.currentTimeMillis() - time) / 1000;
if (difference < 60) {
- return "just now";
+ return context.getString(R.string.just_now);
} else if (difference < 60 * 10) {
- return difference / 60 + " min ago";
+ return difference / 60 + " " + context.getString(R.string.minutes_ago);
} else if (difference < 60 * 60 * 24) {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm",Locale.US);
return sdf.format(date);
@@ -395,7 +395,7 @@ public class UIHelper {
.bigText(bigText.toString()));
} else {
NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle();
- style.setBigContentTitle(unread.size() + " unread Conversations");
+ style.setBigContentTitle(unread.size() + " " + context.getString(R.string.unread_conversations));
StringBuilder names = new StringBuilder();
for (int i = 0; i < unread.size(); ++i) {
targetUuid = unread.get(i).getUuid();
@@ -407,7 +407,7 @@ public class UIHelper {
style.addLine(Html.fromHtml("<b>" + unread.get(i).getName(useSubject)
+ "</b> " + unread.get(i).getLatestMessage().getReadableBody(context)));
}
- mBuilder.setContentTitle(unread.size() + " unread Conversations");
+ mBuilder.setContentTitle(unread.size() + " " + context.getString(R.string.unread_conversations));
mBuilder.setContentText(names.toString());
mBuilder.setStyle(style);
}