summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc109
-rw-r--r--program/include/rcube_smtp.inc3
-rw-r--r--program/js/app.js122
-rw-r--r--program/localization/cn/labels.inc179
-rw-r--r--program/localization/cn/messages.inc63
-rw-r--r--program/localization/de/messages.inc2
-rw-r--r--program/localization/en/messages.inc2
-rw-r--r--program/localization/index.inc3
-rw-r--r--program/localization/tr/labels.inc176
-rw-r--r--program/localization/tr/messages.inc60
-rw-r--r--program/steps/mail/compose.inc2
11 files changed, 674 insertions, 47 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 6c4591dac..4cfb5b270 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -332,6 +332,11 @@ function rcmail_login($user, $pass, $host=NULL)
$user = $sql_arr['username'];
}
+ // try to resolve email address from virtuser table
+ if (!empty($CONFIG['virtuser_file']) && strstr($user, '@'))
+ $user = rcmail_email2user($user);
+
+
// exit if IMAP login failed
if (!($imap_login = $IMAP->connect($host, $user, $pass, $imap_port, $imap_ssl)))
return FALSE;
@@ -388,19 +393,35 @@ function rcmail_login($user, $pass, $host=NULL)
function rcmail_create_user($user, $host)
{
global $DB, $CONFIG, $IMAP;
-
+
+ $user_email = '';
+
+ // try to resolve user in virtusertable
+ if (!empty($CONFIG['virtuser_file']) && strstr($user, '@')==FALSE)
+ $user_email = rcmail_user2email($user);
+
$DB->query("INSERT INTO ".get_table_name('users')."
- (created, last_login, username, mail_host, language)
- VALUES (now(), now(), ?, ?, ?)",
+ (created, last_login, username, mail_host, alias, language)
+ VALUES (now(), now(), ?, ?, ?, ?)",
$user,
$host,
+ $user_email,
$_SESSION['user_lang']);
if ($user_id = $DB->insert_id(get_sequence_name('users')))
{
- $user_email = strstr($user, '@') ? $user : sprintf('%s@%s', $user, $host);
+ if (is_string($CONFIG['mail_domain']))
+ $mail_domain = $CONFIG['mail_domain'];
+ else if (is_array($CONFIG['mail_domain']) && isset($CONFIG['mail_domain'][$host]))
+ $mail_domain = $CONFIG['mail_domain'][$host];
+ else
+ $mail_domain = $host;
+
+ if ($user_email=='')
+ $user_email = strstr($user, '@') ? $user : sprintf('%s@%s', $user, $mail_domain);
+
$user_name = $user!=$user_email ? $user : '';
-
+
// also create a new identity record
$DB->query("INSERT INTO ".get_table_name('identities')."
(user_id, del, standard, name, email)
@@ -433,6 +454,84 @@ function rcmail_create_user($user, $host)
}
+// load virtuser table in array
+function rcmail_getvirtualfile()
+ {
+ global $CONFIG;
+ if (empty($CONFIG['virtuser_file']) || !is_file($CONFIG['virtuser_file']))
+ return FALSE;
+
+ // read file
+ $a_lines = file($CONFIG['virtuser_file']);
+ return $a_lines;
+ }
+
+
+// find matches of the given pattern in virtuser table
+function rcmail_findinvirtual($pattern)
+ {
+ $result = array();
+ $virtual = rcmail_getvirtualfile();
+ if ($virtual==FALSE)
+ return $result;
+
+ // check each line for matches
+ foreach ($virtual as $line)
+ {
+ $line = trim($line);
+ if (empty($line) || $line{0}=='#')
+ continue;
+
+ if (eregi($pattern, $line))
+ $result[] = $line;
+ }
+
+ return $result;
+ }
+
+
+// resolve username with virtuser table
+function rcmail_email2user($email)
+ {
+ $user = $email;
+ $r = rcmail_findinvirtual("^$email");
+
+ for ($i=0; $i<count($r); $i++)
+ {
+ $data = $r[$i];
+ $arr = preg_split('/\s+/', $data);
+ if(count($arr)>0)
+ {
+ $user = trim($arr[count($arr)-1]);
+ break;
+ }
+ }
+
+ return $user;
+ }
+
+
+// resolve e-mail address with virtuser table
+function rcmail_user2email($user)
+ {
+ $email = "";
+ $r = rcmail_findinvirtual("$user$");
+
+ for ($i=0; $i<count($r); $i++)
+ {
+ $data=$r[$i];
+ $arr = preg_split('/\s+/', $data);
+ if (count($arr)>0)
+ {
+ $email = trim($arr[0]);
+ break;
+ }
+ }
+
+ return $email;
+ }
+
+
// overwrite action variable
function rcmail_overwrite_action($action)
{
diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc
index e4aea09d2..d3376328f 100644
--- a/program/include/rcube_smtp.inc
+++ b/program/include/rcube_smtp.inc
@@ -72,7 +72,8 @@ function smtp_mail($from, $recipients, $headers, &$body)
// create Net_SMTP object and connect to server
if (!is_object($smtp_conn))
{
- $SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, 'localhost');
+ $helo_host = !empty($_SERVER['server_name']) ? $_SERVER['server_name'] : 'localhost';
+ $SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host);
// set debugging
if ($CONFIG['debug_level'] & 8)
diff --git a/program/js/app.js b/program/js/app.js
index a7445e2b5..213f62b21 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6,7 +6,7 @@
| Copyright (C) 2005, RoundCube Dev, - Switzerland |
| Licensed under the GNU GPL |
| |
- | Modified: 2005/12/14 (roundcube) |
+ | Modified: 2005/12/16 (roundcube) |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
@@ -312,6 +312,9 @@ function rcube_webmail()
input_subject.focus();
else if (input_message)
this.set_caret2start(input_message); // input_message.focus();
+
+ // get summary of all field values
+ this.cmp_hash = this.compose_field_hash();
};
@@ -457,7 +460,13 @@ function rcube_webmail()
// misc list commands
case 'list':
if (this.task=='mail')
+ {
+ // check input before leaving compose step
+ if (this.env.action=='compose' && this.cmp_hash != this.compose_field_hash() && !confirm(this.get_label('notsentwarning')))
+ break;
+
this.list_mailbox(props);
+ }
else if (this.task=='addressbook')
this.list_contacts();
break;
@@ -693,45 +702,8 @@ function rcube_webmail()
if (!this.gui_objects.messageform)
break;
- // check input fields
- var input_to = rcube_find_object('_to');
- var input_subject = rcube_find_object('_subject');
- var input_message = rcube_find_object('_message');
-
- // check for empty recipient
- if (input_to && !rcube_check_email(input_to.value, true))
- {
- alert(this.get_label('norecipientwarning'));
- input_to.focus();
+ if (!this.check_compose_input())
break;
- }
-
- // display localized warning for missing subject
- if (input_subject && input_subject.value == '')
- {
- var subject = prompt(this.get_label('nosubjectwarning'), this.get_label('nosubject'));
-
- // user hit cancel, so don't send
- if (!subject && subject !== '')
- {
- input_subject.focus();
- break;
- }
- else
- {
- input_subject.value = subject ? subject : this.get_label('nosubject');
- }
- }
-
- // check for empty body
- if (input_message.value=='')
- {
- if (!confirm(this.get_label('nobodywarning')))
- {
- input_message.focus();
- break;
- }
- }
// all checks passed, send message
this.set_busy(true, 'sendingmessage');
@@ -1348,6 +1320,78 @@ function rcube_webmail()
/*********************************************************/
+ // checks the input fields before sending a message
+ this.check_compose_input = function()
+ {
+ // check input fields
+ var input_to = rcube_find_object('_to');
+ var input_subject = rcube_find_object('_subject');
+ var input_message = rcube_find_object('_message');
+
+ // check for empty recipient
+ if (input_to && !rcube_check_email(input_to.value, true))
+ {
+ alert(this.get_label('norecipientwarning'));
+ input_to.focus();
+ return false;
+ }
+
+ // display localized warning for missing subject
+ if (input_subject && input_subject.value == '')
+ {
+ var subject = prompt(this.get_label('nosubjectwarning'), this.get_label('nosubject'));
+
+ // user hit cancel, so don't send
+ if (!subject && subject !== '')
+ {
+ input_subject.focus();
+ return false;
+ }
+ else
+ {
+ input_subject.value = subject ? subject : this.get_label('nosubject');
+ }
+ }
+
+ // check for empty body
+ if (input_message.value=='')
+ {
+ if (!confirm(this.get_label('nobodywarning')))
+ {
+ input_message.focus();
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+
+ this.compose_field_hash = function()
+ {
+ // check input fields
+ var input_to = rcube_find_object('_to');
+ var input_cc = rcube_find_object('_to');
+ var input_bcc = rcube_find_object('_to');
+ var input_subject = rcube_find_object('_subject');
+ var input_message = rcube_find_object('_message');
+
+ var str = '';
+ if (input_to && input_to.value)
+ str += input_to.value+':';
+ if (input_cc && input_cc.value)
+ str += input_cc.value+':';
+ if (input_bcc && input_bcc.value)
+ str += input_bcc.value+':';
+ if (input_subject && input_subject.value)
+ str += input_subject.value+':';
+ if (input_message && input_message.value)
+ str += input_message.value;
+
+ return str;
+ };
+
+
this.change_identity = function(obj)
{
if (!obj || !obj.options)
diff --git a/program/localization/cn/labels.inc b/program/localization/cn/labels.inc
new file mode 100644
index 000000000..6d72f763c
--- /dev/null
+++ b/program/localization/cn/labels.inc
@@ -0,0 +1,179 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/cn/labels.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundQube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Simplified-chinese utf-8 by winman 2005/12/6 |
+ | Author: winman rong <winman.rong@gmail.com> |
+ +-----------------------------------------------------------------------+
+
+ $Id$
+
+*/
+
+$utf8_decoding = TRUE;
+
+$labels = array();
+
+// login page
+$labels['username'] = '用户名';
+$labels['password'] = '密码';
+$labels['server'] = '服务器';
+$labels['login'] = '登录';
+
+// taskbar
+$labels['logout'] = '退出';
+$labels['mail'] = '电子邮件';
+$labels['settings'] = '个人设置';
+$labels['addressbook'] = '地址薄';
+
+// mailbox names
+$labels['inbox'] = '收件箱';
+$labels['sent'] = '发件箱';
+$labels['trash'] = '垃圾桶';
+$labels['drafts'] = '早稿';
+$labels['junk'] = '垃圾邮件';
+
+// message listing
+$labels['subject'] = '邮件标题';
+$labels['from'] = '发件人';
+$labels['to'] = '接收人';
+$labels['cc'] = '副本';
+$labels['bcc'] = '密送';
+$labels['replyto'] = '回复地址';
+$labels['date'] = '日期';
+$labels['size'] = '文件大小';
+$labels['priority'] = '优先权';
+$labels['organization'] = '机构';
+
+// aliases
+$labels['reply-to'] = $labels['回复到'];
+
+$labels['mailboxlist'] = '文件夹';
+$labels['messagesfromto'] = 'Messages $from to $to of $count';
+$labels['messagenrof'] = 'Message $nr of $count';
+
+$labels['moveto'] = '移动到...';
+$labels['download'] = '下载';
+
+$labels['filename'] = '文件名称';
+$labels['filesize'] = '文件大小';
+
+$labels['preferhtml'] = '以HTML格式显示';
+$labels['htmlmessage'] = 'HTML格式邮件';
+$labels['prettydate'] = 'Pretty dates';
+
+$labels['addtoaddressbook'] = '加到地址薄';
+
+// weekdays short
+$labels['sun'] = '星期日';
+$labels['mon'] = '星期一';
+$labels['tue'] = '星期二';
+$labels['wed'] = '星期三';
+$labels['thu'] = '星期四';
+$labels['fri'] = '星期五';
+$labels['sat'] = '星期六';
+
+// weekdays long
+$labels['sunday'] = '星期日';
+$labels['monday'] = '星期一';
+$labels['tuesday'] = '星期二';
+$labels['wednesday'] = '星期三';
+$labels['thursday'] = '星期四';
+$labels['friday'] = '星期五';
+$labels['saturday'] = '星期六';
+
+$labels['today'] = '今天';
+
+// toolbar buttons
+$labels['writenewmessage'] = '写新邮件';
+$labels['replytomessage'] = '回复邮件';
+$labels['forwardmessage'] = '转发邮件';
+$labels['deletemessage'] = '把邮件移动到垃圾桶';
+$labels['printmessage'] = '打印这封邮件';
+$labels['previousmessages'] = '查看上一封邮件';
+$labels['nextmessages'] = '查看下一封邮件';
+$labels['backtolist'] = '返回邮件列表';
+$labels['viewsource'] = '显示源代码';
+
+$labels['select'] = '选择';
+$labels['all'] = '全部';
+$labels['none'] = '没有';
+$labels['unread'] = '还没读过的';
+
+// message compose
+$labels['compose'] = '写新邮件';
+$labels['sendmessage'] = '立刻发送邮件';
+$labels['addattachment'] = '附加一个文件';
+
+$labels['attachments'] = '附件';
+$labels['upload'] = '上传';
+$labels['close'] = '关闭';
+
+$labels['low'] = '低';
+$labels['lowest'] = '最低';
+$labels['normal'] = '正常';
+$labels['high'] = '高';
+$labels['highest'] = '最高';
+
+$labels['showimages'] = '显示图片';
+
+
+// address boook
+$labels['name'] = '显示名字';
+$labels['firstname'] = '名';
+$labels['surname'] = '姓';
+$labels['email'] = '电子邮件';
+
+$labels['addcontact'] = '增加新联系人';
+$labels['editcontact'] = '编辑联系信息';
+
+$labels['edit'] = '编辑';
+$labels['cancel'] = '取消';
+$labels['save'] = '保存';
+$labels['delete'] = '删除';
+
+$labels['newcontact'] = '建立新的联系信息';
+$labels['deletecontact'] = '删除所选择的联系信息';
+$labels['composeto'] = '给所选择的联系人发送邮件';
+$labels['contactsfromto'] = 'Contacts $from to $to of $count';
+$labels['print'] = '打印';
+$labels['export'] = '导出';
+
+
+// settings
+$labels['settingsfor'] = 'Settings for';
+
+$labels['preferences'] = '参数选择';
+$labels['userpreferences'] = '用户参数';
+$labels['editpreferences'] = '编辑用户参数';
+
+$labels['identities'] = '法件人标识';
+$labels['manageidentities'] = '管理帐号资料';
+$labels['newidentity'] = '建立新标识';
+
+$labels['newitem'] = 'New item';
+$labels['edititem'] = 'Edit item';
+
+$labels['setdefault'] = '设置为默认';
+$labels['language'] = '语言';
+$labels['timezone'] = '时区';
+$labels['pagesize'] = '每页行数';
+
+
+$labels['folders'] = '文件夹';
+$labels['foldername'] = '文件夹名称';
+$labels['subscribed'] = '显示与否';
+$labels['create'] = '创建';
+$labels['createfolder'] = '建立新文件夹';
+$labels['deletefolder'] = '删除文件夹';
+$labels['managefolders'] = '管理文件夹';
+
+
+?> \ No newline at end of file
diff --git a/program/localization/cn/messages.inc b/program/localization/cn/messages.inc
new file mode 100644
index 000000000..49164d2c4
--- /dev/null
+++ b/program/localization/cn/messages.inc
@@ -0,0 +1,63 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/cn/messages.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundCube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Simplified-chinese utf-8 by winman 2005/12/6 |
+ | Author: winman rong <winman.rong@gmail.com> |
+ +-----------------------------------------------------------------------+
+
+ $Id$
+
+*/
+
+$utf8_decoding = TRUE;
+
+$messages = array();
+
+$messages['loginfailed'] = '登录失败';
+
+$messages['cookiesdisabled'] = '你的浏览器目前关闭了cookies,请打开cookies再试';
+
+$messages['sessionerror'] = '当前 session 无效或者超时 ';
+
+$messages['imaperror'] = '不能连接IMAP服务器';
+
+$messages['nomessagesfound'] = '没有邮件在这个邮箱里';
+
+$messages['loggedout'] = '成功结束当前会话. 再见!';
+
+$messages['mailboxempty'] = '邮箱现在是空的';
+
+$messages['loadingdata'] = '读取数据...';
+
+$messages['messagesent'] = '邮件发送成功';
+
+$messages['successfullysaved'] = '保存成功';
+
+$messages['addedsuccessfully'] = '联系信息已经成功增加到地址薄';
+
+$messages['contactexists'] = '这个邮件地址已经存在';
+
+$messages['blockedimages'] = '为了保障你的私隐, 阻挡了这个邮件里的图片.';
+
+$messages['encryptedmessage'] = '这是个加密的邮件因此不能显示. 抱歉!';
+
+$messages['nocontactsfound'] = '没有发现联系人';
+
+$messages['sendingfailed'] = '邮件发送失败';
+
+$messages['errorsaving'] = '当发生错误时保存信息';
+
+$messages['errormoving'] = '移动邮件出错';
+
+$messages['errordeleting'] = '删除邮件出错';
+
+
+?> \ No newline at end of file
diff --git a/program/localization/de/messages.inc b/program/localization/de/messages.inc
index 145c7b4a7..e54b8967b 100644
--- a/program/localization/de/messages.inc
+++ b/program/localization/de/messages.inc
@@ -70,4 +70,6 @@ $messages['nosubjectwarning'] = 'Die Betreffzeile ist leer. Mchten Sie jetzt e
$messages['nobodywarning'] = 'Diese Nachricht ohne Inhalt senden?';
+$messages['notsentwarning'] = 'Ihre Nachricht wurde nicht gesendet. Wollen Sie die Nachricht verwerfen?';
+
?> \ No newline at end of file
diff --git a/program/localization/en/messages.inc b/program/localization/en/messages.inc
index d0286e229..c1520ecce 100644
--- a/program/localization/en/messages.inc
+++ b/program/localization/en/messages.inc
@@ -76,5 +76,7 @@ $messages['nosubjectwarning'] = 'The "Subject" field is empty. Would you like t
$messages['nobodywarning'] = 'Send this message without text?';
+$messages['notsentwarning'] = 'Message has not been sent. Do you want to discard your message?';
+
?> \ No newline at end of file
diff --git a/program/localization/index.inc b/program/localization/index.inc
index 82424e602..eef9ca217 100644
--- a/program/localization/index.inc
+++ b/program/localization/index.inc
@@ -26,7 +26,7 @@
'ar' => 'Arabic',
'bg' => 'Bulgarian',
'tw' => 'Chinese (BIG5)',
- 'cn' => 'Chinese(GB2312)',
+ 'cn' => 'Chinese (GB2312)',
'cz' => 'Czech',
'ca' => 'Catal&agrave;',
'da' => 'Dansk',
@@ -64,6 +64,7 @@ $rcube_charsets = array(
'lv' => 'ISO-8859-2',
'pl' => 'ISO-8859-2',
'el' => 'ISO-8859-7',
+ 'tr' => 'ISO-8859-9',
'tw' => 'BIG5',
'ja' => 'UTF-8'
);
diff --git a/program/localization/tr/labels.inc b/program/localization/tr/labels.inc
new file mode 100644
index 000000000..9daa54422
--- /dev/null
+++ b/program/localization/tr/labels.inc
@@ -0,0 +1,176 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/tr/labels.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundQube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Melih Tadizen <melih@marmara.edu.tr> |
+ +-----------------------------------------------------------------------+
+
+ $Id$
+
+*/
+
+$labels = array();
+
+// login page
+$labels['username'] = 'Kullanc Ad';
+$labels['password'] = 'ifre';
+$labels['server'] = 'Sunucu';
+$labels['login'] = 'Giri';
+
+// taskbar
+$labels['logout'] = 'k';
+$labels['mail'] = 'E-Posta';
+$labels['settings'] = 'Kiisel Ayarlar';
+$labels['addressbook'] = 'Adres Defteri';
+
+// mailbox names
+$labels['inbox'] = 'Gelen Kutusu';
+$labels['sent'] = 'Gnderilenler';
+$labels['trash'] = 'p';
+$labels['drafts'] = 'Taslaklar';
+$labels['junk'] = 'Gereksiz(spam)';
+
+// message listing
+$labels['subject'] = 'Konu';
+$labels['from'] = 'Gnderen';
+$labels['to'] = 'Alc';
+$labels['cc'] = 'Kopya';
+$labels['bcc'] = 'Gizli Kopya';
+$labels['replyto'] = 'Cevapla';
+$labels['date'] = 'Tarih';
+$labels['size'] = 'Boyut';
+$labels['priority'] = 'ncelik';
+$labels['organization'] = 'Organizasyon';
+
+// aliases
+$labels['reply-to'] = $labels['replyto'];
+
+$labels['mailboxlist'] = 'Klasrler';
+$labels['messagesfromto'] = '$from\' dan/den $to\' e/a $count tane mesaj var.';
+$labels['messagenrof'] = '$nr / $count';
+
+$labels['moveto'] = 'uraya ta...';
+$labels['download'] = 'ndir';
+
+$labels['filename'] = 'Dosya Ad';
+$labels['filesize'] = 'Dosya Boyutu';
+
+$labels['preferhtml'] = 'HTML Tercih et';
+$labels['htmlmessage'] = 'HTML Mesaj';
+$labels['prettydate'] = 'Tarihleri Formatla';
+
+$labels['addtoaddressbook'] = 'Add to address book';
+
+// weekdays short
+$labels['sun'] = 'Paz';
+$labels['mon'] = 'Pts';
+$labels['tue'] = 'Sal';
+$labels['wed'] = 'ar';
+$labels['thu'] = 'Per';
+$labels['fri'] = 'Cum';
+$labels['sat'] = 'Cts';
+
+// weekdays long
+$labels['sunday'] = 'Pazar';
+$labels['monday'] = 'Pazartesi';
+$labels['tuesday'] = 'Sal';
+$labels['wednesday'] = 'aramba';
+$labels['thursday'] = 'Perembe';
+$labels['friday'] = 'Cuma';
+$labels['saturday'] = 'Cumartesi';
+
+$labels['today'] = 'Bugn';
+
+// toolbar buttons
+$labels['writenewmessage'] = 'Yeni Mesaj';
+$labels['replytomessage'] = 'Cevapla';
+$labels['forwardmessage'] = 'let';
+$labels['deletemessage'] = 'p Klasrne ta';
+$labels['printmessage'] = 'Mesaj Yazdr';
+$labels['previousmessages'] = 'Sonraki mesajlar gster';
+$labels['nextmessages'] = 'nceki mesajlar gster';
+$labels['backtolist'] = 'Mesaj Listesi';
+$labels['viewsource'] = 'Kaynak Kodu Gster';
+
+$labels['select'] = 'Se';
+$labels['all'] = 'Tm';
+$labels['none'] = 'Hibiri';
+$labels['unread'] = 'Okunmam';
+
+// message compose
+$labels['compose'] = 'Yeni Mesaj';
+$labels['sendmessage'] = 'Mesaj gnder';
+$labels['addattachment'] = 'Dosya ekle';
+
+$labels['attachments'] = 'Eklenmi Dosyalar';
+$labels['upload'] = 'Ykle';
+$labels['close'] = 'Kapat';
+
+$labels['low'] = 'Aznemsiz';
+$labels['lowest'] = 'nemli';
+$labels['normal'] = 'Normal';
+$labels['high'] = 'nemli';
+$labels['highest'] = 'ok nemli';
+
+$labels['showimages'] = 'Resimleri Gster';
+
+
+// address boook
+$labels['name'] = 'Grnen sim';
+$labels['firstname'] = 'Ad';
+$labels['surname'] = 'Soayad';
+$labels['email'] = 'E-Posta';
+
+$labels['addcontact'] = 'Yeni Kontak Ekle';
+$labels['editcontact'] = 'Kontak dzenle';
+
+$labels['edit'] = 'Dzen';
+$labels['cancel'] = 'ptal';
+$labels['save'] = 'Kaydet';
+$labels['delete'] = 'Sil';
+
+$labels['newcontact'] = 'Yeni kontak ekle';
+$labels['deletecontact'] = 'Seili kontaklar sil';
+$labels['composeto'] = 'u kiiye mesaj yaz:';
+$labels['contactsfromto'] = '$from \'den/dan $to \'e/a $count tane mesaj var';
+$labels['print'] = 'Yazdr';
+$labels['export'] = 'Farkl kaydet';
+
+
+// settings
+$labels['settingsfor'] = 'Ayarlar:';
+
+$labels['preferences'] = 'Ayarlar';
+$labels['userpreferences'] = 'Kullanc Ayarlar';
+$labels['editpreferences'] = 'Kullanc Ayarlarn Dzenle';
+
+$labels['identities'] = 'Kimlikler';
+$labels['manageidentities'] = 'Bu hesap iin kimlikleri dzenle';
+$labels['newidentity'] = 'Yeni Kimlik';
+
+$labels['newitem'] = 'Yeni e';
+$labels['edititem'] = 'eyi dzenle';
+
+$labels['setdefault'] = 'Varsaylan olarak ata';
+$labels['language'] = 'Dil';
+$labels['timezone'] = 'Zaman Dilimi';
+$labels['pagesize'] = 'Sayfada Gsterilecek Satr';
+
+
+$labels['folders'] = 'Klasrler';
+$labels['foldername'] = 'Klasr ad';
+$labels['subscribed'] = 'Kaytl';
+$labels['create'] = 'Olutur';
+$labels['createfolder'] = 'Yeni klasr olutur';
+$labels['deletefolder'] = 'Klasr sl';
+$labels['managefolders'] = 'Klasrleri dzenle';
+
+
+?> \ No newline at end of file
diff --git a/program/localization/tr/messages.inc b/program/localization/tr/messages.inc
new file mode 100644
index 000000000..a4fe9a806
--- /dev/null
+++ b/program/localization/tr/messages.inc
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/tr/messages.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundCube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Melih Tadizen <melih@marmara.edu.tr> |
+ +-----------------------------------------------------------------------+
+
+ $Id$
+
+*/
+
+$messages = array();
+
+$messages['loginfailed'] = 'Baarsz Giri';
+
+$messages['cookiesdisabled'] = 'Taraycnzn Cerez(cookie) destei ak deil';
+
+$messages['sessionerror'] = 'Oturumunuz hatal ve ya uzun sre ilem yapmadnz iin kapand';
+
+$messages['imaperror'] = 'IMAP sunucusuna balanlamad';
+
+$messages['nomessagesfound'] = 'Gelen kutusnda mesaj yok';
+
+$messages['loggedout'] = 'Oturumunuz baaryla kapatld. Gle Gle!';
+
+$messages['mailboxempty'] = 'Gelen kutusu bo';
+
+$messages['loadingdata'] = 'Veri ykleniyor...';
+
+$messages['messagesent'] = 'Mesaj gnderildi';
+
+$messages['successfullysaved'] = 'Kaydedildi';
+
+$messages['addedsuccessfully'] = 'Kontak eklendi';
+
+$messages['contactexists'] = 'Bu e-posta adresine sahip bir kontak zaten kaytl';
+
+$messages['blockedimages'] = 'Gvenliiniz iin harici resimler engellendi.';
+
+$messages['encryptedmessage'] = 'ifrelenmi bir mesaj, okuyamazsnz!';
+
+$messages['nocontactsfound'] = 'Kontak bulunamad';
+
+$messages['sendingfailed'] = 'Mesaj gnderilemedi';
+
+$messages['errorsaving'] = 'Kaydederken hata olutu';
+
+$messages['errormoving'] = 'Mesaj tanamad';
+
+$messages['errordeleting'] = 'Mesaj silinemedi';
+
+
+?> \ No newline at end of file
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 6aca28db8..80a32a9f3 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -33,7 +33,7 @@ if (!is_array($_SESSION['compose']))
// add some labels to client
-rcube_add_label('nosubject', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'sendingmessage');
+rcube_add_label('nosubject', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'sendingmessage', 'notsentwarning');
if ($_GET['_reply_uid'] || $_GET['_forward_uid'])