thomascube
2005-10-16 9fee0ed9af6bb1daa3af2ff7290f5589040b4821
Fixed folder display; added Portuguese and Catalan


6 files modified
1 files added
136 ■■■■■ changed files
CHANGELOG 8 ●●●●● patch | view | raw | blame | history
program/include/main.inc 27 ●●●●● patch | view | raw | blame | history
program/include/rcube_imap.inc 8 ●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc 19 ●●●●● patch | view | raw | blame | history
program/js/app.js 11 ●●●● patch | view | raw | blame | history
program/lib/imap.inc 4 ●●●● patch | view | raw | blame | history
program/localization/index.inc 59 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -42,3 +42,11 @@
- Long folder names will not flow over message list (Bug #1267232)
- Show nested mailboxes hieracically
- Enable IMAPS by host
2005/15/16
----------
- Added Portuguese and Catalan translation
- Make SMTP auth method configurable
- Make mailboxlist scrollable (Bug #1326372)
program/include/main.inc
@@ -423,6 +423,33 @@
  }
// read directory program/localization/ and return a list of available languages
function rcube_list_languages()
  {
  global $CONFIG, $INSTALL_PATH;
  static $sa_languages = array();
  if (!sizeof($sa_languages))
    {
    @include_once($INSTLL_PATH.'program/localization/index.inc');
    if ($dh = @opendir($INSTLL_PATH.'program/localization'))
      {
      while (($name = readdir($dh)) !== false)
        {
        if ($name{0}=='.' || !is_dir($INSTLL_PATH.'program/localization/'.$name))
          continue;
        if ($label = $rcube_languages[$name])
          $sa_languages[$name] = $label ? $label : $name;
        }
      closedir($dh);
      }
    }
  return $sa_languages;
  }
// ************** template parsing and gui functions **************
program/include/rcube_imap.inc
@@ -268,7 +268,7 @@
    else
      $count = iil_C_CountMessages($this->conn, $mailbox);
//print "/**** get messagecount for $mailbox ($mode): $count ****/\n";
// print "/**** get messagecount for $mailbox ($mode): $count ****/\n";
    if (is_array($a_mailbox_cache[$mailbox]))
      $a_mailbox_cache[$mailbox] = array();
@@ -312,8 +312,8 @@
      $a_header_index = iil_C_FetchHeaders($this->conn, $mailbox, "1:$max");
      $a_msg_headers = array();
      foreach ($a_header_index as $i => $headers)
        if (!$headers->deleted)
            $a_msg_headers[$headers->uid] = $headers;
      if (!$headers->deleted)
        $a_msg_headers[$headers->uid] = $headers;
        
// print "/**** fetch headers ****/\n";
      }
@@ -445,7 +445,7 @@
    $cache_key = $this->mailbox.'.msg';
    if ($this->caching_enabled && $result && ($a_cached_headers = $this->get_cache($cache_key)))
      {
      // close and re-open connection
      // close and re-open connection
      $this->reconnect();
      foreach ($uids as $uid)
program/include/rcube_shared.inc
@@ -1109,6 +1109,9 @@
  if ($text=='')
    $text = $a_text_item['single'];
  // perform utf-8 decoding
  //if (function_exists('utf8_decode'))
  //  $text = utf8_decode($text);
  // replace vars in text
  if (is_array($attrib['vars']))
@@ -1414,4 +1417,20 @@
function abbrevate_string($str, $maxlength, $place_holder='...')
  {
  $length = strlen($str);
  $first_part_length = floor($maxlength/2) - strlen($place_holder);
  if ($length > $maxlength)
    {
    $second_starting_location = $length - $maxlength + $first_part_length + 1;
    $str = substr($str, 0, $first_part_length) . $place_holder . substr($str, $second_starting_location, $length);
    }
  return $str;
  }
?>
program/js/app.js
@@ -1,4 +1,4 @@
/*
/*
 +-----------------------------------------------------------------------+
 | RoundCube Webmail Client Script                                       |
 |                                                                       |
@@ -1006,6 +1006,7 @@
    if (!page && mbox != this.env.mailbox)
      {
      page = 1;
      add_url += '&_refresh=1';
      this.env.current_page = page;
      this.clear_selection();
      }
@@ -1016,14 +1017,14 @@
    // load message list remotely
    if (this.gui_objects.messagelist)
      {
      this.list_mailbox_remote(mbox, page);
      this.list_mailbox_remote(mbox, page, add_url);
      return;
      }
    
    if (this.env.contentframe && window.frames && window.frames[this.env.contentframe])
      {
      target = window.frames[this.env.contentframe];
      add_url = '&_framed=1';
      add_url += '&_framed=1';
      }
    // load message list to target frame/window
@@ -1036,7 +1037,7 @@
  // send remote request to load message list
  this.list_mailbox_remote = function(mbox, page)
  this.list_mailbox_remote = function(mbox, page, add_url)
    {
    // clear message list
    var table = this.gui_objects.messagelist;
@@ -1050,7 +1051,7 @@
    // send request to server
    var url = '_mbox='+escape(mbox)+(page ? '&_page='+page : '');
    this.set_busy(true, 'loading');
    this.http_request('list', url);
    this.http_request('list', url+add_url);
    };
program/lib/imap.inc
@@ -325,7 +325,7 @@
    }
    
    //open socket connection
    $conn->fp = @fsockopen($host, $ICL_PORT, &$errno, &$errstr, 10);
    $conn->fp = @fsockopen($host, $ICL_PORT, $errno, $errstr, 10);
    if (!$conn->fp){
        $iil_error = "Could not connect to $host at port $ICL_PORT: $errstr";
        $iil_errornum = -1;
@@ -1388,7 +1388,7 @@
        $result=array();
        reset($index);
        while (list($key, $val)=each($index)){
            $result[$i]=$a[$key];
            $result[$key]=$a[$key];
            $i++;
        }
    }
program/localization/index.inc
New file
@@ -0,0 +1,59 @@
<?php
/*
 +-----------------------------------------------------------------------+
 | program/localization/index.inc                                        |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005, RoundCube Dev, - Switzerland                      |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
 |   Provide centralized location for keeping track of                   |
 |   available languages                                                 |
 |                                                                       |
 +-----------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
 $Id$
 */
 $rcube_languages = array(
    'en'    => 'English (US)',
    'en_GB' => 'English (GB)',
    'ar'    => 'Arabic',
    'bg'    => 'Bulgarian',
    'cat'   => 'Catalan',
    'tw'    => 'Chinese (BIG5)',
    'cn'    => 'Chinese(GB2312)',
    'cz'    => 'Czech',
     'ca'    => 'Catalan',
    'da'    => 'Dansk',
     'de'    => 'Deutsch',
     'es'    => 'Espa&ntilde;ol',
    'fr'    => 'Fran&ccedil;ais',
    'ga'    => 'Galician',
    'el'    => 'Greek',
    'hu'    => 'Hungarian',
    'it'    => 'Italiano',
    'jp'    => 'Japanese',
    'kr'    => 'Korean',
    'lt'    => 'Lithuanian',
    'nl'    => 'Nederlands',
    'no'    => 'Norsk (bokm&aring;l)',
    'fa'    => 'Persian',
    'pl'    => 'Polski',
    'pt'    => 'Portuguese (Standard)',
    'pt_BR' => 'Portuguese (Brazilian)',
    'ro'    => 'Romanian',
    'ru'    => 'Russian',
    'fi'    => 'Suomi',
    'se'    => 'Svenska',
    'si'    => 'Slovenian',
    'tr'    => 'Turkish',
    'vn'    => 'Vietnamese'
);
?>