From f67f8222673ce0ce77b2889b7a490235e366b3e3 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 3 Aug 2018 09:21:57 +0000 Subject: [PATCH] Localize folder type --- .../main/java/eu/faircode/email/AdapterFolder.java | 11 +++++++++-- app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterFolder.java b/app/src/main/java/eu/faircode/email/AdapterFolder.java index b8e09438..74e91437 100644 --- a/app/src/main/java/eu/faircode/email/AdapterFolder.java +++ b/app/src/main/java/eu/faircode/email/AdapterFolder.java @@ -224,13 +224,20 @@ public class AdapterFolder extends RecyclerView.Adapter 0 ? Typeface.BOLD : Typeface.NORMAL); + holder.tvAfter.setText(Integer.toString(folder.after)); holder.tvAfter.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); + holder.ivSync.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); holder.tvCount.setText(Integer.toString(folder.messages)); - holder.tvType.setText(folder.type); + + int resid = context.getResources().getIdentifier( + "title_folder_" + folder.type.toLowerCase(), + "string", + context.getPackageName()); + holder.tvType.setText(resid > 0 ? context.getString(resid) : folder.type); + holder.tvAccount.setText(folder.accountName); holder.wire(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c30d4ef0..4a02aaa4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -68,8 +68,12 @@ Unified inbox Inbox Outbox + Archive Drafts + Trash + Spam Sent + User Message thread No messages