Browse Source

cacher/admin: use title (tips) in table header

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1038 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 9 years ago
parent
commit
79279c79ae
  1. 78
      mod_cacher/htdocs/common-en.lang.php
  2. 157
      mod_cacher/htdocs/common-zh-simplified-utf-8.lang.php
  3. 149
      mod_cacher/htdocs/common-zh-traditional-utf-8.lang.php
  4. 14
      mod_cacher/htdocs/common.php
  5. 4
      mod_cacher/htdocs/edit.tpl.php
  6. 4
      mod_cacher/htdocs/header.tpl.php
  7. 37
      mod_cacher/htdocs/help-en.lang.php
  8. 37
      mod_cacher/htdocs/help-zh-simplified-utf-8.lang.php
  9. 34
      mod_cacher/htdocs/help-zh-traditional-utf-8.lang.php
  10. 6
      mod_cacher/htdocs/help.php
  11. 20
      mod_cacher/htdocs/xcache.php
  12. 142
      mod_cacher/htdocs/xcache.tpl.php

78
mod_cacher/htdocs/common-en.lang.php

@ -2,4 +2,80 @@
$GLOBALS['config']['show_todo_strings'] = false;
?>
$strings = array(
'cache.cache'
=> 'Cache|',
'cache.slots'
=> 'Slots|Number of hash slots. the setting from your php.ini',
'cache.size'
=> 'Size|Cache Size, Size of the cache (or cache chunk), in bytes',
'cache.avail'
=> 'Avail|Available Memory, free memory in bytes of this cache',
'cache.used'
=> 'Used|Used Memory, used memory in bytes of this cache',
'cache.blocksgraph'
=> 'Percent Graph|Shows how much memory available in percent, and memory blocks status in graph',
'cache.operations'
=> 'Operations|Press the clear button to clean this cache',
'cache.compiling'
=> 'Comp.|Compiling flag, "yes" if the cache is busy compiling php script',
'cache.hits'
=> 'Hits|Cache Hits, hit=a var/php is loaded from this cache',
'cache.hits_avg_h'
=> 'Hits/H|Average Hits per Hour. Only last 24 hours is logged',
'cache.hits_graph'
=> 'Hits*24H|Hits graph of last 24 hours',
'cache.hits_avg_s'
=> 'Hits/S|Average Hits per Second. Only last 5 seconds is logged',
'cache.updates'
=> 'Updates|Cache Updates',
'cache.clogs'
=> 'Clogs|Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked) when the cache is busy compiling already',
'cache.ooms'
=> 'OOMs|Out Of Memory, how many times a new item should be stored but there isn\'t enough memory in the cache, think of increasing the xcache.size or xcache.var_size',
'cache.errors'
=> 'Errs|Compiler errors, how many times your script is compiled but failed. You should really check what is happening if you see this value increase. (See Help for more information)',
'cache.readonly_protected'
=> 'Protected|Whether readonly_protection is available and enable on this cache (See help for more information)',
'cache.cached'
=> 'Cached|Number of entries stored in this cache',
'cache.deleted'
=> 'Deleted|Number of entries is pending in delete list (expired but referenced)',
'cache.gc_timer'
=> 'GC|Seconds count down of Garbage Collection',
'entry.id'
=> 'Id|',
'entry.name'
=> 'Entry name|The entry name or filename',
'entry.hits'
=> 'Hits|Times this entry is hit (loaded from this cache)',
'entry.size'
=> 'Size|Size in bytes of this entry in the cache',
'entry.refcount'
=> 'Refs|Reference count of this entry is holded by a php request',
'entry.phprefcount'
=> 'Shares|Count of entry sharing this php data',
'entry.file_size'
=> 'Src Size|Size of the source file',
'entry.file_mtime'
=> 'Modified|Last modified time of the source file',
'entry.file_device'
=> 'dev|device number of the source file',
'entry.file_inode'
=> 'ino|inode number of the source file',
'entry.class_cnt'
=> 'Cls.|Count of classes',
'entry.function_cnt'
=> 'Funcs|Count of functions',
'entry.hash'
=> 'Hash|Hash value of this entry',
'entry.atime'
=> 'Access|Last time when this entry is accessed',
'entry.ctime'
=> 'Create|The time when this entry is stored',
'entry.delete'
=> 'Delete|The time when this entry is deleted',
'entry.remove'
=> 'Remove|',
);

157
mod_cacher/htdocs/common-zh-simplified-utf-8.lang.php

@ -1,83 +1,24 @@
<?php
$strings = array(
'Cache Legends'
=> 'Cache 帮助',
'List Legends'
=> 'List 帮助',
'XCache Administration Help'
=> 'XCache 管理页面帮助信息',
'XCache Help'
=> 'XCache 帮助信息',
'Help'
=> '帮助',
'Slots'
=> '槽',
'Size'
=> '大小',
'Avail'
=> '剩余',
'Used'
=> '已用',
'Clear'
=> '清除',
'Sure to clear?'
=> '确认要清除吗?',
'Compiling'
=> '编译中',
'% Free'
=> '% 剩余',
'% Used'
=> '% 已用',
'Hits'
=> '命中',
'Hits 24H'
=> '24H 分布',
'Hits/H'
=> '命中/H',
'Hits/S'
=> '命中/S',
'Updates'
=> '更新',
'Clogs'
=> '阻塞',
'OOMs'
=> '内存不足',
'Errors'
=> '错误',
'Protected'
=> '保护',
'Cached'
=> '缓存',
'Deleted'
=> '待删',
'Delete'
=> '删除',
'Free Blocks'
=> '空闲块',
'entry'
=> '项目',
'Refcount'
=> '引用数',
'PhpShared'
=> '共享',
'SrcSize'
=> '源大小',
'Modify'
=> '修改',
'device'
=> '设备',
'inode'
=> 'Inode',
'hash'
=> 'Hash',
'Access'
=> '访问',
'Create'
=> '创建',
'See also'
=> '建议参考',
'GC'
=> 'GC',
'Legends:'
=> '图例:',
'Used Blocks'
@ -86,18 +27,14 @@ $strings = array(
=> '未用块',
'Total'
=> '总共',
'Cache'
=> '缓冲区',
'Caches'
=> '缓冲区',
'Cached'
=> '缓冲',
=> '缓存区',
'php Cached'
=> '缓的 php 脚本',
=> '缓存的 php 脚本',
'php Deleted'
=> '待删 php 脚本',
=> '待删 php 缓存',
'var Cached'
=> '缓的变量',
=> '缓的变量',
'var Deleted'
=> '待删变量',
'Statistics'
@ -108,10 +45,6 @@ $strings = array(
=> '列变量数据',
'XCache %s Administration'
=> 'XCache %s 管理页面',
'size'
=> '大小',
'offset'
=> '位置',
'Module Info'
=> '模块信息',
'Remove Selected'
@ -120,7 +53,79 @@ $strings = array(
=> '正在编辑变量 %s',
'Set %s in config to enable'
=> '请在配置文件中设置 %s 启用本功能',
''
=> '',
);
'cache.cache'
=> '缓存|',
'cache.slots'
=> '槽|Hash 槽个数, 对应 php.ini 里的设置',
'cache.size'
=> '大小|共享内存区大小, 单位: 字节',
'cache.avail'
=> '剩余|可用内存, 对应共享内存区的剩余内存字节数',
'cache.used'
=> '已用|已用内存, 对应共享内存区的已用内存字节数',
'cache.blocksgraph'
=> '百分比图|条状显示可用内存的比例, 以及显示分配块状态',
'cache.operations'
=> '操作|点击按钮清除对应共享内存区的数据',
'cache.compiling'
=> '编译中|编译标记, 当共享内存区正在编译 php 脚本时标记为 "yes"',
'cache.hits'
=> '命中|共享内存命中次数, 命中=从该共享内存载入php或者变量',
'cache.hits_avg_h'
=> '命中/H|每小时命中次数. 只统计最后 24 小时',
'cache.hits_graph'
=> '24H 分布|24 小时命中分布图. 图表现是最后 24 小时的命中次数',
'cache.hits_avg_s'
=> '命中/S|每秒命中次数. 只统计最后 5 秒',
'cache.updates'
=> '更新|共享内存更新次数',
'cache.clogs'
=> '阻塞|编译阻塞跳过, 阻塞=当需该共享内存区负责编译时, 其他进程/现成无法访问此共享内存. 跳过=XCache 自动判断阻塞的共享内存区自动跳过阻塞等待, 直接使用非共享内存方式继续处理请求',
'cache.ooms'
=> '内存不足|内存不足次数, 显示需要存储新数据但是共享内存区内存不足的次数. 如果出现太频繁请考虑加大配置中的 xcache.size 或者 xcache.var_size',
'cache.errors'
=> '错误|编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 帮助 获取更多信息',
'cache.readonly_protected'
=> '保护|显示该 Cache 是否支持并启用 readonly_protection. 参考 帮助 获取更多信息',
'cache.cached'
=> '缓存|共享内存于该共享内存区的项目条数',
'cache.deleted'
=> '待删|共享内存区内将要删除的项目 (已经删除但是还被某些进程占用)',
'cache.gc_timer'
=> 'GC|垃圾回收的倒计时',
'entry.id'
=> 'Id|',
'entry.name'
=> '项目名/文件名|项目名或者文件名',
'entry.hits'
=> '命中|该项目被命中的次数 (从共享内存区载入)',
'entry.size'
=> '大小|项目在共享内存里占用字节数',
'entry.refcount'
=> '引用数|项目依然被其他进程占据的引用次数',
'entry.phprefcount'
=> '共享数|与本项目相同 PHP 代码的个数',
'entry.file_size'
=> '源大小|源文件大小',
'entry.file_mtime'
=> '修改|源文件最后修改时间',
'entry.file_device'
=> 'dev|源文件所在设备ID',
'entry.file_inode'
=> 'ino|源文件的 inode',
'entry.class_cnt'
=> '类|类个数',
'entry.function_cnt'
=> '函数|函数个数',
'entry.hash'
=> '哈希|该项目的哈希值',
'entry.atime'
=> '访问|最后访问该项目的时间',
'entry.ctime'
=> '创建|该项目被创建于共享内的时间',
'entry.delete'
=> '删除|该项目被决定删除的时间',
'entry.remove'
=> '删除|',
);

149
mod_cacher/htdocs/common-zh-traditional-utf-8.lang.php

@ -1,83 +1,24 @@
<?php
$strings = array(
'Cache Legends'
=> 'Cache 說明',
'List Legends'
=> 'List 說明',
'XCache Administration Help'
=> 'XCache 管理頁面說明訊息',
'XCache Help'
=> 'XCache 說明訊息',
'Help'
=> '說明',
'Slots'
=> '槽',
'Size'
=> '大小',
'Avail'
=> '剩餘',
'Used'
=> '已用',
'Clear'
=> '清除',
'Sure to clear?'
=> '確認要清除嗎?',
'Compiling'
=> '編譯中',
'% Free'
=> '% 剩余',
'% Used'
=> '% 已用',
'Hits'
=> '命中',
'Hits 24H'
=> '24H 分布',
'Hits/H'
=> '命中/H',
'Hits/S'
=> '命中/S',
'Updates'
=> '更新',
'Clogs'
=> '阻塞',
'OOMs'
=> '記憶體不足',
'Errors'
=> '错误',
'Protected'
=> '保護',
'Cached'
=> '快取',
'Deleted'
=> '待刪',
'Delete'
=> '刪除',
'Free Blocks'
=> '空閒塊',
'entry'
=> '項目',
'Refcount'
=> '引用數',
'PhpShared'
=> '共享',
'SrcSize'
=> '原始檔案大小',
'Modify'
=> '修改',
'device'
=> '設備',
'inode'
=> 'Inode',
'hash'
=> 'Hash',
'Access'
=> '存取',
'Create'
=> '建立',
'See also'
=> '建議參考',
'GC'
=> 'GC',
'Legends:'
=> '图例:',
'Used Blocks'
@ -86,12 +27,8 @@ $strings = array(
=> '未用块',
'Total'
=> '总共',
'Cache'
=> '快取',
'Caches'
=> '快取',
'Cached'
=> '快取',
'php Cached'
=> '快取的 php 指令',
'php Deleted'
@ -108,10 +45,6 @@ $strings = array(
=> '列變數資料',
'XCache %s Administration'
=> 'XCache %s 管理頁面',
'size'
=> '大小',
'offset'
=> '位置',
'Module Info'
=> '組元訊息',
'Remove Selected'
@ -120,7 +53,79 @@ $strings = array(
=> '正在编辑变量 %s',
'Set %s in config to enable'
=> '請在配置文件中設置 %s 啟用本功能',
''
=> '',
);
'cache.cache'
=> '快取|',
'cache.slots'
=> '槽|Hash 槽個數,對應 php.ini 裡的設置',
'cache.size'
=> '大小|共享記憶體區大小,單位:位元',
'cache.avail'
=> '剩餘|可用記憶體,對應共享記憶體區的剩餘記憶體位元數',
'cache.used'
=> '已用|已用内存, 对应共享内存区的已用内存字节数',
'cache.blocksgraph'
=> '百分比图|條狀顯示可用記憶體的比例',
'cache.operations'
=> '操作按鈕|點擊按鈕清除對應共享記憶體區的資料',
'cache.compiling'
=> '編譯中|編譯標記,當共享記憶體區正在編譯 php 指令時標記為 "yes"',
'cache.hits'
=> '命中|共享記憶體命中次數,命中=從該共享記憶體載入php或者變數',
'cache.hits_avg_h'
=> '命中/H|每小时命中次数. 只统计最后 24 小时',
'cache.hits_graph'
=> '24H 分布|24 小时命中分布图. 图表现是最后 24 小时的命中次数',
'cache.hits_avg_s'
=> '命中/S|每秒命中次数. 只统计最后 5 秒',
'cache.updates'
=> '更新|共享記憶更新過次數',
'cache.clogs'
=> '阻塞|編譯阻塞跳過,阻塞=當需該共享記憶體區負責編譯時,其他程序/現成無法存取此共享記憶體. 跳過=XCache 自動判斷阻塞的共享記憶體區自動跳過阻塞等待,直接使用非共享記憶體方式繼續處理請求',
'cache.ooms'
=> '記憶體不足|記憶體不足次數,顯示需要儲存新資料但是共享記憶體區記憶體不足的次數. 如果出現太頻繁請考慮加大配置中的 xcache.size 或者 xcache.var_size',
'cache.errors'
=> '错误|编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 說明',
'cache.readonly_protected'
=> 'Protected|顯示該 Cache 是否支援並啟用 readonly_protection. 参考 說明',
'cache.cached'
=> '快取|共享記憶體於該共享記憶體區的項目個數',
'cache.deleted'
=> '待刪|共享記憶體區內將要刪除的項目 (已經刪除但是還被某些程序佔用)',
'cache.gc_timer'
=> 'GC|垃圾回收的倒數計時',
'entry.id'
=> 'Id|',
'entry.name'
=> '項目名稱/檔案名稱|項目名稱或者檔案名稱',
'entry.hits'
=> '命中|該項目被命中的次數 (從共享記憶體區載入)',
'entry.size'
=> '大小|項目在共享記憶體裡佔用位元數',
'entry.refcount'
=> '引用數|項目依然被其他程序佔用的引用次數',
'entry.phprefcount'
=> '共享|與本項目相同 PHP 內容的个數',
'entry.file_size'
=> '源大小|原始檔案大小',
'entry.file_mtime'
=> '修改|原始檔案最後修改時間',
'entry.file_device'
=> 'dev|原始檔案所在設備ID',
'entry.file_inode'
=> 'ino|原始檔案的inode',
'entry.class_cnt'
=> '类|类个数',
'entry.function_cnt'
=> '函数|函数个数',
'entry.hash'
=> 'Hash|Hash',
'entry.atime'
=> '存取|最後存取該項目的時間',
'entry.ctime'
=> '建立|該項目被建立於共享內的時間',
'entry.delete'
=> '移除|該項目被移除於共享內的時間',
'entry.remove'
=> '移除|',
);

14
mod_cacher/htdocs/common.php

@ -71,17 +71,27 @@ function get_language_file($name)
return isset($file) ? $file : "$name-en.lang.php";
}
function _T($str)
function _($str)
{
if (isset($GLOBALS['strings'][$str])) {
return $GLOBALS['strings'][$str];
}
if (!empty($GLOBALS['config']['show_todo_strings'])) {
return '<span style="color:red">' . htmlspecialchars($str) . '</span>';
return '<span style="color:red">' . htmlspecialchars($str) . '</span>|';
}
return $str;
}
function __($str)
{
return _($str);
}
function N_($str)
{
return $str;
}
function stripaddslashes_array($value, $mqs = false)
{
if (is_array($value)) {

4
mod_cacher/htdocs/edit.tpl.php

@ -5,12 +5,12 @@ $h_value = htmlspecialchars($value);
?>
<form method="post" action="">
<fieldset>
<legend><?php echo sprintf(_T("Editing Variable %s"), $h_name); ?></legend>
<legend><?php echo sprintf(_("Editing Variable %s"), $h_name); ?></legend>
<textarea name="value" style="width: 100%; height: 200px; overflow-y: auto" <?php echo $editable ? "" : "disabled=disabled"; ?>><?php echo $h_value; ?></textarea><br>
<input type="submit" <?php echo $editable ? "" : "disabled=disabled"; ?>>
<?php
if (!$editable) {
echo sprintf(_T("Set %s in config to enable"), "\$config['enable_eval'] = true");
echo sprintf(_("Set %s in config to enable"), "\$config['enable_eval'] = true");
}
?>
</fieldset>

4
mod_cacher/htdocs/header.tpl.php

@ -10,8 +10,8 @@ HEAD;
?>
<link rel="stylesheet" type="text/css" href="xcache.css" />
<title><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></title>
<title><?php echo sprintf(_("XCache %s Administration"), $xcache_version); ?></title>
</head>
<body>
<h1><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></h1>
<h1><?php echo sprintf(_("XCache %s Administration"), $xcache_version); ?></h1>

37
mod_cacher/htdocs/help-en.lang.php

@ -1,37 +1,4 @@
<h2><?php echo _T('Cache Legends'); ?></h2>
<dl>
<dt><?php echo _T('Slots'); ?>: </dt><dd>Number of hash slots. the setting from your php.ini</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>Cache Size, Size of the cache (or cache chunk), in bytes</dd>
<dt><?php echo _T('Avail'); ?>: </dt><dd>Available Memory, free memory in bytes of this cache</dd>
<dt><?php echo _T('% Used'); ?>: </dt><dd>Percent, A bar shows how much memory available in percent, and memory blocks status</dd>
<dt><?php echo _T('Clear'); ?>: </dt><dd>Clear Button, Press the button to clean this cache</dd>
<dt><?php echo _T('Compiling'); ?>: </dt><dd>Compiling flag, "yes" if the cache is busy compiling php script</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>Cache Hits, hit=a var/php is loaded from this cache</dd>
<dt><?php echo _T('Hits/H'); ?>: </dt><dd>Average Hits per Hour. Only last 24 hours is logged</dd>
<dt><?php echo _T('Hits 24H'); ?>: </dt><dd>Hits 24 Hours. Hits graph of last 24 hours</dd>
<dt><?php echo _T('Hits/S'); ?>: </dt><dd>Average Hits per Second. Only last 5 seconds is logged</dd>
<dt><?php echo _T('Updates'); ?>: </dt><dd>Cache Updates</dd>
<dt><?php echo _T('Clogs'); ?>: </dt><dd>Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked) when the cache is busy compiling already</dd>
<dt><?php echo _T('OOMs'); ?>: </dt><dd>Out Of Memory, how many times a new item should be stored but there isn't enough memory in the cache, think of increasing the xcache.size or xcache.var_size</dd>
<dt><?php echo _T('Errors'); ?>: </dt><dd>Compiler errors, how many times your script is compiled but failed. You should really check what is happening if you see this value increase. See <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt><?php echo _T('Protected'); ?>: </dt><dd>Whether <a href="http://xcache.lighttpd.net/wiki/ReadonlyProtection">readonly_protection</a> is available and enable on this cache</dd>
<dt><?php echo _T('Cached'); ?>: </dt><dd>Number of entries stored in this cache</dd>
<dt><?php echo _T('Deleted'); ?>: </dt><dd>Number of entries is pending in delete list (expired but referenced)</dd>
<dt><?php echo _T('GC'); ?>: </dt><dd>Seconds count down of Garbage Collection</dd>
<dt><?php echo _T('Free Blocks'); ?>: </dt><dd>Free blocks list in the specified cache</dd>
</dl>
<h2><?php echo _T('List Legends'); ?></h2>
<dl>
<dt><?php echo _T('entry'); ?>: </dt><dd>The entry name or filename</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>Times this entry is hit (loaded from this cache)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>Reference count of this entry is holded by a php request</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>Size in bytes of this entry in the cache</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>Count of entry sharing this php data</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>Size of the source file</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>Last modified time of the source file</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>device number of the source file</dd>
<dt><?php echo _T('inode'); ?>: </dt><dd>inode number of the source file</dd>
<dt><?php echo _T('Access'); ?>: </dt><dd>Last access time of the cached entry</dd>
<dt><?php echo _T('Create'); ?>: </dt><dd>The time when this entry is stored</dd>
<dt>Compiler errors: </dt> <dd><a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt>Readonly protection: </dt> <dd><a href="http://xcache.lighttpd.net/wiki/ReadonlyProtection">ReadonlyProtection</a></dd>
</dl>

37
mod_cacher/htdocs/help-zh-simplified-utf-8.lang.php

@ -1,37 +1,4 @@
<h2><?php echo _T('Cache Legends'); ?></h2>
<dl>
<dt><?php echo _T('Slots'); ?>: </dt><dd>Hash 槽个数, 对应 php.ini 里的设置</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>共享内存区大小, 单位: 字节</dd>
<dt><?php echo _T('Avail'); ?>: </dt><dd>可用内存, 对应共享内存区的剩余内存字节数</dd>
<dt><?php echo _T('% Used'); ?>: </dt><dd>百分比, 条状显示可用内存的比例, 以及显示分配块状态</dd>
<dt><?php echo _T('Clear'); ?>: </dt><dd>清除按钮, 点击按钮清除对应共享内存区的数据</dd>
<dt><?php echo _T('Compiling'); ?>: </dt><dd>编译标记, 当共享内存区正在编译 php 脚本时标记为 "yes"</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>共享内存命中次数, 命中=从该共享内存载入php或者变量</dd>
<dt><?php echo _T('Hits/H'); ?>: </dt><dd>每小时命中次数. 只统计最后 24 小时</dd>
<dt><?php echo _T('Hits 24H'); ?>: </dt><dd>24 小时命中分布图. 图表现是最后 24 小时的命中次数</dd>
<dt><?php echo _T('Hits/S'); ?>: </dt><dd>每秒命中次数. 只统计最后 5 秒</dd>
<dt><?php echo _T('Updates'); ?>: </dt><dd>共享内存更新次数</dd>
<dt><?php echo _T('Clogs'); ?>: </dt><dd>编译阻塞跳过, 阻塞=当需该共享内存区负责编译时, 其他进程/现成无法访问此共享内存. 跳过=XCache 自动判断阻塞的共享内存区自动跳过阻塞等待, 直接使用非共享内存方式继续处理请求</dd>
<dt><?php echo _T('OOMs'); ?>: </dt><dd>内存不足次数, 显示需要存储新数据但是共享内存区内存不足的次数. 如果出现太频繁请考虑加大配置中的 xcache.size 或者 xcache.var_size</dd>
<dt><?php echo _T('Errors'); ?>: </dt><dd>编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt><?php echo _T('Protected'); ?>: </dt><dd>显示该 Cache 是否支持并启用 <a href="http://xcache.lighttpd.net/xcache/wiki/ReadonlyProtection">readonly_protection</a></dd>
<dt><?php echo _T('Cached'); ?>: </dt><dd>共享内存于该共享内存区的项目条数</dd>
<dt><?php echo _T('Deleted'); ?>: </dt><dd>共享内存区内将要删除的项目 (已经删除但是还被某些进程占用)</dd>
<dt><?php echo _T('GC'); ?>: </dt><dd>垃圾回收的倒计时</dd>
<dt><?php echo _T('Free Blocks'); ?>: </dt><dd>共享内存区内的空闲内存块</dd>
</dl>
<h2><?php echo _T('List Legends'); ?></h2>
<dl>
<dt><?php echo _T('entry'); ?>: </dt><dd>项目名或者文件名</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>该项目被命中的次数 (从共享内存区载入)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>项目依然被其他进程占据的引用次数</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>项目在共享内存里占用字节数</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>与本项目相同 PHP 代码的个数</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>源文件大小</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>源文件最后修改时间</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>源文件所在设备ID</dd>
<dt><?php echo _T('inode'); ?>: </dt><dd>源文件的inode</dd>
<dt><?php echo _T('Access'); ?>: </dt><dd>最后访问该项目的时间</dd>
<dt><?php echo _T('Create'); ?>: </dt><dd>该项目被创建于共享内的时间</dd>
<dt>编译错误: </dt> <dd><a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt>只读保护: </dt> <dd><a href="http://xcache.lighttpd.net/wiki/ReadonlyProtection">ReadonlyProtection</a></dd>
</dl>

34
mod_cacher/htdocs/help-zh-traditional-utf-8.lang.php

@ -1,34 +1,4 @@
<h2><?php echo _T('Cache Legends'); ?></h2>
<dl>
<dt><?php echo _T('Slots'); ?>: </dt><dd>Hash 槽個數,對應 php.ini 裡的設置</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>共享記憶體區大小,單位:位元</dd>
<dt><?php echo _T('Avail'); ?>: </dt><dd>可用記憶體,對應共享記憶體區的剩餘記憶體位元數</dd>
<dt><?php echo _T('% Used'); ?>: </dt><dd>百分比,條狀顯示可用記憶體的比例</dd>
<dt><?php echo _T('Clear'); ?>: </dt><dd>清除按鈕,點擊按鈕清除對應共享記憶體區的資料</dd>
<dt><?php echo _T('Compiling'); ?>: </dt><dd>編譯標記,當共享記憶體區正在編譯 php 指令時標記為 "yes"</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>共享記憶體命中次數,命中=從該共享記憶體載入php或者變數</dd>
<dt><?php echo _T('Updates'); ?>: </dt><dd>共享記憶更新過次數</dd>
<dt><?php echo _T('Clogs'); ?>: </dt><dd>編譯阻塞跳過,阻塞=當需該共享記憶體區負責編譯時,其他程序/現成無法存取此共享記憶體. 跳過=XCache 自動判斷阻塞的共享記憶體區自動跳過阻塞等待,直接使用非共享記憶體方式繼續處理請求</dd>
<dt><?php echo _T('OOMs'); ?>: </dt><dd>記憶體不足次數,顯示需要儲存新資料但是共享記憶體區記憶體不足的次數. 如果出現太頻繁請考慮加大配置中的 xcache.size 或者 xcache.var_size</dd>
<dt><?php echo _T('Errors'); ?>: </dt><dd>编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt><?php echo _T('Protected'); ?>: </dt><dd>顯示該 Cache 是否支援並啟用 <a href="http://xcache.lighttpd.net/xcache/wiki/ReadonlyProtection">readonly_protection</a></dd>
<dt><?php echo _T('Cached'); ?>: </dt><dd>共享記憶體於該共享記憶體區的項目個數</dd>
<dt><?php echo _T('Deleted'); ?>: </dt><dd>共享記憶體區內將要刪除的項目 (已經刪除但是還被某些程序佔用)</dd>
<dt><?php echo _T('GC'); ?>: </dt><dd>垃圾回收的倒數計時</dd>
<dt><?php echo _T('Free Blocks'); ?>: </dt><dd>共享記憶體區內的空閒記憶體區塊</dd>
</dl>
<h2><?php echo _T('List Legends'); ?></h2>
<dl>
<dt><?php echo _T('entry'); ?>: </dt><dd>項目名稱或者檔案名稱</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>該項目被命中的次數 (從共享記憶體區載入)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>項目依然被其他程序佔用的引用次數</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>項目在共享記憶體裡佔用位元數</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>與本項目相同 PHP 內容的个數</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>原始檔案大小</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>原始檔案最後修改時間</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>原始檔案所在設備ID</dd>
<dt><?php echo _T('inode'); ?>: </dt><dd>原始檔案的inode</dd>
<dt><?php echo _T('Access'); ?>: </dt><dd>最後存取該項目的時間</dd>
<dt><?php echo _T('Create'); ?>: </dt><dd>該項目被建立於共享內的時間</dd>
<dt>编译错误: </dt> <dd><a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
<dt>只读保护: </dt> <dd><a href="http://xcache.lighttpd.net/wiki/ReadonlyProtection">ReadonlyProtection</a></dd>
</dl>

6
mod_cacher/htdocs/help.php

@ -13,7 +13,7 @@ HEAD;
?>
<link rel="stylesheet" type="text/css" href="xcache.css" />
<title><?php echo _T('XCache Administration Help'); ?></title>
<title><?php echo _('XCache Help'); ?></title>
<script>
function toggle(o)
{
@ -23,11 +23,11 @@ HEAD;
</head>
<body>
<h1><?php echo _T('XCache Administration Help'); ?></h1>
<h1><?php echo _('XCache Help'); ?></h1>
<div id1="help">
<?php include(get_language_file("help")); ?>
</div>
<?php echo _T('See also'); ?>: <a href="http://xcache.lighttpd.net/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://xcache.lighttpd.net/">XCache wiki</a>
<?php echo _('See also'); ?>: <a href="http://xcache.lighttpd.net/wiki/PhpIni">Setting php.ini for XCache</a> @ <a href="http://xcache.lighttpd.net/">XCache wiki</a>
</body>
</html>

20
mod_cacher/htdocs/xcache.php

@ -192,6 +192,20 @@ function switcher($name, $options)
return implode('', $html);
}
function th($name, $attrs = null)
{
$translated = __($name);
if ($translated == $name) {
$translated = "$name|$name";
}
list($text, $title) = explode('|', $translated, 2);
return sprintf('%s<th%s id="%s" title="%s"><a href="javascript:" onclick="resort(this); return false">%s</a></th>%s'
, "\t"
, $attrs ? " $attrs" : ""
, $name, htmlspecialchars(trim($title)), trim($text)
, "\n");
}
if (!extension_loaded('XCache')) {
echo '<h1>XCache is not loaded</h1>';
ob_start();
@ -270,7 +284,7 @@ for ($i = 0; $i < $pcnt; $i ++) {
if ($pcnt >= 2) {
$total['type'] = XC_TYPE_PHP;
$total['cache_name'] = _T('Total');
$total['cache_name'] = _('Total');
$total['cacheid'] = -1;
$total['gc'] = null;
$total['istotal'] = true;
@ -294,7 +308,7 @@ for ($i = 0; $i < $vcnt; $i ++) {
if ($vcnt >= 2) {
$total['type'] = XC_TYPE_VAR;
$total['cache_name'] = _T('Total');
$total['cache_name'] = _('Total');
$total['cacheid'] = -1;
$total['gc'] = null;
$total['istotal'] = true;
@ -366,7 +380,7 @@ default:
$type_php = XC_TYPE_PHP;
$type_var = XC_TYPE_VAR;
$types = array($type_none => _T('Statistics'), $type_php => _T('List PHP'), $type_var => _T('List Var Data'));
$types = array($type_none => _('Statistics'), $type_php => _('List PHP'), $type_var => _('List Var Data'));
$php_version = phpversion();
$xcache_version = XCACHE_VERSION;
$xcache_modules = XCACHE_MODULES;

142
mod_cacher/htdocs/xcache.tpl.php

@ -1,14 +1,14 @@
<?php include("header.tpl.php"); ?>
<div id="help">
<a href="help.php"><?php echo _T("Help") ?> &raquo;</a>
<a href="help.php"><?php echo _("Help") ?> &raquo;</a>
</div>
<div class="switcher"><?php echo switcher("type", $types); ?></div>
<?php
$a = new Cycle('class="col1"', 'class="col2"');
$b = new Cycle('class="col1"', 'class="col2"');
?>
<table cellspacing="0" cellpadding="4" class="cycles">
<caption><?php echo _T('Caches'); ?></caption>
<table cellspacing="0" cellpadding="4" class="cycles caches">
<caption><?php echo _('Caches'); ?></caption>
<col />
<col align="right" />
<col align="right" />
@ -28,30 +28,33 @@ $b = new Cycle('class="col1"', 'class="col2"');
<col align="right" />
<col />
<tr <?php echo $a->next(); ?>>
<th>-</th>
<th><?php echo _T('Slots'); ?></th>
<th><?php echo _T('Size'); ?></th>
<th><?php echo _T('Avail'); ?></th>
<th><?php echo _T($config['percent_graph_type'] == 'free' ? '% Free' : '% Used'); ?></th>
<th><?php echo _T('Clear'); ?></th>
<th><?php echo _T('Compiling'); ?></th>
<th><?php echo _T('Hits'); ?></th>
<th><?php echo _T('Hits/H'); ?></th>
<th><?php echo _T('Hits 24H'); ?></th>
<th><?php echo _T('Hits/S'); ?></th>
<th><?php echo _T('Updates'); ?></th>
<th><?php echo _T('Clogs'); ?></th>
<th><?php echo _T('OOMs'); ?></th>
<th><?php echo _T('Errors'); ?></th>
<th><?php echo _T('Protected'); ?></th>
<th><?php echo _T('Cached'); ?></th>
<th><?php echo _T('Deleted'); ?></th>
<th><?php echo _T('GC'); ?></th>
<?php echo
th(N_("cache.cache"))
, th(N_("cache.size"))
, th(N_("cache.avail"))
, th(N_("cache.used"))
, th(N_("cache.blocksgraph"))
, th(N_("cache.operations"))
, th(N_("cache.compiling"))
, th(N_("cache.hits"))
, th(N_("cache.hits_graph"))
, th(N_("cache.hits_avg_h"))
, th(N_("cache.hits_avg_s"))
, th(N_("cache.updates"))
, th(N_("cache.clogs"))
, th(N_("cache.ooms"))
, th(N_("cache.errors"))
, th(N_("cache.readonly_protected"))
, th(N_("cache.cached"))
, th(N_("cache.deleted"))
, th(N_("cache.gc_timer"))
;
?>
</tr>
<?php
$numkeys = explode(',', 'slots,size,avail,hits,updates,clogs,ooms,errors,cached,deleted');
$l_clear = _T('Clear');
$l_clear_confirm = _T('Sure to clear?');
$l_clear = _('Clear');
$l_clear_confirm = _('Sure to clear?');
foreach ($cacheinfos as $i => $ci) {
echo "
<tr ", $a->next(), ">";
@ -113,8 +116,8 @@ $b = new Cycle('class="col1"', 'class="col2"');
></td>
<td>{$ci['compiling']}</td>
<td>{$ci['hits']}</td>
<td>{$hits_avg_h}</td>
<td><div class="hitsgraph" style="width: {$hits_graph_h_w}px">{$hits_graph_h}</div></td>
<td>{$hits_avg_h}</td>
<td>{$hits_avg_s}</td>
<td>{$ci['updates']}</td>
<td>{$ci['clogs']}</td>
@ -132,13 +135,13 @@ EOS;
<?php } ?>
</table>
<div class="blockarea legends">
<div class="legendtitle"><?php echo _T('Legends:'); ?></div>
<div class="legendtitle"><?php echo _('Legends:'); ?></div>
<div class="legend pvalue">&nbsp;&nbsp;</div>
<div class="legendtitle"><?php echo _T($config['percent_graph_type'] == 'free' ? '% Free' : '% Used'); ?></div>
<div class="legendtitle"><?php echo _($config['percent_graph_type'] == 'free' ? '% Free' : '% Used'); ?></div>
<div class="legend" style="background: rgb(0,0,255)">&nbsp;&nbsp;</div>
<div class="legendtitle"><?php echo _T($config['percent_graph_type'] == 'free' ? 'Free Blocks' : 'Used Blocks'); ?></div>
<div class="legendtitle"><?php echo _($config['percent_graph_type'] == 'free' ? 'Free Blocks' : 'Used Blocks'); ?></div>
<div class="legend" style="background: rgb(255,0,0)">&nbsp;&nbsp;</div>
<div class="legendtitle"><?php echo _T('Hits'); ?></div>
<div class="legendtitle"><?php echo _('Hits'); ?></div>
</div>
<?php
@ -151,35 +154,58 @@ if ($cachelist) {
<form action="" method="post">
<table cellspacing="0" cellpadding="4" class="cycles entries" width="100%">
<caption><?php echo _T("{$cachelist['type_name']} $listname"); ?></caption>
<caption><?php echo _("{$cachelist['type_name']} $listname"); ?></caption>
<?php
echo "
<tr ", $a->next(), ">";
?>
<?php if (!$isphp) { ?>
<th width="20">R</th>
<?php } ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Cache'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('entry'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Hits'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Size'); ?></a></th>
<?php if ($isphp) { ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Refcount'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('PhpShared'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('SrcSize'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Modify'); ?></a></th>
<?php if ($haveinode) { ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('device'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('inode'); ?></a></th>
<?php } ?>
<?php } ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('hash'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Access'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Create'); ?></a></th>
<?php if ($listname == 'Deleted') { ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Delete'); ?></a></th>
<?php } ?>
<?php
if ($isphp) {
echo
th("entry.id")
;
}
else {
echo
th("entry.remove", 'width="20"')
;
}
echo
th(N_("entry.name"))
, th(N_("entry.hits"))
, th(N_("entry.size"))
;
if ($isphp) {
echo
th(N_("entry.refcount"))
, th(N_("entry.phprefcount"))
, th(N_("entry.class_cnt"))
, th(N_("entry.function_cnt"))
, th(N_("entry.file_size"))
, th(N_("entry.file_mtime"))
;
if ($haveinode) {
echo
th(N_("entry.file_device"))
, th(N_("entry.file_inode"))
;
}
}
echo
th(N_("entry.hash"))
, th(N_("entry.atime"))
, th(N_("entry.ctime"))
;
if ($listname == 'Deleted') {
echo
th(N_("entry.delete"))
;
}
?>
</tr>
<?php
foreach ($entries as $i => $entry) {
@ -188,9 +214,11 @@ if ($cachelist) {
$name = htmlspecialchars($entry['name']);
$hits = number_format($entry['hits']);
$size = size($entry['size']);
$class_cnt = number_format($entry['class_cnt']);
$function_cnt = number_format($entry['function_cnt']);
if ($isphp) {
$file_size = size($entry['file_size']);
$phprefcount = number_format($entry['phprefcount']);
$file_size = size($entry['file_size']);
}
if ($isphp) {
@ -224,6 +252,8 @@ ENTRY;
echo <<<ENTRY
<td align="right" int="{$entry['refcount']}">{$entry['refcount']}</td>
<td align="right" int="{$entry['phprefcount']}">{$phprefcount}</td>
<td align="right" int="{$entry['class_cnt']}">{$class_cnt}</td>
<td align="right" int="{$entry['function_cnt']}">{$function_cnt}</td>
<td align="right" int="{$entry['file_size']}">{$file_size}</td>
<td align="right" int="{$entry['file_mtime']}">{$file_mtime}</td>
ENTRY;
@ -253,7 +283,7 @@ ENTRY;
</table>
<?php if (!$isphp) { ?>
<input type="submit" value="<?php echo _T("Remove Selected"); ?>">
<input type="submit" value="<?php echo _("Remove Selected"); ?>">
<?php } ?>
</form>
<?php
@ -261,7 +291,7 @@ ENTRY;
ob_end_flush();
}
if ($moduleinfo) {
$t_moduleinfo = _T("Module Info");
$t_moduleinfo = _("Module Info");
echo <<<HTML
<h2>$t_moduleinfo</h2>
<div class="moduleinfo">$moduleinfo</div>

Loading…
Cancel
Save