Changeset 5966

Show
Ignore:
Timestamp:
05/17/08 22:57:47 (6 months ago)
Author:
coolengineer
Message:
  • #960
  • 메시지 한글화
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/CL_Moblog/index.php

    r5964 r5966  
    6464    { 
    6565        if( !$this->pop3->connect( $this->host, $this->port, $this->ssl ) ) { 
    66             $this->log( "* Connection failure : ".$this->host.":".$this->port.($this->ssl?"(SSL)":"(no SSL)") ); 
    67             return false; 
    68         } 
    69         $this->log( "* Connection success : ".$this->host.":".$this->port.($this->ssl?"(SSL)":"(no SSL)") ); 
     66            $this->log( "* "._t("접속 실패")." : ".$this->host.":".$this->port.($this->ssl?"(SSL)":"(no SSL)") ); 
     67            return false; 
     68        } 
     69        $this->log( "* "._t("접속 성공")." : ".$this->host.":".$this->port.($this->ssl?"(SSL)":"(no SSL)") ); 
    7070        if( !$this->pop3->authorize( $this->username, $this->password ) ) { 
    71             $this->log( "* Authentication failure" ); 
    72             return false; 
    73         } 
    74         $this->log( "* Authentication success" ); 
     71            $this->log( "* "._t("인증 실패") ); 
     72            return false; 
     73        } 
     74        $this->log( "* "._t("인증 성공") ); 
    7575 
    7676        $this->pop3->run(); 
     
    9393        $ret = !!strstr( $this->stored_uidl, "[$uid]" ); 
    9494        if( $ret ) { 
    95             $this->log( "Msg $number: Filterred by uid: $uid" ); 
     95            $this->log( "Msg $number: "._t("이미 확인한 메일")." : $uid" ); 
    9696        } 
    9797        return $ret; 
     
    103103            return true; 
    104104        } 
    105         $this->log( "Msg $number: Filterred by size: $size" ); 
     105        $this->log( "Msg $number: "._t("메일크기가 작음")." : $size" ); 
    106106        return $size < $this->minsize; 
    107107    } 
     
    119119    } 
    120120 
    121     function _getDecoratedContent( & $mail ) { 
     121    function _getDecoratedContent( & $mail, $docid ) { 
    122122            $alt = htmlentities($mail['attachments'][0]['filename'],ENT_QUOTES,'utf-8'); 
    123123            $content = '<p>$TEXT</p><p>[##_1C|$FILENAME|width="$WIDTH" height="$HEIGHT" alt="'.$alt.'"|_##]</p>'; 
    124             $text = "<h3>".$mail['subject']."</h3>\r\n".(isset($mail['text'])?$mail['text']:''); 
     124            $text = "<h3 id=\"$docid\">".$mail['subject']."</h3>\r\n".(isset($mail['text'])?$mail['text']:''); 
    125125            return str_replace( '$TEXT', $text , $content ); 
    126126    } 
     
    128128    function statCallback( $total, $totalsize ) 
    129129    { 
    130         $this->log( "* Total $total messages" ); 
     130        $this->log( "* ".sprintf( _t("총 %d개의 메시지"),$total) ); 
    131131        $lastStat = getBlogSetting( 'MmsPop3stat', '' ); 
    132132        $stat = "$total $totalsize"; 
    133133        if( $stat == $lastStat ) { 
    134             $this->log( "* No new message arrived" ); 
     134            $this->log( "* "._t("새로운 메시지가 없습니다") ); 
    135135            return false; 
    136136        } 
     
    142142    { 
    143143        $slogan = date( "Y-m-d" ); 
     144        $docid = date( "H:i:s" ); 
    144145        $this->appendUid( $uid ); 
    145146        $mail = $this->pop3->parse( $lines ); 
    146147        if( in_array( $mail['subject'], array( '제목없음' ) ) ) { 
    147             $mail['subject'] = date( "Y-m-d H:i:s" ); 
     148            $mail['subject'] = $docid; 
    148149        } 
    149150        if( !$this->isMms($mail) ) { 
    150             $this->log( "* Subject: " . $mail['subject'] . " [SKIP]" ); 
     151            $this->log( "* "._t("메일").": " . $mail['subject'] . " [SKIP]" ); 
    151152            return false; 
    152153        } 
    153154        if( empty($mail['attachments']) ) { 
    154             $this->log( "* Subject: " . $mail['subject'] . " [SKIP]" ); 
     155            $this->log( "* "._t("메일").": " . $mail['subject'] . " [SKIP]" ); 
    155156            return false; 
    156157        } 
     
    160161 
    161162        if( $post->open( "slogan = '$slogan'" ) ) { 
    162             $post->content .= $this->_getDecoratedContent( $mail ); 
     163            $post->content .= $this->_getDecoratedContent( $mail, $docid ); 
    163164            $post->modified = time(); 
    164165        } else { 
     
    176177            $post->slogan = $slogan; 
    177178            if( !$post->add() ) { 
    178                 $this->log( "* Subject: " . $mail['subject'] . " [ERROR]" ); 
    179                 $this->log( "Failed: there is a problem in adding post : " . $post->error ); 
     179                $this->log( "* "._t("메일").": " . $mail['subject'] . " [ERROR]" ); 
     180                $this->log( _t("실패: 글을 추가하지 못하였습니다")." : " . $post->error ); 
    180181                return false; 
    181182            } 
    182183        } 
    183184 
    184         $this->log( "Attachment: {$mail['attachments'][0]['filename']}" ); 
     185        $this->log( _t("첨부")." : {$mail['attachments'][0]['filename']}" ); 
    185186        requireModel( "blog.api" ); 
    186187        $att = api_addAttachment( getBlogId(), $post->id,  
     
    192193            ); 
    193194        if( !$att ) { 
    194             $this->log( "* Subject: " . $mail['subject'] . " [ERROR]" ); 
    195             $this->log( "Failed: there is a problem in attaching file" ); 
     195            $this->log( "* "._t("메일").": " . $mail['subject'] . " [ERROR]" ); 
     196            $this->log( _t("실패: 첨부파일을 추가하지 못하였습니다")." : " . $post->error ); 
    196197            return false; 
    197198        } 
     
    200201        $post->content = str_replace( '$HEIGHT', $att['height'], $post->content ); 
    201202        if( !$post->update() ) { 
    202             $this->log( "* Subject: " . $mail['subject'] . " [ERROR]" ); 
    203             $this->log( "Failed: there is a problem in adding post." ); 
    204             return false; 
    205         } 
    206         $this->log( "* Subject: " . $mail['subject'] . " [OK]" ); 
     203            $this->log( "* "._t("메일").": " . $mail['subject'] . " [ERROR]" ); 
     204            $this->log( _t("실패: 글을 추가하지 못하였습니다").". : " . $post->error ); 
     205            return false; 
     206        } 
     207        $this->log( "* "._t("메일").": " . $mail['subject'] . " [OK]" ); 
    207208        return true; 
    208209    }