Description
From @ryanlchan on January 31, 2013 6:35
Remembering localizations for each mailbox name is a pain; Gmail has very little consistency on how they name their folders as well. Some are prefixes by [Gmail], others by [Google Mail]; Some trash folders are called "Trash", others "Bin", yet others are localized into other languages.
This commit leverages Gmail's support of the XLIST command to use standardized, non-localized names for specific folders to find the correct labels. The supported list is:
- :Inbox
- :Allmail
- :Drafts
- :Sent
- :Trash
- :Important
- :Spam
However, even these are not all present on every account. If a name is passed that should be recognized, but isn't, the localizer will return nil. If a non-recognized name is passed, it is returned as-is.
Copied from original issue: nu7hatch/gmail/pull/83