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/admin/items.php

    r1552 r1561  
    3434 
    3535    echo  "" 
    36     . "<h2 class=\"trigger\">". LBL_ADMIN_ITEM ."</h2>\n" 
     36    . "<h2 class=\"trigger\">". __('Items:') ."</h2>\n" 
    3737    . "<div id=\"admin_items\">\n" 
    3838    . "<form method=\"get\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n" 
    3939    . "<fieldset class=\"prune\">\n" 
    40     . "<legend>".LBL_ADMIN_PRUNING."</legend>\n" 
     40    . "<legend>".__('Pruning')."</legend>\n" 
    4141    . "<p><input type=\"hidden\" name=\"". CST_ADMIN_DOMAIN ."\" value=\"".CST_ADMIN_DOMAIN_ITEM."\"/>\n" 
    42     . "<label for=\"prune_older\">" . LBL_ADMIN_PRUNE_OLDER ."</label>\n" 
     42    . "<label for=\"prune_older\">" . __('Delete items older than ') ."</label>\n" 
    4343    . "<input type=\"text\" size=\"5\" name=\"prune_older\" id=\"prune_older\" value=\"\" />\n" 
    4444    . "<select name=\"prune_period\" id=\"prune_period\">\n" 
    45     . "<option>" . LBL_ADMIN_PRUNE_DAYS . "</option>\n" 
    46     . "<option>" . LBL_ADMIN_PRUNE_MONTHS . "</option>\n" 
    47     . "<option>" . LBL_ADMIN_PRUNE_YEARS . "</option>\n" 
     45    . "<option>" . __('days') . "</option>\n" 
     46    . "<option>" . __('months') . "</option>\n" 
     47    . "<option>" . __('years') . "</option>\n" 
    4848    . "</select></p>\n" 
    4949    . "<p><label for=\"prune_channel\">".__('...from these feeds').":</label>\n" 
    5050        . rss_toolkit_channels_combo("prune_channel", ALL_CHANNELS_ID, 0, true) . "\n" 
    5151    . "</p>\n" 
    52     . "<p><label for=\"prune_include_sticky\">".LBL_ADMIN_PRUNE_INCLUDE_STICKY."</label>\n" 
     52    . "<p><label for=\"prune_include_sticky\">".__('Delete Sticky items too: ')."</label>\n" 
    5353    . "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n" 
    54     . "<p><label for=\"prune_exclude_tags\">".LBL_ADMIN_PRUNE_EXCLUDE_TAGS."</label>\n" 
     54    . "<p><label for=\"prune_exclude_tags\">".__('Do not delete items tagged... ')."</label>\n" 
    5555    . "<input type=\"text\" id=\"prune_exclude_tags\" name=\"prune_exclude_tags\" value=\"\"/></p>\n" 
    56     . "<p style=\"font-size:small; padding:0;margin:0\">".LBL_ADMIN_ALLTAGS_EXPL."</p>\n" 
    57     . "<p class=\"cntr\"><input type=\"submit\" name=\"action\" value=\"". LBL_ADMIN_DELETE2 ."\"/></p>\n" 
     56    . "<p style=\"font-size:small; padding:0;margin:0\">".__('(Enter <strong>*</strong> to keep all tagged items)')."</p>\n" 
     57    . "<p class=\"cntr\"><input type=\"submit\" name=\"action\" value=\"". __('Delete') ."\"/></p>\n" 
    5858    . "</fieldset>\n" 
    5959    . "</form>\n" 
     
    6868    $ret__ = CST_ADMIN_DOMAIN_NONE; 
    6969    switch ($_REQUEST['action']) { 
    70     case LBL_ADMIN_DELETE2: 
     70    case __('Delete'): 
    7171            $req = rss_query('select count(*) as cnt from ' .getTable('item') 
    7272                             ." where not(unread & " . RSS_MODE_DELETED_STATE  .")" 
     
    7979                is_numeric($_REQUEST['prune_older']))   { 
    8080            switch ($_REQUEST['prune_period']) { 
    81             case LBL_ADMIN_PRUNE_DAYS: 
     81            case __('days'): 
    8282                $period = 'day'; 
    8383                break; 
    8484 
    85             case LBL_ADMIN_PRUNE_MONTHS: 
     85            case __('months'): 
    8686                $period = 'month'; 
    8787                break; 
    8888 
    89             case LBL_ADMIN_PRUNE_YEARS: 
     89            case __('years'): 
    9090                $period = 'year'; 
    9191                break; 
    9292 
    9393            default: 
    94                 rss_error(LBL_ADMIN_ERROR_PRUNING_PERIOD, RSS_ERROR_ERROR,true); 
     94                rss_error(__('Invalid pruning period'), RSS_ERROR_ERROR,true); 
    9595                return CST_ADMIN_DOMAIN_ITEM; 
    9696                break; 
     
    227227                                                       . " and not(i.unread & " . RSS_MODE_DELETED_STATE .")" 
    228228                                                      )); 
    229                 rss_error(sprintf(LBL_ADMIN_ABOUT_TO_DELETE,$cnt_d,$cnt), RSS_ERROR_ERROR,true); 
     229                rss_error(sprintf(__('Warning: you are about to delete %s items (of %s)'),$cnt_d,$cnt), RSS_ERROR_ERROR,true); 
    230230 
    231231                echo "<form action=\"\" method=\"post\">\n" 
     
    234234                ."<input type=\"hidden\" name=\"prune_period\" value=\"".$_REQUEST['prune_period']."\" />\n" 
    235235                ."<input type=\"hidden\" name=\"".CST_ADMIN_CONFIRMED."\" value=\"1\" />\n" 
    236                 ."<input type=\"submit\" name=\"action\" value=\"". LBL_ADMIN_DELETE2 ."\" />\n" 
    237                 ."<input type=\"submit\" name=\"action\" value=\"". LBL_ADMIN_CANCEL ."\"/>\n" 
     236                ."<input type=\"submit\" name=\"action\" value=\"". __('Delete') ."\" />\n" 
     237                ."<input type=\"submit\" name=\"action\" value=\"". __('Cancel') ."\"/>\n" 
    238238                ."</p>\n" 
    239239                ."</form>\n"; 
    240240            } 
    241241        } else { 
    242             rss_error(LBL_ADMIN_ERROR_NO_PERIOD, RSS_ERROR_ERROR,true); 
     242            rss_error(__('oops, no period specified'), RSS_ERROR_ERROR,true); 
    243243            $ret__ = CST_ADMIN_DOMAIN_ITEM; 
    244244        }