[dev] lib/MIME/Headers.php : unneeded NLS conversion of mail header in listHeaders() ?

Michael M Slusarz slusarz at bigworm.colorado.edu
Mon Dec 15 09:26:22 PST 2003


Quoting Etienne Goyer <etienne.goyer at linuxquebec.com>:

| On Mon, Dec 15, 2003 at 10:07:12AM -0700, Michael M Slusarz wrote:
| > True.  However, the Mailing List headers are a special case since they can
| be
| > explicitly shown to the user in IMP when the "Show Mailing List headers"
| link
| > is clicked.  Obviously, we can't predict all possible Header
| > fields/translations when the "Show All Headers" link is clicked, but the
| > Mailing list headers are a specific subset and should be translated for UI
| > purposes.
|
| I guess that is open to debate, but I would not want to have headers
| name translated when I ask to see all header (a feature useful mostly to
| power users anyway).  I would not, for example, want to have X-Spam to
| be translated to X-Pourriel, or X-Priority to be translated to
| X-Priorité.

As mentioned above, the Mailing List Headers are a special case.  We have a link
specifically to show the Mailing List Headers by themselves (in addition to the
"standard" headers).  Giving a user this link, translated in their own
language, and then presenting them the Header names in English is
counterintuitive.  In any case, these translated mailing list header names are
being used more for UI purposes (i.e. "This link will show you Mailing list
unsubscription information") than telling the user the name of the MIME header
(i.e. "This is the 'List-Unsubscribe' header").

I personally don't see any problem translating the name of any header we are
able to in the "Show All Headers" mode - there is *no* indication or statement
that we will be presenting the user the Headers in the original format.  We can
do whatever we want, for purposes of UI formatting, in the message screen.  If
you want to see the *exact* text of the MIME headers, that is what the "Show
Message Source" link is for.

| > | If I am wrong, then ingo/lib/Script/sieve.php have to be fixed.  Around
| > | line 300, it grab headers name that correspond to list.  Since these are
| > | translated, I end up with sieve script that look like :
| >
| > Yup - this is a bug and needs to be corrected (since mail is always sent
| using
| > the English Header fields, we obviously need to filter using the English
| field
| > names).
|
| IMHO, MIME::Headers::listHeaders() should return the untranslated name
| of List-* headers.

It does.

  $array = MIME_Headers::listHeaders();
  $untranslated_names = array_keys($array); ***
  $translated_names = array_values($array);


michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list