recognize gb2312/gbk/gb18030 as gb2312. gb2312 lang file for coverager
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@182 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
c55a3bddf4
commit
ce81573230
|
@ -2,18 +2,28 @@
|
|||
|
||||
function get_language_file_ex($name, $l, $s)
|
||||
{
|
||||
static $map = array(
|
||||
static $lmap = array(
|
||||
'zh' => 'zh-simplified',
|
||||
'zh-hk' => 'zh-traditional',
|
||||
'zh-tw' => 'zh-traditional',
|
||||
);
|
||||
static $smap = array(
|
||||
'gbk' => 'gb2312',
|
||||
'gb18030' => 'gb2312',
|
||||
);
|
||||
|
||||
if (isset($map[$l])) {
|
||||
$l = $map[$l];
|
||||
if (isset($lmap[$l])) {
|
||||
$l = $lmap[$l];
|
||||
}
|
||||
if (file_exists($file = "$name-$l-$s.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
if (isset($smap[$s])) {
|
||||
$s = $smap[$s];
|
||||
if (file_exists($file = "$name-$l-$s.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
if (file_exists($file = "$name-$l.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
$strings = array(
|
||||
'root'
|
||||
=> '开始',
|
||||
'Directory'
|
||||
=> '目录',
|
||||
'File'
|
||||
=> '文件',
|
||||
'Percent'
|
||||
=> '覆盖率',
|
||||
'Hits'
|
||||
=> '命中',
|
||||
'Lines'
|
||||
=> '行数',
|
||||
'TODO'
|
||||
=> '闲置文件',
|
||||
'XCache PHP Code Coverage Viewer'
|
||||
=> 'XCache PHP 代码覆盖查看器',
|
||||
'module'
|
||||
=> '模块',
|
||||
''
|
||||
=> '',
|
||||
);
|
||||
|
|
@ -2,18 +2,28 @@
|
|||
|
||||
function get_language_file_ex($name, $l, $s)
|
||||
{
|
||||
static $map = array(
|
||||
static $lmap = array(
|
||||
'zh' => 'zh-simplified',
|
||||
'zh-hk' => 'zh-traditional',
|
||||
'zh-tw' => 'zh-traditional',
|
||||
);
|
||||
static $smap = array(
|
||||
'gbk' => 'gb2312',
|
||||
'gb18030' => 'gb2312',
|
||||
);
|
||||
|
||||
if (isset($map[$l])) {
|
||||
$l = $map[$l];
|
||||
if (isset($lmap[$l])) {
|
||||
$l = $lmap[$l];
|
||||
}
|
||||
if (file_exists($file = "$name-$l-$s.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
if (isset($smap[$s])) {
|
||||
$s = $smap[$s];
|
||||
if (file_exists($file = "$name-$l-$s.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
if (file_exists($file = "$name-$l.lang.php")) {
|
||||
return $file;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue