Changeset 123 in svn


Ignore:
Timestamp:
2006-09-02T04:13:29+02:00 (9 years ago)
Author:
Xuefer
Message:

Chinese translation for admin page

Location:
trunk/admin
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/config.php.example

    r34 r123  
    44// write your own config and name it as config.php
    55
     6// detected by browser
     7// $lang = 'en-us';
     8
    69$charset = "UTF-8";
     10
     11// developers only
     12$show_todo_strings = false;
    713
    814// this function is detected by xcache.tpl.php, and enabled if function_exists
     
    1016function ob_filter_path_nicer($o)
    1117{
     18    $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}/", $o);
    1219    $o = str_replace("/home/", "{H}/", $o);
    1320    return $o;
  • trunk/admin/help.php

    r106 r123  
    11<?php
    2 $charset = "UTF-8";
    3 if (file_exists("./config.php")) {
    4     include("./config.php");
    5 }
     2include("./common.php");
    63?>
    74<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     
    129echo <<<HEAD
    1310    <meta http-equiv="Content-Type" content="text/html; charset=$charset" />
     11      <meta http-equiv="Content-Language" content="$lang" />
    1412    <script type="text/javascript" src="tablesort.js" charset="$charset"></script>
    1513HEAD;
     
    1715
    1816    <link rel="stylesheet" type="text/css" href="xcache.css" />
    19     <title>XCache Administration Help</title>
     17    <title><?php echo _T('XCache Administration Help'); ?></title>
    2018    <script>
    2119    function toggle(o)
     
    2725
    2826<body>
    29 <h1>XCache Administration Help</h1>
    30 <a href="javascript:" onclick="toggle(document.getElementById('help'));return false" style="display:block; float: right">Help</a>
     27<h1><?php echo _T('XCache Administration Help'); ?></h1>
    3128<div id1="help">
    32 <h2>Cache Legends</h2>
    33 <pre>
    34 <b>Slots:      </b>Number of hash slots. the setting from your php.ini
    35 <b>Size:       </b>Cache Size, Size of the cache (or cache chunk), in bytes
    36 <b>Avail:      </b>Available Memory, free memory in bytes of this cache
    37 <b>Used:       </b>Used Percent, A bar shows how much memory used in percent
    38 <b>Clear:      </b>Clear Button, Press the button to clean this cache
    39 <b>Compiling:  </b>Compiling flag, "yes" if the cache is busy compiling php script
    40 <b>Hits:       </b>Cache Hits, hit=a var/php is loaded from this cache
    41 <b>Misses:     </b>Cache Misses, miss=a var/php is requested but not in the cache
    42 <b>Clogs:      </b>Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked)
    43             when the cache is busy compiling already
    44 <b>OOMs:       </b>Out Of Memory, how many times a new item should be stored but there isn't
    45             enough memory in the cache, think of increasing the xcache.size or xcache.var_size
    46 <b>Protected:  </b>Whether readonly_protection is available and enable on this cache
    47 <b>Cached:     </b>Number of entries stored in this cache
    48 <b>Deleted:    </b>Number of entries is pending in delete list (expired but referenced)
    49 <b>Free Blocks:</b>Free blocks list in the specified cache
    50 </pre>
    51 
    52 <h2>List Legends</h2>
    53 <pre>
    54 <b>entry:      </b>The entry name or filename
    55 <b>Hits:       </b>Times this entry is hit (loaded from this cache)
    56 <b>Refcount:   </b>Reference count this entry is holded by a php request
    57 <b>Size:       </b>Size in bytes of this entry in the cache
    58 <b>SrcSize:    </b>Size of the source file
    59 <b>Modify:     </b>Last modified time of the source file
    60 <b>device:     </b>device number of the source file
    61 <b>inode:      </b>inode number of the source file
    62 <b>Access:     </b>Last access time of the cached entry
    63 <b>Create:     </b>The time when this entry is stored
    64 </pre>
     29<?php include(get_language_file("help")); ?>
    6530</div>
    6631
    67 See also: <a href="http://trac.lighttpd.net/xcache/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://trac.lighttpd.net/xcache/">XCache wiki</a>
     32<?php echo _T('See also'); ?>: <a href="http://trac.lighttpd.net/xcache/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://trac.lighttpd.net/xcache/">XCache wiki</a>
    6833</body>
    6934</html>
  • trunk/admin/xcache.css

    r110 r123  
    1919#help { display: block; float: right; }
    2020.footnote { text-align: right; font-size: 12px; }
     21dl { overflow: hidden; }
     22dt { font-weight: bold; clear: both; float: left; width: 100px; text-align: right; margin: 0; }
     23dd { margin: 0; }
  • trunk/admin/xcache.php

    r114 r123  
    11<?php
    22
    3 error_reporting(E_ALL);
    4 define('REQUEST_TIME', time());
     3include("./common.php");
    54
    65class Cycle
     
    8281    }
    8382    return implode(' ', $html);
    84 }
    85 
    86 $charset = "UTF-8";
    87 
    88 if (file_exists("config.php")) {
    89     include("config.php");
    9083}
    9184
     
    189182$type_php = XC_TYPE_PHP;
    190183$type_var = XC_TYPE_VAR;
    191 $types = array($type_none => 'Statistics', $type_php =>'List PHP', $type_var =>'List Var Data');
     184$types = array($type_none => _T('Statistics'), $type_php => _T('List PHP'), $type_var => _T('List Var Data'));
    192185$xcache_version = XCACHE_VERSION;
    193186$xcache_modules = XCACHE_MODULES;
  • trunk/admin/xcache.tpl.php

    r118 r123  
    1111
    1212    <link rel="stylesheet" type="text/css" href="xcache.css" />
    13     <title>XCache <?php echo $xcache_version; ?> Administration</title>
     13    <title><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></title>
    1414</head>
    1515
    1616<body>
    17 <h1>XCache <?php echo $xcache_version; ?> Administration</h1>
    18 <a href="help.php" target="_blank" id="help">Help &raquo;</a>
     17<h1><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></h1>
     18<a href="help.php" target="_blank" id="help"><?php echo _T("Help") ?> &raquo;</a>
    1919<span class="switcher"><?php echo switcher("type", $types); ?></span>
    2020<?php
     
    2222$b = new Cycle('class="col1"', 'class="col2"');
    2323?>
    24 Caches:
     24<?php echo _T('Caches'); ?>:
    2525<table cellspacing="0" cellpadding="4" class="cycles">
    2626    <col />
     
    4141    <tr <?php echo $a->next(); ?>>
    4242        <th>-</th>
    43         <th>Slots</th>
    44         <th>Size</th>
    45         <th>Avail</th>
    46         <th>%</th>
    47         <th>Clear</th>
    48         <th>Compiling</th>
    49         <th>Hits</th>
    50         <th>Misses</th>
    51         <th>Clogs</th>
    52         <th>OOMs</th>
    53         <th>Protected</th>
    54         <th>Cached</th>
    55         <th>Deleted</th>
    56         <th>GC</th>
     43        <th><?php echo _T('Slots'); ?></th>
     44        <th><?php echo _T('Size'); ?></th>
     45        <th><?php echo _T('Avail'); ?></th>
     46        <th><?php echo _T('%'); ?></th>
     47        <th><?php echo _T('Clear'); ?></th>
     48        <th><?php echo _T('Compiling'); ?></th>
     49        <th><?php echo _T('Hits'); ?></th>
     50        <th><?php echo _T('Misses'); ?></th>
     51        <th><?php echo _T('Clogs'); ?></th>
     52        <th><?php echo _T('OOMs'); ?></th>
     53        <th><?php echo _T('Protected'); ?></th>
     54        <th><?php echo _T('Cached'); ?></th>
     55        <th><?php echo _T('Deleted'); ?></th>
     56        <th><?php echo _T('GC'); ?></th>
    5757    </tr>
    5858    <?php
    5959    $numkeys = explode(',', 'hits,misses,clogs,ooms,cached,deleted');
     60    $l_clear = _T('Clear');
     61    $l_clear_confirm = _T('Sure to clear?');
    6062    foreach ($cacheinfos as $i => $ci) {
    6163        echo "
     
    8183                    <input type="hidden" name="type" value="{$ci['type']}">
    8284                    <input type="hidden" name="cacheid" value="{$ci['cacheid']}">
    83                     <input type="submit" name="clearcache" value="Clear" class="submit" onclick="return confirm('Sure to clear?');" />
     85                    <input type="submit" name="clearcache" value="{$l_clear}" class="submit" onclick="return confirm('{$l_clear_confirm}');" />
    8486                </div>
    8587            </form>
     
    101103    <?php } ?>
    102104</table>
    103 Free Blocks:
     105<?php echo _T('Free Blocks'); ?>:
    104106<?php
    105107foreach ($cacheinfos as $i => $ci) {
     
    108110<table cellspacing="0" cellpadding="4" class="cycles freeblocks">
    109111    <tr>
    110         <th><?php echo $ci['cache_name']; ?> size<br>offset</th>
     112        <th><?php echo $ci['cache_name']; ?> <?php echo _T("size"); ?><br><?php echo _T("offset"); ?></th>
    111113    <?php
    112114    foreach ($ci['free_blocks'] as $block) {
     
    136138        $a->reset();
    137139        echo "
    138         <caption>{$cachelist['type_name']} $listname</caption>";
     140        <caption>", _T("{$cachelist['type_name']} $listname"), "</caption>";
    139141        ?>
    140142
     
    162164        ?>
    163165
    164             <th><a href="javascript:" onclick="resort(this); return false">Cache</a></th>
    165             <th><a href="javascript:" onclick="resort(this); return false">entry</a></th>
    166             <th><a href="javascript:" onclick="resort(this); return false">Hits</a></th>
    167             <th><a href="javascript:" onclick="resort(this); return false">Ref count</a></th>
    168             <th><a href="javascript:" onclick="resort(this); return false">Size</a></th>
     166            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Cache'); ?></a></th>
     167            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('entry'); ?></a></th>
     168            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Hits'); ?></a></th>
     169            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Refcount'); ?></a></th>
     170            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Size'); ?></a></th>
    169171            <?php if ($isphp) { ?>
    170             <th><a href="javascript:" onclick="resort(this); return false">SrcSize</a></th>
    171             <th><a href="javascript:" onclick="resort(this); return false">Modify</a></th>
     172            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('SrcSize'); ?></a></th>
     173            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Modify'); ?></a></th>
    172174            <?php if ($haveinode) { ?>
    173             <th><a href="javascript:" onclick="resort(this); return false">device</a></th>
    174             <th><a href="javascript:" onclick="resort(this); return false">inode</a></th>
     175            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('device'); ?></a></th>
     176            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('inode'); ?></a></th>
    175177            <?php } ?>
    176178            <?php } ?>
    177             <th><a href="javascript:" onclick="resort(this); return false">Access</a></th>
    178             <th><a href="javascript:" onclick="resort(this); return false">Create</a></th>
     179            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Access'); ?></a></th>
     180            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Create'); ?></a></th>
    179181            <?php if ($listname == 'Deleted') { ?>
    180             <th><a href="javascript:" onclick="resort(this); return false">Delete</a></th>
     182            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Delete'); ?></a></th>
    181183            <?php } ?>
    182184        </tr>
     
    245247<div class="footnote">
    246248<?php echo <<<EOS
    247 Powered By: {$xcache_version}, {$xcache_modules}
     249Powered By: XCache {$xcache_version}, {$xcache_modules}
    248250EOS;
    249251?>
Note: See TracChangeset for help on using the changeset viewer.