The "All Mail" folder is locale-aware #5

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

tgulacsi commented May 7, 2012

It seems to me that Google uses different names for the "All Mail" folder for different languages.
For Hungarian, it is "[GMail]/Összes levél" for example.

This little fix adds this name to GIMAPFetcher.ALL_FOLDER.
Maybe a more complete fix would be to have this name configurable, but it works for me now...

GThomas

gaubert was assigned May 8, 2012

Owner

gaubert commented May 8, 2012

Hi thanks for that info. I was not aware of that. I will need to find a work around. It will be something configurable for sure but I would like it to be automatic if possible.

Owner

gaubert commented May 8, 2012

I have found this. http://stackoverflow.com/questions/2185391/localized-gmail-imap-folders
I will try to use XLIST and send you a version for testing if this is ok with you.

Owner

gaubert commented May 9, 2012

I have fixed it. I will prepare a new version. Are you willing to test and report for the Hungarian localisation ?
Many thanks

Owner

gaubert commented May 9, 2012

close that issue

gaubert closed this May 9, 2012

tgulacsi commented May 9, 2012

First I got this:

(gmvault)gthomas@waterhouse:/usr/local/share/gmvault$ bin/gmvault sync --debug -d ~/.gmvault/gmvault-db/ tgulacsi78@gmail.com

Use gmvault-db located in /home/gthomas/.gmvault/gmvault-db/.

Activate debugging information.
Authentication performed with Gmail XOAuth token.

no ENV variable $GMVAULT_DIR defined. Set by default $GMVAULT_DIR to $HOME/.gmvault (/home/gthomas/.gmvault)
Get XOAuth credential from /home/gthomas/.gmvault/tgulacsi78@gmail.com.oauth.

Successfully read oauth credentials.

Connect to Gmail server.
Error: Cannot find global 'All Mail' folder (maybe localized and translated into your language) ! Check whether 'Show in IMAP for 'All Mail' is enabled in Gmail (Go to Settings->Labels->All Mail).

=== Exception traceback ===
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/gmv/gmv_cmd.py", line 503, in run
self._sync(args, credential)
File "build/bdist.linux-x86_64/egg/gmv/gmv_cmd.py", line 447, in _sync
args['email'], credential, read_only_access = True, use_encryption = args['encrypt'])
File "build/bdist.linux-x86_64/egg/gmv/gmvault.py", line 453, in init
self.src.connect()
File "build/bdist.linux-x86_64/egg/gmv/imap_utils.py", line 231, in connect
self.find_all_mail_folder()
File "build/bdist.linux-x86_64/egg/gmv/imap_utils.py", line 109, in wrapper
return the_func(_args, *_kwargs)
File "build/bdist.linux-x86_64/egg/gmv/imap_utils.py", line 275, in find_all_mail_folder
raise Exception("Cannot find global 'All Mail' folder (maybe localized and translated into your language) ! Check whether 'Show in IMAP for 'All Mail' is enabled in Gmail (Go to Settings->Labels->All Mail)")
Exception: Cannot find global 'All Mail' folder (maybe localized and translated into your language) ! Check whether 'Show in IMAP for 'All Mail' is enabled in Gmail (Go to Settings->Labels->All Mail)

=== End of Exception traceback ===

But after I checked in one of the unchecked "Show in IMAP" box (NOT All Mail!) to have ALL labels shown in IMAP, THEN I got gmvault working.
I think it's not gmvault's fault, but GMail's quirk.

Thanks for the rapid enhancements!

GThomas

Owner

gaubert commented May 9, 2012

Yep you have to make All Mail visible in the IMAP tab of GMail.
Also I noticed that my modifications worked with your localized All Mail name.
Thanks for your help.
Within 2 weeks I should release the next version so stay posted :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment