Show
Ignore:
Timestamp:
09/09/06 14:52:23 (2 years ago)
Author:
mbonetti
Message:

Yay for gettext localization! This will probably break things big time.
Note that until intl/*.php isn't adapted the the new method, the trunk
won't be localized!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/update.php

    r1544 r1561  
    116116        if ($error & MAGPIE_FEED_ORIGIN_CACHE) { 
    117117            if ($error & MAGPIE_FEED_ORIGIN_HTTP_304) { 
    118                 $label = LBL_UPDATE_NOT_MODIFIED; 
     118                $label = __('OK (304 Not modified)'); 
    119119                $cls = ERROR_NOERROR; 
    120120            } 
    121121            elseif ($error & MAGPIE_FEED_ORIGIN_HTTP_TIMEOUT) { 
    122                 $label = LBL_UPDATE_CACHE_TIMEOUT; 
     122                $label = __('HTTP Timeout (Local cache)'); 
    123123                $cls = ERROR_WARNING; 
    124124            } 
    125125            elseif ($error & MAGPIE_FEED_ORIGIN_NOT_FETCHED) { 
    126                 $label = LBL_UPDATE_STATUS_CACHED; 
     126                $label = __('OK (Local cache)'); 
    127127                $cls = ERROR_NOERROR; 
    128128            } 
    129129            elseif ($error & MAGPIE_FEED_ORIGIN_HTTP_404) { 
    130                 $label = LBL_UPDATE_NOT_FOUND; 
     130                $label = __('404 Not Found (Local cache)'); 
    131131                $cls = ERROR_ERROR; 
    132132            } 
     
    137137        } 
    138138        elseif ($error & MAGPIE_FEED_ORIGIN_HTTP_200) { 
    139             $label = LBL_UPDATE_STATUS_OK; 
     139            $label = __('OK (HTTP 200)'); 
    140140            $cls = ERROR_NOERROR; 
    141141        } 
    142142        else { 
    143143            if (is_numeric($error)) { 
    144                 $label = LBL_UPDATE_STATUS_ERROR; 
     144                $label = __('ERROR'); 
    145145                $cls = ERROR_ERROR; 
    146146            } else { 
     
    177177 
    178178        echo 
    179         "<h2>".sprintf(LBL_UPDATE_H2, count($this -> chans))."</h2>\n" 
     179        "<h2>".sprintf(__('Updating %d Feeds...'), count($this -> chans))."</h2>\n" 
    180180        ."<table id=\"updatetable\">\n" 
    181181        ."<tr>\n" 
    182         ."<th class=\"lc\">".LBL_UPDATE_CHANNEL."</th>\n" 
    183         ."<th class=\"mc\">".LBL_UPDATE_STATUS."</th>\n" 
    184         ."<th class=\"rc\">".LBL_UPDATE_UNREAD."</th>\n" 
     182        ."<th class=\"lc\">".__('Feed')."</th>\n" 
     183        ."<th class=\"mc\">".__('Status')."</th>\n" 
     184        ."<th class=\"rc\">".__('New Items')."</th>\n" 
    185185        ."</tr>"; 
    186186 
     
    239239    function render() { 
    240240 
    241         echo "<h2 style=\"margin-bottom:1em;\">". sprintf(LBL_UPDATE_H2,count($this -> chans)) ."</h2>\n"; 
     241        echo "<h2 style=\"margin-bottom:1em;\">". sprintf(__('Updating %d Feeds...'),count($this -> chans)) ."</h2>\n"; 
    242242 
    243243        echo "<table id=\"updatetable\">\n" 
    244244        ."<tr>\n" 
    245         ."<th class=\"lc\">".LBL_UPDATE_CHANNEL."</th>\n" 
    246         ."<th class=\"mc\">".LBL_UPDATE_STATUS."</th>\n" 
    247         ."<th class=\"rc\">".LBL_UPDATE_UNREAD."</th>\n" 
     245        ."<th class=\"lc\">".__('Feed')."</th>\n" 
     246        ."<th class=\"mc\">".__('Status')."</th>\n" 
     247        ."<th class=\"rc\">".__('New Items')."</th>\n" 
    248248        ."</tr>\n"; 
    249249 
     
    296296 
    297297            list($label,$cls) = parent::magpieError($error); 
    298             echo "\n$label, $unread " . LBL_UPDATE_UNREAD . "\n\n"; 
     298            echo "\n$label, $unread " . __('New Items') . "\n\n"; 
    299299            flush(); 
    300300 
     
    325325            $unread = count($unreadIds); 
    326326            list($label,$cls) = parent::magpieError($error); 
    327             echo "\n$label, $unread " . LBL_UPDATE_UNREAD . "<br />"; 
     327            echo "\n$label, $unread " . __('New Items') . "<br />"; 
    328328            flush(); 
    329329    } 
     
    357357                                echo "$title ...\t"; 
    358358                                flush(); 
    359                                 echo "\n$label, $unread " . LBL_UPDATE_UNREAD . "\n\n"; 
     359                                echo "\n$label, $unread " . __('New Items') . "\n\n"; 
    360360                                flush(); 
    361361                        }