1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-22 07:42:52 +00:00

Localize folder type

This commit is contained in:
M66B 2018-08-03 09:21:57 +00:00
parent 20d60fafe8
commit f67f822267
2 changed files with 13 additions and 2 deletions

View file

@ -224,13 +224,20 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
holder.tvName.setText(context.getString(R.string.title_folder_unseen, name, folder.unseen));
else
holder.tvName.setText(name);
holder.tvName.setTypeface(null, folder.unseen > 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();

View file

@ -68,8 +68,12 @@
<string name="title_folder_unified">Unified inbox</string>
<string name="title_folder_inbox">Inbox</string>
<string name="title_folder_outbox">Outbox</string>
<string name="title_folder_all">Archive</string>
<string name="title_folder_drafts">Drafts</string>
<string name="title_folder_trash">Trash</string>
<string name="title_folder_junk">Spam</string>
<string name="title_folder_sent">Sent</string>
<string name="title_folder_user">User</string>
<string name="title_folder_thread">Message thread</string>
<string name="title_no_messages">No messages</string>