Hi.
I've patched a little RoundCube, so it has Polish language. Also I've
added new setting to select default language. Attached patch contains
also bugfix for strange chars at begining of some files and trailing
newlines. Could it be included in next release?
Any comments on patch content are welcome.
--
Krzysiek 'Nelchael' Pawlik RLU #322999 GPG:0xBC555551
gentoo - kernel 2.6.xx + CK patchset
http://fatcat.ftj.agh.edu.pl/~nelchael/
diff -Nru roundcubemail-0.1-20051021/.htaccess webmail/.htaccess
--- roundcubemail-0.1-20051021/.htaccess 2005-10-21 14:36:50.000000000 +0200
+++ webmail/.htaccess 2005-11-18 20:23:58.000000000 +0100
@@ -1,4 +1,4 @@
-php_flag display_errors On
+php_flag display_errors Off
php_value session.gc_maxlifetime 21600
php_value session.gc_divisor 500
php_value upload_max_filesize 2m
diff -Nru roundcubemail-0.1-20051021/config/main.inc.php webmail/config/main.inc.php
--- roundcubemail-0.1-20051021/config/main.inc.php 2005-10-21 00:20:07.000000000 +0200
+++ webmail/config/main.inc.php 2005-11-18 20:36:59.000000000 +0100
@@ -100,6 +100,8 @@
// display these folders separately in the mailbox list
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
+// Language used by default:
+$rcmail_config['default_language'] = 'en';
/***** these settings can be overwritten by user's preferences ****
*/
diff -Nru roundcubemail-0.1-20051021/program/include/rcube_shared.inc webmail/program/include/rcube_shared.inc
--- roundcubemail-0.1-20051021/program/include/rcube_shared.inc 2005-10-22 15:42:31.000000000 +0200
+++ webmail/program/include/rcube_shared.inc 2005-11-18 20:45:53.000000000 +0100
@@ -1027,6 +1027,8 @@
return $bw;
}
+// Needed for $rcmail_config['default_language']
+include 'config/main.inc.php';
// get text in the desired language from the language file
function rcube_label($attrib)
@@ -1050,9 +1052,8 @@
{
$sa_text_data = array();
- // get english labels (these should be complete)
- @include($INSTALL_PATH.'program/localization/en/labels.inc');
- @include($INSTALL_PATH.'program/localization/en/messages.inc');
+ @include($INSTALL_PATH.'program/localization/'.$rcmail_config['default_language'].'/labels.inc');
+ @include($INSTALL_PATH.'program/localization/'.$rcmail_config['default_language'].'/messages.inc');
if (is_array($labels))
$sa_text_data = $labels;
@@ -1195,7 +1196,7 @@
{
if (!$html_encode_arr)
{
- $html_encode_arr = get_html_translation_table(HTML_ENTITIES);
+ $html_encode_arr = get_html_translation_table();
$html_encode_arr[chr(128)] = '€';
unset($html_encode_arr['?']);
unset($html_encode_arr['&']);
@@ -1442,4 +1443,4 @@
-?>
\ No newline at end of file
+?>
diff -Nru roundcubemail-0.1-20051021/program/js/app.js webmail/program/js/app.js
--- roundcubemail-0.1-20051021/program/js/app.js 2005-10-21 14:12:23.000000000 +0200
+++ webmail/program/js/app.js 2005-11-18 20:09:23.000000000 +0100
@@ -1,4 +1,4 @@
-/*
+/*
+-----------------------------------------------------------------------+
| RoundCube Webmail Client Script |
| |
diff -Nru roundcubemail-0.1-20051021/program/lib/imap.inc webmail/program/lib/imap.inc
--- roundcubemail-0.1-20051021/program/lib/imap.inc 2005-10-21 14:12:23.000000000 +0200
+++ webmail/program/lib/imap.inc 2005-11-18 20:09:27.000000000 +0100
@@ -2042,4 +2042,4 @@
return (iil_C_Expunge($conn, $folder) >= 0);
}
-?>
\ No newline at end of file
+?>
diff -Nru roundcubemail-0.1-20051021/program/localization/index.inc webmail/program/localization/index.inc
--- roundcubemail-0.1-20051021/program/localization/index.inc 2005-10-21 14:12:23.000000000 +0200
+++ webmail/program/localization/index.inc 2005-11-18 20:15:57.000000000 +0100
@@ -1,4 +1,4 @@
-<?php
+<?php
/*
+-----------------------------------------------------------------------+
@@ -55,4 +55,4 @@
'vn' => 'Vietnamese'
);
-?>
\ No newline at end of file
+?>
diff -Nru roundcubemail-0.1-20051021/program/localization/pl/labels.inc webmail/program/localization/pl/labels.inc
--- roundcubemail-0.1-20051021/program/localization/pl/labels.inc 1970-01-01 01:00:00.000000000 +0100
+++ webmail/program/localization/pl/labels.inc 2005-11-18 20:38:51.000000000 +0100
@@ -0,0 +1,176 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/pl/labels.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundQube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Krzysiek Pawlik <kpawlik@silvermedia.pl> |
+ +-----------------------------------------------------------------------+
+
+ $Id: labels.inc,v 1.5 2005/10/21 12:12:23 roundcube Exp $
+
+*/
+
+$labels = array();
+
+// login page
+$labels['username'] = 'U¿ytkownik';
+$labels['password'] = 'Has³o';
+$labels['server'] = 'Serwer';
+$labels['login'] = 'Zaloguj';
+
+// taskbar
+$labels['logout'] = 'Wyloguj';
+$labels['mail'] = 'E-Mail';
+$labels['settings'] = 'Ustawienia';
+$labels['addressbook'] = 'Ksi±¿ka adresowa';
+
+// mailbox names
+$labels['inbox'] = 'Odebrane';
+$labels['sent'] = 'Wys³ane';
+$labels['trash'] = 'Kosz';
+$labels['drafts'] = 'Szkice';
+$labels['junk'] = 'Spam';
+
+// message listing
+$labels['subject'] = 'Temat';
+$labels['from'] = 'Nadawca';
+$labels['to'] = 'Odbiorca';
+$labels['cc'] = 'CC';
+$labels['bcc'] = 'BCC';
+$labels['replyto'] = 'Odpowiedz do';
+$labels['date'] = 'Data';
+$labels['size'] = 'Rozmiar';
+$labels['priority'] = 'Priorytet';
+$labels['organization'] = 'Organizacja';
+
+// aliases
+$labels['reply-to'] = $labels['replyto'];
+
+$labels['mailboxlist'] = 'Katalogi';
+$labels['messagesfromto'] = 'Wiadomosci od $from do $to z $count';
+$labels['messagenrof'] = 'Wiadomo¶æ $nr z $count';
+
+$labels['moveto'] = 'przenie¶ do...';
+$labels['download'] = 'pobierz';
+
+$labels['filename'] = 'Nazwa pliku';
+$labels['filesize'] = 'Rozmiar pliku';
+
+$labels['preferhtml'] = 'Wy¶wietlaj HTML';
+$labels['htmlmessage'] = 'Wiadomo¶æ w HTML';
+$labels['prettydate'] = '£adniejsze daty';
+
+$labels['addtoaddressbook'] = 'Dodaj do ksi±¿ki adresowej';
+
+// weekdays short
+$labels['sun'] = 'Nd';
+$labels['mon'] = 'Pon';
+$labels['tue'] = 'Wt';
+$labels['wed'] = 'Šr';
+$labels['thu'] = 'Czw';
+$labels['fri'] = 'Pt';
+$labels['sat'] = 'Sob';
+
+// weekdays long
+$labels['sunday'] = 'Niedziela';
+$labels['monday'] = 'Poniedzia³ek';
+$labels['tuesday'] = 'Wtorek';
+$labels['wednesday'] = 'Šroda';
+$labels['thursday'] = 'Czwartek';
+$labels['friday'] = 'Pi±tek';
+$labels['saturday'] = 'Sobota';
+
+$labels['today'] = 'Dzisiaj';
+
+// toolbar buttons
+$labels['writenewmessage'] = 'Utwórz now± wiadomo¶æ';
+$labels['replytomessage'] = 'Odpowiedz na wiadomo¶æ';
+$labels['forwardmessage'] = 'Przeka¿ dalej wiadomo¶æ';
+$labels['deletemessage'] = 'Przenie¶ wiadomo¶æ do kosza';
+$labels['printmessage'] = 'Drukuj wiadomo¶æ';
+$labels['previousmessages'] = 'Poka¿ poprzednie wiadomo¶ci';
+$labels['nextmessages'] = 'Poka¿ nastêpne wiadomo¶ci';
+$labels['backtolist'] = 'Lista wiadomo¶ci';
+$labels['viewsource'] = 'Poka¿ Œród³o';
+
+$labels['select'] = 'Wybierz';
+$labels['all'] = 'Wszystkie';
+$labels['none'] = 'Nic';
+$labels['unread'] = 'Nieprzeczytane';
+
+// message compose
+$labels['compose'] = 'Utwórz wiadomo¶æ';
+$labels['sendmessage'] = 'Wy¶lij wiadomo¶æ teraz';
+$labels['addattachment'] = 'Do³±cz plik';
+
+$labels['attachments'] = 'Za³±czniki';
+$labels['upload'] = 'Prze¶lij';
+$labels['close'] = 'Zamknij';
+
+$labels['low'] = 'Niski';
+$labels['lowest'] = 'Najni¿szy';
+$labels['normal'] = 'Normalny';
+$labels['high'] = 'Wysoki';
+$labels['highest'] = 'Najwy¿szy';
+
+$labels['showimages'] = 'Poka¿ grafikê';
+
+
+// address boook
+$labels['name'] = 'Nazwa';
+$labels['firstname'] = 'Imiê';
+$labels['surname'] = 'Nazwisko';
+$labels['email'] = 'E-Mail';
+
+$labels['addcontact'] = 'Dodaj nowy kontakt';
+$labels['editcontact'] = 'Edytuj kontakt';
+
+$labels['edit'] = 'Edytuj';
+$labels['cancel'] = 'Anuluj';
+$labels['save'] = 'Zapisz';
+$labels['delete'] = 'Usuñ';
+
+$labels['newcontact'] = 'Utwórz nowy kontakt';
+$labels['deletecontact'] = 'Usuñ zaznaczone kontakty';
+$labels['composeto'] = 'Utwórz wiadomo¶æ do';
+$labels['contactsfromto'] = 'Kontakty od $from do $to z $count';
+$labels['print'] = 'Drukuj';
+$labels['export'] = 'Eksport';
+
+
+// settings
+$labels['settingsfor'] = 'Ustawienia dla';
+
+$labels['preferences'] = 'Ustawienia';
+$labels['userpreferences'] = 'Ustawienia u¿ytkownika';
+$labels['editpreferences'] = 'Edytuj uustawienia u¿ytkownika';
+
+$labels['identities'] = 'To¿samo¶ci';
+$labels['manageidentities'] = 'Zarz±dzaj to¿samo¶ciami dla tego konta';
+$labels['newidentity'] = 'Nowa to¿samo¶æ';
+
+$labels['newitem'] = 'Nowa';
+$labels['edititem'] = 'Edytuj';
+
+$labels['setdefault'] = 'Ustaw jako domy¶ln±';
+$labels['language'] = 'Jêzyk';
+$labels['timezone'] = 'Strefa czasowa';
+$labels['pagesize'] = 'Ilo¶æ wierszy na stronie';
+
+
+$labels['folders'] = 'Katalogi';
+$labels['foldername'] = 'Nazwa katalogu';
+$labels['subscribed'] = 'Zapisz';
+$labels['create'] = 'Utwórz';
+$labels['createfolder'] = 'Utwórz nowy katalog';
+$labels['deletefolder'] = 'Usuñ katalog';
+$labels['managefolders'] = 'Zarz±dzaj katalogami';
+
+
+?>
diff -Nru roundcubemail-0.1-20051021/program/localization/pl/messages.inc webmail/program/localization/pl/messages.inc
--- roundcubemail-0.1-20051021/program/localization/pl/messages.inc 1970-01-01 01:00:00.000000000 +0100
+++ webmail/program/localization/pl/messages.inc 2005-11-18 20:38:23.000000000 +0100
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | language/pl/messages.inc |
+ | |
+ | Language file of the RoundCube Webmail client |
+ | Copyright (C) 2005, RoundCube Dev. - Switzerland |
+ | Licensed under the GNU GPL |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Krzysiek Pawlik <kpawlik@silvermedia.pl> |
+ +-----------------------------------------------------------------------+
+
+ $Id: messages.inc,v 1.3 2005/10/13 21:53:33 roundcube Exp $
+
+*/
+
+$messages = array();
+
+$messages['loginfailed'] = 'B³±d logowania';
+
+$messages['cookiesdisabled'] = 'Twoja przegl±darka nie akceptuje ciasteczek';
+
+$messages['sessionerror'] = 'Twoja sesja jest b³êdna lub wygas³a';
+
+$messages['imaperror'] = 'Nie mo¿na siê po³±czyæ z serwerem IMAP';
+
+$messages['nomessagesfound'] = 'Brak wiadomo¶ci.';
+
+$messages['loggedout'] = 'Sesja zakoñczona.';
+
+$messages['mailboxempty'] = 'Skrzynka jest pusta!';
+
+$messages['loadingdata'] = 'Wczytywanie...';
+
+$messages['messagesent'] = 'Wiadomo¶æ wys³ana';
+
+$messages['successfullysaved'] = 'Zapisane';
+
+$messages['addedsuccessfully'] = 'Kontak dodany do ksi±¿ki adresowej';
+
+$messages['contactexists'] = 'Kontakt o podanym adresie ju¿ istnieje';
+
+$messages['blockedimages'] = 'Aby chroniæ twoj± prywatno¶æ grafika zosta³a zablokowana w tej wiadomo¶ci.';
+
+$messages['encryptedmessage'] = 'To jest zaszyfrowana wiadomo¶æ i nie mo¿e byæ wy¶wietlona.';
+
+$messages['nocontactsfound'] = 'Brak kontaktów';
+
+$messages['sendingfailed'] = 'B³±d wysy³ania wiadomo¶ci';
+
+$messages['errorsaving'] = 'Wyst±pi³ b³±d podczas zapisu';
+
+$messages['errormoving'] = 'Nie mo¿na przenie¶æ wiadomo¶ci';
+
+$messages['errordeleting'] = 'Nie mo¿na usun±æ wiadomo¶ci';
+
+
+?>