Author Topic: New Translation-Label  (Read 5662 times)

Offline mkouqz

  • Newbie
  • *
  • Posts: 1
New Translation-Label
« on: June 10, 2007, 04:36:38 AM »
Hello,
i´m using roundcube since 2 days, played arround and have one small problem:

How does the localization work with the lables.inc file.
Is it possible to add new lables on the fly (eg. for directory listing)

My problem as follows: i have one IMAP folder called ".Templates", but shpuld be in german "Vorlagen".

In my labels.inc i have made the following entries:

$labels['Templates'] = 'Vorlagen';
$labels['templates'] = 'Vorlagen';

But this new lables are not used by the application.

Any Ideas ?

best regards,
Andreas M.

Offline atuin

  • Newbie
  • *
  • Posts: 3
Add Template folder localization
« Reply #1 on: March 09, 2009, 08:34:33 AM »
hello,

apply this patch in rc0.2-stable

Code: [Select]

diff -Naur roundcubemail-0.2-stable/config/main.inc.php.dist htdocs/config/main.inc.php.dist
--- roundcubemail-0.2-stable/config/main.inc.php.dist 2009-03-09 12:17:55.000000000 +0000
+++ htdocs/config/main.inc.php.dist 2009-03-09 12:16:28.000000000 +0000
@@ -172,9 +172,12 @@
 // leave blank if they should be deleted directly
 $rcmail_config['trash_mbox'] = 'Trash';
 
+// Templates folder
+$rcmail_config['templates_mbox'] = 'Templates';
+
 // display these folders separately in the mailbox list.
 // these folders will also be displayed with localized names
-$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
+$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash', 'Templates');
 
 // automatically create the above listed default folders on login
 $rcmail_config['create_default_folders'] = FALSE;
diff -Naur roundcubemail-0.2-stable/program/include/main.inc htdocs/program/include/main.inc
--- roundcubemail-0.2-stable/program/include/main.inc 2008-12-24 14:19:27.000000000 +0000
+++ htdocs/program/include/main.inc 2009-03-09 12:11:46.000000000 +0000
@@ -1164,7 +1164,7 @@
   global $CONFIG;
 
   // for these mailboxes we have localized labels and css classes
-  foreach (array('sent', 'drafts', 'trash', 'junk') as $smbx)
+  foreach (array('sent', 'drafts', 'trash', 'junk', 'templates') as $smbx)
   {
     if ($folder_id == $CONFIG[$smbx.'_mbox'])
       return $smbx;
diff -Naur roundcubemail-0.2-stable/program/localization/fr_FR/labels.inc htdocs/program/localization/fr_FR/labels.inc
--- roundcubemail-0.2-stable/program/localization/fr_FR/labels.inc 2009-03-09 12:17:55.000000000 +0000
+++ htdocs/program/localization/fr_FR/labels.inc 2009-03-09 11:43:30.000000000 +0000
@@ -35,6 +35,7 @@
 $labels['sent'] = 'Messages envoyés';
 $labels['trash'] = 'Corbeille';
 $labels['junk'] = 'Indésirables';
+$labels['templates']= 'Modèles';
 $labels['subject'] = 'Objet';
 $labels['from'] = 'De';
 $labels['to'] = 'À';
diff -Naur roundcubemail-0.2-stable/program/steps/settings/func.inc htdocs/program/steps/settings/func.inc
--- roundcubemail-0.2-stable/program/steps/settings/func.inc 2008-12-16 19:05:50.000000000 +0000
+++ htdocs/program/steps/settings/func.inc 2009-03-09 11:30:58.000000000 +0000
@@ -329,6 +329,11 @@
         $table->add(null, $select->show($config['trash_mbox'], array('name' => "_trash_mbox")));
       }
 
+      if (!isset($no_override['templates_mbox'])) {
+        $table->add('title', Q(rcube_label('templates')));
+        $table->add(null, $select->show($config['templates_mbox'], array('name' => "_templates_mbox")));
+      }
+
       $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('specialfolders'))) . $table->show($attrib));
     }
     break;




and add $labels['templates']= 'Modèles';
in your label.inc

best regards,
Cyril