<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>IMP should (correctly) support special folder name translation</title> 
  <pubDate>Fri, 10 Apr 2026 16:31:14 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7760</link> 
  <atom:link rel="self" type="application/rss+xml" title="IMP should (correctly) support special folder name translation" href="https://bugs.horde.org/ticket/7760/rss" /> 
  <description>IMP should (correctly) support special folder name translation</description> 
 
   
   
  <item> 
   <title>IMP&#039;s way of handling translated special folders doesn&#039;t rea</title> 
   <description>IMP&#039;s way of handling translated special folders doesn&#039;t really excite me, here some thoughts:



Current default preferences

---------------------------

$_prefs[&#039;drafts_folder&#039;]    = array(&#039;value&#039; =&gt; _(&quot;Drafts&quot;), ...

$_prefs[&#039;trash_folder&#039;]     = array(&#039;value&#039; =&gt; _(&quot;Trash&quot;), ...

$_prefs[&#039;sent_mail_folder&#039;] = array(&#039;value&#039; =&gt; _(&quot;Sent&quot;), ...



This way users using their webmail with different languages (YES, there are users doing so) will get many differently named special folders. But even if just using German (just as an example) they will have trouble when also using Thunderbird or another IMAP-Client. TB&#039;s default setting for example are exactly the same as IMP ones: Drafts, Trash, Sent. But a German user would have to either reconfigure IMP or TB as IMP will create Entwürfe, Papierkorb and Gesendet. And after that he&#039;ll see every folder name twice in TB, but the one with the special folder symbol will not be the same as in DIMP.



I also mislike the idea to force translators to use IMAP_UTF7-encoded strings - if they&#039;re using poedit they will not know which one of the texts containing &quot;Entwürfe&quot; will have to be encoded. Example from German translation:



#: config/prefs.php.dist:301

msgid &quot;Drafts&quot;

msgstr &quot;Entw&amp;APw-rfe&quot;



I temporarily solved this for myself by setting prefs to &#039;Drafts&#039;, &#039;Sent&#039; and &#039;Trash&#039; (without _()) and adding a new foreach-loop to DIMP::getFolderResponse(), hardcoding my folder names:



        foreach ($result[&#039;a&#039;] as $k =&gt; $v) {

            if (! isset($v-&gt;s)) continue;

            if ($v-&gt;s != 1) continue;

            if (in_array($v-&gt;l, array(&#039;Trash&#039;, &#039;Sent&#039;, &#039;Drafts&#039;))) {

                $result[&#039;a&#039;][$k]-&gt;l = mb_convert_encoding(_($v-&gt;l), &#039;UTF-8&#039;, &#039;UTF7-IMAP&#039;);

            }

        }



Obviously this is a quick &amp; dirty hack and not a solution to be applied generically - it should be solved in a clean way in more than one location:

- suggesting Trash, Sent and Drafts as default special folder names

- doing translation in (D)IMP&#039;s folder tree creation functions and to be applied to labels only

- removing IMAP_UTF7-nonsense from translation files



Please also see bug #7759 for an example fix of label usage in DIMP.



Regards,

Thomas Gelf</description> 
   <pubDate>Fri, 05 Dec 2008 17:40:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7760#t51090</link> 
  </item> 
   
  <item> 
   <title>We resisted this &quot;feature&quot; for a long time because of exactl</title> 
   <description>We resisted this &quot;feature&quot; for a long time because of exactly this mess. I&#039;ll defer to some extent to Jan, but is there some reason you started this as a discussion here, instead of hashing it out on the mailing list and then filing an enhancement (if necessary) for the agreed-upon solution?</description> 
   <pubDate>Mon, 08 Dec 2008 02:43:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7760#t51129</link> 
  </item> 
   
  <item> 
   <title>Duplicate of request #7545.</title> 
   <description>Duplicate of request #7545.</description> 
   <pubDate>Mon, 08 Dec 2008 12:23:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7760#t51147</link> 
  </item> 
   
  <item> 
   <title>Jan: thank you for this hint, #7545 is great!</title> 
   <description>Jan: thank you for this hint, #7545 is great!</description> 
   <pubDate>Mon, 08 Dec 2008 12:59:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7760#t51149</link> 
  </item> 
   
  <item> 
   <title>Just for completeness I&#039;ll leave an additional comment with </title> 
   <description>Just for completeness I&#039;ll leave an additional comment with some thoughts I&#039;ve written before reading Jan&#039;s hint to #7545:



IMO the real mess here is forcing translators into using IMAP_UTF7-encodings - and not using special folder translations as &quot;real&quot; IMAP folders instead of labels. On (IMAP) server side there should be a consistent naming, unfortunately there is no standard prescribing such names. However, as of my researches most vendors agree on Drafts, Sent and Trash - and also IMP is using them as a default setting.



Instead of using as real folder names and translating just their labels, IMP is setting them to _(&#039;Drafts&#039;) etc. After testing IMP in four different languages (the ones being used by our customers) I had 12 special folders in my mailbox.



User (or administrative) preferences should set drafts_folder, sent_mail_folder and trash_folder corresponding to real IMAP folder names. Labels for these folders have always to be shown as _(&#039;Drafts&#039;), _(&#039;Sent&#039;) and _(&#039;Trash&#039;), regardless of what IMAP folder they are bound to. If a user has to change it&#039;s special folder location for some reason (mostly &quot;Sent Items&quot;, &quot;SENT&quot; etc, as of compatibility reasons) he will continue to read _(&#039;Sent&#039;) in (D)IMP - in his very own language. This is how Thunderbird and other IMAP clients are behaving, and in my eyes this would be the correct approach for IMP too.



A &quot;correct&quot; patch should not happen where I applied it, but earlier in IMAP tree creating (Note: exactly as done by Massimiliano). It should substitute labels for this special folders (INBOX is a similar case and already handled correctly in some hardcoded way) with translated labels - so even &#039;SENT&#039; and &#039;Sent Items&#039; would show up as _(&#039;Sent&#039;).



That&#039;s enough spam for now - as I&#039;ve had already written down this (and even more), so I didn&#039;t want to throw it away ;-)



Regards,

Thomas



</description> 
   <pubDate>Mon, 08 Dec 2008 13:12:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7760#t51152</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
