Changeset 1742

Show
Ignore:
Timestamp:
09/04/08 17:09:50 (3 months ago)
Author:
momo-i
Message:

Updated registration mail multi-byte and language sync.

Location:
trunk
Files:
28 modified

Legend:

Unmodified
Added
Removed
  • trunk/docs/CHANGELOG

    r1741 r1742  
    55-------------------------------------------------------------------------- 
    66  v.3.5-Alpha1 
     7        - Updated registration multi-byte mail. 
    78        - Fixed vainfo.class.php didn't catch exception for first analyze. 
    89        - Fixed iconv() returns an empty strings (Thx abs0) 
  • trunk/lib/class/registration.class.php

    r1448 r1742  
    4242        public static function send_confirmation($username,$fullname,$email,$password,$validation) {  
    4343 
    44                 $headers = "From: Ampache <" . Config::get('mail_from') . ">";  
    45                 $subject = "New User Registration at " . Config::get('site_title');  
    46                 $body = "Thank you for registering\n\n" .  
    47                         "Please keep this e-mail for your records. Your account information is as follows:\n\n" .  
    48                         "----------------------\n" .  
    49                         "Username: $username\n" .  
    50                         "Password: $password\n" .  
    51                         "----------------------\n\n" .  
    52                         "Your account is currently inactive. You cannot use it until you've visited the following link:\n\n" .  
    53                         Config::get('web_path') . "/register.php?action=validate&username=$username&auth=$validation\n\n" .  
    54                         "Thank you for registering\n";  
    55                  
    56                 // Send the mail!        
    57                 mail($email,$subject,$body,$headers);    
     44                // Multi-byte Character Mail 
     45                if(function_exists('mb_language')) { 
     46                        ini_set("mbstring.internal_encoding","UTF-8"); 
     47                        mb_language("uni"); 
     48                } 
     49 
     50                if(function_exists('mb_encode_mimeheader')) { 
     51                        $from = mb_encode_mimeheader(_("From: Ampache ")); 
     52                } else { 
     53                        $from = _("From: Ampache "); 
     54                } 
     55                $subject = sprintf(_("New User Registration at %s"), Config::get('site_title')); 
     56 
     57                $additional_header = array(); 
     58                $additional_header[] = 'X-Ampache-Mailer: 0.0.1'; 
     59                $additional_header[] = $from . "<" .Config::get('mail_from') . ">"; 
     60                if(function_exists('mb_send_mail')) { 
     61                        $additional_header[] = 'Content-Type: text/plain; charset=UTF-8'; 
     62                        $additional_header[] = 'Content-Transfer-Encoding: 8bit'; 
     63                } else { 
     64                        $additional_header[] = 'Content-Type: text/plain; charset=us-ascii'; 
     65                        $additional_header[] = 'Content-Transfer-Encoding: 7bit'; 
     66                } 
     67 
     68                $body = sprintf(_("Thank you for registering\n\n 
     69Please keep this e-mail for your records. Your account information is as follows: 
     70---------------------- 
     71Username: %s 
     72Password: %s 
     73---------------------- 
     74 
     75Your account is currently inactive. You cannot use it until you've visited the following link: 
     76 
     77%s  
     78 
     79Thank you for registering 
     80"), $username, $password, Config::get('web_path') . "/register.php?action=validate&username=$username&auth=$validation"); 
     81 
     82                if(function_exists('mb_eregi_replace')) { 
     83                        $body = mb_eregi_replace("\r\n", "\n", $body); 
     84                } 
     85                // Send the mail! 
     86                if(function_exists('mb_send_mail')) { 
     87                        mb_send_mail ($email, 
     88                                        $subject, 
     89                                        $body, 
     90                                        implode("\n", $additional_header), 
     91                                        '-f'.Config::get('mail_from')); 
     92                } else { 
     93                        mail($email,$subject,$body,implode("\r\n", $additional_header),'-f'.Config::get('mail_from')); 
     94                } 
    5895 
    5996                // Check to see if the admin should be notified 
    6097                if (Config::get('admin_notify_reg')) {  
    61                         $body = "A new user has registered\n\n" .  
    62                                 "The following values were entered.\n\n" .  
    63                                 "Username:$username\nFullname:$fullname\nE-mail:$email\n\n";  
    64                         mail(Config::get('mail_from'),$subject,$body,$headers);  
     98                        $body = sprintf(_("A new user has registered 
     99The following values were entered. 
     100 
     101Username: %s 
     102Fullname: %s 
     103E-mail: %s 
     104 
     105"), $username, $fullname, $email); 
     106 
     107                        if(function_exists('mb_send_mail')) { 
     108                                mb_send_mail (Config::get('mail_from'), 
     109                                                $subject, 
     110                                                $body, 
     111                                                implode("\n", $additional_header), 
     112                                                '-f'.Config::get('mail_from')); 
     113                        } else { 
     114                                mail(Config::get('mail_from'),$subject,$body,implode("\r\n", $additional_header),'-f'.Config::get('mail_from'));  
     115                        } 
    65116                }  
    66117                                 
  • trunk/locale/base/LANGLIST

    r1735 r1742  
    11Localization Status Report for Ampache. 
    2 Generated: 09/02/2008 23:14:22 GMT 
     2Generated: 09/05/2008 23:14:22 GMT 
    33 
    44LANG    Trans   Fuzzy   Untrans Obsolete 
    5 ca_ES   497     64      211     325 
    6 de_DE   646     64      62      46 
    7 el_GR   636     63      73      86 
    8 en_GB   250     202     320     424 
    9 es_ES   182     151     439     308 
    10 fr_FR   672     68      32      304 
    11 it_IT   288     180     304     377 
    12 ja_JP   751     3       18      0 
    13 nl_NL   343     173     256     441 
    14 ru_RU   638     64      70      170 
    15 tr_TR   4       65      703     109 
    16 zh_CN   1       0       771     0 
     5ca_ES   497     66      213     325 
     6de_DE   646     66      64      50 
     7el_GR   636     65      75      88 
     8en_GB   250     204     322     422 
     9es_ES   182     153     441     308 
     10fr_FR   672     70      34      358 
     11it_IT   288     182     306     375 
     12ja_JP   776     0       0       0 
     13nl_NL   343     175     258     439 
     14ru_RU   638     66      72      172 
     15tr_TR   4       65      707     111 
     16zh_CN   1       0       775     0 
    1717 
  • trunk/locale/base/messages.pot

    r1735 r1742  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: translations at ampache.org\n" 
    11 "POT-Creation-Date: 2008-09-03 08:19+0900\n" 
     11"POT-Creation-Date: 2008-09-05 08:59+0900\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    15541554#: ../../templates/show_local_catalog_info.inc.php:30 
    15551555#: ../../templates/show_genre.inc.php:35 ../../lib/ui.lib.php:412 
    1556 #: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:250 
     1556#: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:256 
    15571557msgid "Artists" 
    15581558msgstr "" 
     
    17401740msgstr "" 
    17411741 
    1742 #: ../../templates/show_random_albums.inc.php:47 
     1742#: ../../templates/show_random_albums.inc.php:48 
    17431743msgid "Play Album" 
    17441744msgstr "" 
     
    25262526msgstr "" 
    25272527 
    2528 #: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:238 
     2528#: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:244 
    25292529msgid "Disk" 
    25302530msgstr "" 
     
    25952595 
    25962596#: ../../templates/show_edit_album_row.inc.php:35 
    2597 #: ../../lib/class/album.class.php:250 ../../lib/class/album.class.php:251 
     2597#: ../../lib/class/album.class.php:256 ../../lib/class/album.class.php:257 
    25982598msgid "Various" 
    25992599msgstr "" 
     
    30993099msgstr "" 
    31003100 
    3101 #: ../../lib/class/album.class.php:466 ../../lib/class/catalog.class.php:415 
     3101#: ../../lib/class/album.class.php:472 ../../lib/class/catalog.class.php:415 
    31023102#: ../../lib/class/catalog.class.php:756 
    31033103msgid "Error: Unable to open" 
     
    32453245msgstr "" 
    32463246 
     3247#: ../../lib/class/registration.class.php:51 
     3248#: ../../lib/class/registration.class.php:53 
     3249msgid "From: Ampache " 
     3250msgstr "" 
     3251 
     3252#: ../../lib/class/registration.class.php:55 
     3253#, php-format 
     3254msgid "New User Registration at %s" 
     3255msgstr "" 
     3256 
     3257#: ../../lib/class/registration.class.php:68 
     3258#, php-format 
     3259msgid "" 
     3260"Thank you for registering\n" 
     3261"\n" 
     3262"\n" 
     3263"Please keep this e-mail for your records. Your account information is as " 
     3264"follows:\n" 
     3265"----------------------\n" 
     3266"Username: %s\n" 
     3267"Password: %s\n" 
     3268"----------------------\n" 
     3269"\n" 
     3270"Your account is currently inactive. You cannot use it until you've visited " 
     3271"the following link:\n" 
     3272"\n" 
     3273"%s \n" 
     3274"\n" 
     3275"Thank you for registering\n" 
     3276msgstr "" 
     3277 
     3278#: ../../lib/class/registration.class.php:98 
     3279#, php-format 
     3280msgid "" 
     3281"A new user has registered\n" 
     3282"The following values were entered.\n" 
     3283"\n" 
     3284"Username: %s\n" 
     3285"Fullname: %s\n" 
     3286"E-mail: %s\n" 
     3287"\n" 
     3288msgstr "" 
     3289 
    32473290#: ../../lib/general.lib.php:498 
    32483291msgid "On" 
     
    36763719msgstr "" 
    36773720 
    3678 #: ../../bin/print_tags.inc:66 
     3721#: ../../bin/print_tags.inc:68 
    36793722msgid "" 
    36803723"[print_tags.php.inc]\n" 
     
    36853728msgstr "" 
    36863729 
    3687 #: ../../bin/print_tags.inc:72 
     3730#: ../../bin/print_tags.inc:74 
    36883731msgid "Filename:" 
    36893732msgstr "" 
  • trunk/locale/ca_ES/LC_MESSAGES/messages.po

    r1735 r1742  
    1818"Project-Id-Version: Ampache 3.5.0\n" 
    1919"Report-Msgid-Bugs-To: translations at ampache.org\n" 
    20 "POT-Creation-Date: 2008-09-03 08:08+0900\n" 
     20"POT-Creation-Date: 2008-09-05 08:49+0900\n" 
    2121"PO-Revision-Date: 2008-01-04 16:41+0100\n" 
    2222"Last-Translator: Guillem Lluch Moll <glluch@ya.com>\n" 
     
    15961596#: ../../templates/show_local_catalog_info.inc.php:30 
    15971597#: ../../templates/show_genre.inc.php:35 ../../lib/ui.lib.php:412 
    1598 #: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:250 
     1598#: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:256 
    15991599msgid "Artists" 
    16001600msgstr "Artistes" 
     
    17911791msgstr "" 
    17921792 
    1793 #: ../../templates/show_random_albums.inc.php:47 
     1793#: ../../templates/show_random_albums.inc.php:48 
    17941794msgid "Play Album" 
    17951795msgstr "Reproduir l'àlbum" 
     
    25902590msgstr "" 
    25912591 
    2592 #: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:238 
     2592#: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:244 
    25932593msgid "Disk" 
    25942594msgstr "" 
     
    26592659 
    26602660#: ../../templates/show_edit_album_row.inc.php:35 
    2661 #: ../../lib/class/album.class.php:250 ../../lib/class/album.class.php:251 
     2661#: ../../lib/class/album.class.php:256 ../../lib/class/album.class.php:257 
    26622662msgid "Various" 
    26632663msgstr "Varis" 
     
    31693169msgstr "Errada no hi poden faltar les contrasenyes" 
    31703170 
    3171 #: ../../lib/class/album.class.php:466 ../../lib/class/catalog.class.php:415 
     3171#: ../../lib/class/album.class.php:472 ../../lib/class/catalog.class.php:415 
    31723172#: ../../lib/class/catalog.class.php:756 
    31733173msgid "Error: Unable to open" 
     
    33193319msgstr "" 
    33203320 
     3321#: ../../lib/class/registration.class.php:51 
     3322#: ../../lib/class/registration.class.php:53 
     3323#, fuzzy 
     3324msgid "From: Ampache " 
     3325msgstr "Cerca Ampache" 
     3326 
     3327#: ../../lib/class/registration.class.php:55 
     3328#, fuzzy, php-format 
     3329msgid "New User Registration at %s" 
     3330msgstr "Registre d'un nou usuari a l'Ampache" 
     3331 
     3332#: ../../lib/class/registration.class.php:68 
     3333#, php-format 
     3334msgid "" 
     3335"Thank you for registering\n" 
     3336"\n" 
     3337"\n" 
     3338"Please keep this e-mail for your records. Your account information is as " 
     3339"follows:\n" 
     3340"----------------------\n" 
     3341"Username: %s\n" 
     3342"Password: %s\n" 
     3343"----------------------\n" 
     3344"\n" 
     3345"Your account is currently inactive. You cannot use it until you've visited " 
     3346"the following link:\n" 
     3347"\n" 
     3348"%s \n" 
     3349"\n" 
     3350"Thank you for registering\n" 
     3351msgstr "" 
     3352 
     3353#: ../../lib/class/registration.class.php:98 
     3354#, php-format 
     3355msgid "" 
     3356"A new user has registered\n" 
     3357"The following values were entered.\n" 
     3358"\n" 
     3359"Username: %s\n" 
     3360"Fullname: %s\n" 
     3361"E-mail: %s\n" 
     3362"\n" 
     3363msgstr "" 
     3364 
    33213365#: ../../lib/general.lib.php:498 
    33223366msgid "On" 
     
    37613805msgstr "Finalitzat la cerca de portades" 
    37623806 
    3763 #: ../../bin/print_tags.inc:66 
     3807#: ../../bin/print_tags.inc:68 
    37643808msgid "" 
    37653809"[print_tags.php.inc]\n" 
     
    37753819"            \n" 
    37763820 
    3777 #: ../../bin/print_tags.inc:72 
     3821#: ../../bin/print_tags.inc:74 
    37783822msgid "Filename:" 
    37793823msgstr "Nom de l'arxiu:" 
     
    39023946msgid "System" 
    39033947msgstr "Ítem" 
     3948 
     3949#, fuzzy 
     3950#~ msgid "Catalog Debug Tools" 
     3951#~ msgstr "Catàleg borrat" 
    39043952 
    39053953#, fuzzy 
     
    41774225#~ msgid "Results Per Page" 
    41784226#~ msgstr "Resultats per pàgina" 
    4179  
    4180 #~ msgid "Ampache New User Registration" 
    4181 #~ msgstr "Registre d'un nou usuari a l'Ampache" 
    41824227 
    41834228#~ msgid "Clear Info" 
  • trunk/locale/de_DE/LC_MESSAGES/messages.po

    r1735 r1742  
    1111"Project-Id-Version: messages\n" 
    1212"Report-Msgid-Bugs-To: translations at ampache.org\n" 
    13 "POT-Creation-Date: 2008-09-03 08:08+0900\n" 
     13"POT-Creation-Date: 2008-09-05 08:49+0900\n" 
    1414"PO-Revision-Date: 2008-08-24 09:26+0200\n" 
    1515"Last-Translator: Nikolai Försterling <devel@fosternet.de>\n" 
     
    16021602#: ../../templates/show_local_catalog_info.inc.php:30 
    16031603#: ../../templates/show_genre.inc.php:35 ../../lib/ui.lib.php:412 
    1604 #: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:250 
     1604#: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:256 
    16051605msgid "Artists" 
    16061606msgstr "Interpreten" 
     
    17971797msgstr "Aktualisieren" 
    17981798 
    1799 #: ../../templates/show_random_albums.inc.php:47 
     1799#: ../../templates/show_random_albums.inc.php:48 
    18001800msgid "Play Album" 
    18011801msgstr "Album abspielen" 
     
    25972597msgstr "" 
    25982598 
    2599 #: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:238 
     2599#: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:244 
    26002600msgid "Disk" 
    26012601msgstr "" 
     
    26662666 
    26672667#: ../../templates/show_edit_album_row.inc.php:35 
    2668 #: ../../lib/class/album.class.php:250 ../../lib/class/album.class.php:251 
     2668#: ../../lib/class/album.class.php:256 ../../lib/class/album.class.php:257 
    26692669msgid "Various" 
    26702670msgstr "Verschiedene" 
     
    31793179msgstr "Fehler: Falsches Passwort" 
    31803180 
    3181 #: ../../lib/class/album.class.php:466 ../../lib/class/catalog.class.php:415 
     3181#: ../../lib/class/album.class.php:472 ../../lib/class/catalog.class.php:415 
    31823182#: ../../lib/class/catalog.class.php:756 
    31833183msgid "Error: Unable to open" 
     
    33283328msgstr "" 
    33293329 
     3330#: ../../lib/class/registration.class.php:51 
     3331#: ../../lib/class/registration.class.php:53 
     3332#, fuzzy 
     3333msgid "From: Ampache " 
     3334msgstr "In Ampache suchen" 
     3335 
     3336#: ../../lib/class/registration.class.php:55 
     3337#, fuzzy, php-format 
     3338msgid "New User Registration at %s" 
     3339msgstr "Registrierungsdatum " 
     3340 
     3341#: ../../lib/class/registration.class.php:68 
     3342#, php-format 
     3343msgid "" 
     3344"Thank you for registering\n" 
     3345"\n" 
     3346"\n" 
     3347"Please keep this e-mail for your records. Your account information is as " 
     3348"follows:\n" 
     3349"----------------------\n" 
     3350"Username: %s\n" 
     3351"Password: %s\n" 
     3352"----------------------\n" 
     3353"\n" 
     3354"Your account is currently inactive. You cannot use it until you've visited " 
     3355"the following link:\n" 
     3356"\n" 
     3357"%s \n" 
     3358"\n" 
     3359"Thank you for registering\n" 
     3360msgstr "" 
     3361 
     3362#: ../../lib/class/registration.class.php:98 
     3363#, php-format 
     3364msgid "" 
     3365"A new user has registered\n" 
     3366"The following values were entered.\n" 
     3367"\n" 
     3368"Username: %s\n" 
     3369"Fullname: %s\n" 
     3370"E-mail: %s\n" 
     3371"\n" 
     3372msgstr "" 
     3373 
    33303374#: ../../lib/general.lib.php:498 
    33313375msgid "On" 
     
    37773821msgstr "Album Cover-Suche beendet" 
    37783822 
    3779 #: ../../bin/print_tags.inc:66 
     3823#: ../../bin/print_tags.inc:68 
    37803824msgid "" 
    37813825"[print_tags.php.inc]\n" 
     
    37913835"        \n" 
    37923836 
    3793 #: ../../bin/print_tags.inc:72 
     3837#: ../../bin/print_tags.inc:74 
    37943838msgid "Filename:" 
    37953839msgstr "Dateiname:" 
     
    39203964 
    39213965#, fuzzy 
     3966#~ msgid "Catalog Debug Tools" 
     3967#~ msgstr "Debug Werkzeuge" 
     3968 
     3969#, fuzzy 
     3970#~ msgid "Debug" 
     3971#~ msgstr "Debug Werkzeuge" 
     3972 
     3973#, fuzzy 
    39223974#~ msgid "GetText Support" 
    39233975#~ msgstr "Gettext Unterstützung" 
  • trunk/locale/el_GR/LC_MESSAGES/messages.po

    r1735 r1742  
    88"Project-Id-Version: Ampache 3.5.0\n" 
    99"Report-Msgid-Bugs-To: translations at ampache.org\n" 
    10 "POT-Creation-Date: 2008-09-03 08:08+0900\n" 
     10"POT-Creation-Date: 2008-09-05 08:49+0900\n" 
    1111"PO-Revision-Date: 2008-08-25 08:43+0900\n" 
    1212"Last-Translator: Ampache <translations at ampache.org>\n" 
     
    15791579#: ../../templates/show_local_catalog_info.inc.php:30 
    15801580#: ../../templates/show_genre.inc.php:35 ../../lib/ui.lib.php:412 
    1581 #: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:250 
     1581#: ../../lib/class/browse.class.php:989 ../../lib/class/album.class.php:256 
    15821582msgid "Artists" 
    15831583msgstr "Καλλιτέχνες" 
     
    17741774msgstr "" 
    17751775 
    1776 #: ../../templates/show_random_albums.inc.php:47 
     1776#: ../../templates/show_random_albums.inc.php:48 
    17771777msgid "Play Album" 
    17781778msgstr "Αναπαραγωγή άλμπουμ" 
     
    25732573msgstr "" 
    25742574 
    2575 #: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:238 
     2575#: ../../templates/show_album.inc.php:27 ../../lib/class/album.class.php:244 
    25762576msgid "Disk" 
    25772577msgstr "Δίσκος" 
     
    26422642 
    26432643#: ../../templates/show_edit_album_row.inc.php:35 
    2644 #: ../../lib/class/album.class.php:250 ../../lib/class/album.class.php:251 
     2644#: ../../lib/class/album.class.php:256 ../../lib/class/album.class.php:257 
    26452645msgid "Various" 
    26462646msgstr "Ποικίλα" 
     
    31513151msgstr "Σφάλμα: Οι κωδικοί δεν ταιριάζουν" 
    31523152 
    3153 #: ../../lib/class/album.class.php:466 ../../lib/class/catalog.class.php:415 
     3153#: ../../lib/class/album.class.php:472 ../../lib/class/catalog.class.php:415 
    31543154#: ../../lib/class/catalog.class.php:756 
    31553155msgid "Error: Unable to open" 
     
    33013301msgstr "" 
    33023302 
     3303#: ../../lib/class/registration.class.php:51 
     3304#: ../../lib/class/registration.class.php:53 
     3305#, fuzzy 
     3306msgid "From: Ampache " 
     3307msgstr "Αναζήτηση στον Ampache" 
     3308 
     3309#: ../../lib/class/registration.class.php:55 
     3310#, fuzzy, php-format 
     3311msgid "New User Registration at %s" 
     3312msgstr "Ημερομηνία Εγγραφής" 
     3313 
     3314#: ../../lib/class/registration.class.php:68 
     3315#, php-format 
     3316msgid "" 
     3317"Thank you for registering\n" 
     3318"\n" 
     3319"\n" 
     3320"Please keep this e-mail for your records. Your account information is as " 
     3321"follows:\n" 
     3322"----------------------\n" 
     3323"Username: %s\n" 
     3324"Password: %s\n" 
     3325"----------------------\n" 
     3326"\n" 
     3327"Your account is currently inactive. You cannot use it until you've visited " 
     3328"the following link:\n" 
     3329"\n" 
     3330"%s \n" 
     3331"\n" 
     3332"Thank you for registering\n" 
     3333msgstr "" 
     3334 
     3335#: ../../lib/class/registration.class.php:98 
     3336#, php-format 
     3337msgid "" 
     3338"A new user has registered\n" 
     3339"The following values were entered.\n" 
     3340"\n" 
     3341"Username: %s\n" 
     3342"Fullname: %s\n" 
     3343"E-mail: %s\n" 
     3344"\n" 
     3345msgstr "" 
     3346 
    33033347#: ../../lib/general.lib.php:498 
    33043348msgid "On" 
     
    37423786msgstr "Ολοκληρώθηκε η αναζήτηση εξωφύλλων" 
    37433787 
    3744 #: ../../bin/print_tags.inc:66 
     3788#: ../../bin/print_tags.inc:68 
    37453789msgid "" 
    37463790"[print_tags.php.inc]\n"