Open Bug 546619 Opened 16 years ago Updated 3 years ago

Folder pickers in UI: Show "real" folder names in addition to localized names

Categories

(MailNews Core :: Backend, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: bugzilla, Assigned: aceman)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 Seeing various weirdnesses regarding (localization of) the standard folder names, partly because of bugs and partly because of different default names used by various mail clients: I would suggest that the folder name that is displayed in the config GUI (in the folder pickers) would contain the "real" (IMAP) name in square brackets next to the localized name. Benefits: 1.) Users might get a clue whats going on when they see 2 folders that are displayed as having equal names in the tree panel (#1 is "Sent" as localized by TB and #2 is a IMAP folder haveing the localized name, or sth. like "Sent Items", which would be displayed as localized(Sent) by many webmailers) 2.) Users can choose the right one without doing guess-work 3.) Easier debugging of these kinds of issues. For example, see bug #543227, but I read about other issues/misunderstandings that could probably be cleared that way. Reproducible: Always
This should be doable. In the pickers we usually show folder.prettyName but we could also get the folder.name. Hopefully it will contain the raw folder name as stored on the server. This is also valid for POP3 and other local accounts where some special folders (Inbox, Sent, Drafts, etc) are localized, but on disk they are in English. Do you guys have any proposal for the formatting? E.g. "prettyName [name]" ? Or show the name as a tooltip, if it works on <menuitem> and <menu>?
Assignee: nobody → acelists
Status: UNCONFIRMED → NEW
Component: Preferences → Backend
Ever confirmed: true
Flags: needinfo?(josiah)
Flags: needinfo?(bwinton)
Product: Thunderbird → MailNews Core
Hardware: x86 → All
Version: unspecified → Trunk
It seems to me that most people aren't going to be interested in the real name, and it should usually be the same as the prettyName, so we probably shouldn't show it all the time. Therefore, a tooltip seems like a better choice than having it in square brackets.
Flags: needinfo?(bwinton)
Yes, for all folders other than the special ones, .name should be equal to .prettyName so we can ignore it. Where they do differ, I'll try to show the tooltip.
I have the same opinion as Blake.
Flags: needinfo?(josiah)
(Great to see my suggestion getting worked on. :-) ) The tooltip is surely more elegant. I am not sure, would you mean that the tooltip is also shown over the popup menus (when users actually select the folder)? Maybe a tooltip on this kind of nested "fly-out" menu would be a bit sophisticated? Maybe a solution could be to only show the real name (in square brackets) if it is different from the shown name. But it is really up to you - both are good solutions I think. :-) Thanks!
(In reply to Philippp from comment #0) > I would suggest that the folder name that is displayed in the config GUI (in the folder pickers) > would contain the "real" (IMAP) name in square brackets next to the localized name. What is definition of your "real (IMAP) name"? At protocol level, "real name" can be "modified-utf-7 string" because if "8bits data is passed as Mbox name" it should be used as-is without "modified-utf-7 decoding". If Mbox name is correctly encoded by "modified-utf-7", "decoded modified-utf-7" can be called "real name". If Mbox name is correctly encoded by "modified-utf-7", Thunderbird already shows both; decoded modified-utf-7 : "Folder name" at folder pane, folder selection list, folder picker dialog, ... modified-utf-7 : Shown as locally used file name in Folder Properties/General/Location. Exception-A : When special folder in Tb is localized by localized Tb build, "localized special name" is shown at Folder Pane. However, "special folder name in Tb is us-ascii Inbox, Trash, Sent, Drafts, Template, Archives only. In this case, "modified-utf-7 which is shown as locally used file name in Folder Properties/General/Location" is Inbox, Trash, Sent, Drafts, Template, Archives, because of non-ascii Mbox name at IMAP server. "受信トレイ" is localized name of "Inbox" in Tb ja version. However, "Mbox named Inbox at IMAP server" != "Mbox named 受信トレイ at IMAP server". How can confusion be generated by it in localization? Exception-B : If IMAP server supports case-sensitive Mbox name, Tb uses suffix in file name. abc, Abc, ABC is same file name in case-insensitive world such as MS Windows. So, if IMAP server supports case-sensitive Mbox name, Tb uses abc.msf, Abc-1.msf, ABC-2.msf for file name. Then, the suffixed name is shown as locally used file name in Folder Properties/General/Location. See Bug 572044 for variants of "Mbox Name" or "folder name" or "folder file name" etc. What is problem in localization? > 3.) Easier debugging of these kinds of issues. Why can "Folder Properties for debugging purpose only" or "Tooltip for debugging purpose only" be mandatory feature? Following is already available. - Addon of "Custom Buttons". ToolBar buton can be easiliy generated, and JavaScript code can be placed for the button. - Folder related properties is accessible via XPCOM object such as msgFolderr msgDatabase. Component for writing text to Error Console is available. So, any user can write simple JavaScript code to print msgFolder.URI, msgFolder.prettiestName etc. to Error Console. What kind of confusion in localization? "受信トレイ" is localized name of "Inbox" in Tb ja version. However, "Mbox named Inbox at IMAP server" != "Mbox named 受信トレイ at IMAP server". How can confusion be generated by it in localization? Confusion in situation like next? Mbox at server Special Folder of other mailer#1 Special Folder of other mailer#2 Special Folder of Thunderbird Sent Item ○ localized name=送信済み × Sent Item (no localized name) × Sent Item (no localized name) Sent Items × Sent Items (no localized name) ○ localized name=送信済み × Sent Items (no localized name) Sent × Sent (no localized name) × Sent (no localized name) ○ localized name=送信済み To aceman and Blake. According to commets in source or relevant descriptions, prettyName is obsolete. prettiestName is currently used. These are perhaps different in edge cases.
(In reply to WADA from comment #6) WADA, I think my case is all about "Exception-A". To sum it up briefly, just to be sure we are talking about the same context: My request originates from when I was trying to set up Tb properly in parallel to MS Outlook and a Webmailer on the same IMAP account, and it was nearly impossible to figure out which folders I needed to choose to get all 3 clients to use the same special folders on the IMAP server. The example you mention (with the 3 lines) shows quite well what can happen. And furthermore, what I saw would be an additional line in your table (call it "line 4"), which looks like below: Mbox at server Special Folder of other mailer#1 Special Folder of other mailer#2 Special Folder of Thunderbird 送信済み ○ 送信済み (no localized name) × ??? (just confused) × 送信済み (no localized name) In this case, the "other mailer#2" has created a folder literally named 送信済み on the imap server. Thus, in Tb, the user ends up seeing two folders both named "送信済み" in Tb folder pickers. (I dont know if that example would actually work with japanese characters, but what I saw with German localization (using mostly ascii characters), this is possible and I am sure it is what I was experiencing.) So, my primary need was to see the IMAP folder names in the account properties "copies and folders" section where you choose the special folders (like sent, archive, drafts, etc) when setting up the account. (And, also in the folder pane, if user wants to delete the additional folder, they should know which the are actually deleting.) (What I think might have added to the confusion was that there is this imap protocol extension allowing the client to ask the server about the special folder names, maybe overriding users settings, which might have just garbled my ties to get things straight at that time. Foregive me I dont know the rfc now, but I think you know it anyway.) > What is definition of your "real (IMAP) name"? As you probably see from the above, I mean the name that a (dumb) web-mailer without any localization would display. (I dont need the local file names, I think they dont matter in this case.) I hope I could illustrate what I mean?
So I tried this, but neither "tooltip" nor "description" does anything on a "menuitem". There are tooltips e.g. in the Bookmarks menu in Firefox, but that seems to be at the expense of a lot of strange code (look for "bhTooltip"). So the appending of the real name if they differ seems to be the easiest way. However, it seems even folder.name returns the localized name (see nsMsgDBFolder::SetPrettyName and nsMsgDBFolder::GetName). There is no documentation for name and prettyName in nsIMsgFolder.idl so it is not exactly known what they should represent. There is even prettiestName now. But it looks none of them shows the real folder name (non-localized). But I would be scared to change "name" to return the real name as there is a ton of callers (c++ and JS) that use it. As IMAP needs the real folder name to send server commands, it maintains an "onlineName" for each folder (see nsImapMailFolder::GetOnlineName). But such measure is not available for local folders (where also Outbox, Drafts, etc. are stored differently on disk than displayed). So there are 2 options: 1. go through each caller of GetName() to see whether it actually wants the localized prettyName or the real name (on disk or on server). When those are fixed, convert GetName to return the real name. 2. add a new realName member to nsIMsgFolder that will return the real name and plug all the various folder/server types to support it.
FYI. Exception-C: Folder name != File Name, because Tb intentinally uses ir, or due to hashing. In this case, "Folder Name which is shown at folder pane" is saved in "File Name.msf" Exception-C-1: Folder Name = Outbox, File Name = Unsent Messages.msf Exception-C-2: Folder Name has special character such as #, File Name = safe_portion + hash + ".msf" This occurs on modified-utf-7 in IMAP too. Exception-C-3: Folder Name with ".msf" is too long(more than 126 char) , File Name = safe_portion + hash+ ".msf"
"&" is "&-" in modified-utf-7. So, "&" in Folder Name, "&-" in File Name, is observed.
Note to myself: "tooltiptext" attribute works on menuitems.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: