From 7eb313fb00508ea173a7ea3d1c928c61a67991bf Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Fri, 5 Jun 2009 10:48:20 -0700 Subject: [PATCH] AI 149604: Localized the special folders name in FolderMessageView. Integrates 149049,149217 from DocomoEmail. BUG=1860091,1860250 Automated import of CL 149604 --- res/values/strings.xml | 8 ++++++++ .../email/activity/FolderMessageList.java | 18 +++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 470aa037f..d5d489481 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -129,6 +129,14 @@ Trash Sent + + Outbox + + Drafts + + Trash + + Sent Welcome to Email setup!\n\nUse any email account with Email.\n\nMost popular email accounts can be set up in 2 steps! diff --git a/src/com/android/email/activity/FolderMessageList.java b/src/com/android/email/activity/FolderMessageList.java index 45f736ba3..f42a6bff9 100644 --- a/src/com/android/email/activity/FolderMessageList.java +++ b/src/com/android/email/activity/FolderMessageList.java @@ -1036,23 +1036,29 @@ public class FolderMessageList extends ExpandableListActivity { } /* - * Set special folder boolean indicator in FolderInfoHolder + * Set special folder boolean indicator and display name in FolderInfoHolder */ - private void setSpecialFolderIndicator(FolderInfoHolder holder) { + private void setSpecialFolderInfo(FolderInfoHolder holder) { String folderName = holder.name; holder.special = true; if (folderName.equalsIgnoreCase(Email.INBOX)) { holder.inbox = true; + holder.displayName = getString(R.string.special_mailbox_name_inbox); } else if (folderName.equals(mAccount.getDraftsFolderName())) { holder.drafts = true; + holder.displayName = getString(R.string.special_mailbox_display_name_drafts); } else if (folderName.equals(mAccount.getOutboxFolderName())) { holder.outbox = true; + holder.displayName = getString(R.string.special_mailbox_display_name_outbox); } else if (folderName.equals(mAccount.getSentFolderName())) { holder.sent = true; + holder.displayName = getString(R.string.special_mailbox_display_name_sent); } else if (folderName.equals(mAccount.getTrashFolderName())) { holder.trash = true; + holder.displayName = getString(R.string.special_mailbox_display_name_trash); } else { holder.special = false; + holder.displayName = folderName; } } @@ -1068,13 +1074,7 @@ public class FolderMessageList extends ExpandableListActivity { mFolders.add(holder); } holder.name = folder.getName(); - if (holder.name.equalsIgnoreCase(Email.INBOX)) { - holder.displayName = getString(R.string.special_mailbox_name_inbox); - } - else { - holder.displayName = folder.getName(); - } - setSpecialFolderIndicator(holder); + setSpecialFolderInfo(holder); if (holder.messages == null) { holder.messages = new ArrayList(); }