* Finish task#40815.

This commit is contained in:
qiyu-xie
2021-08-03 14:30:50 +08:00
parent 20841b5552
commit d60da49f27
5 changed files with 8 additions and 11 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'Url';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
$lang->doc->ge = ':';
$lang->doc->point = '.';
+1 -1
View File
@@ -211,7 +211,7 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
$lang->doc->ge = ':';
$lang->doc->point = '.';
+1 -1
View File
@@ -206,7 +206,7 @@ $lang->doc->noticeAcl['doc']['private'] = 'Seulement celui qui a ajouté le docu
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
$lang->doc->ge = ':';
$lang->doc->point = '.';
+1 -1
View File
@@ -206,7 +206,7 @@ $lang->doc->noticeAcl['doc']['private'] = 'Chỉ the one who created it có th
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
$lang->doc->ge = ':';
$lang->doc->point = '.';
+4 -7
View File
@@ -2219,30 +2219,27 @@ EOT;
/* Unit conversion. */
$i = 0;
while($sizeCount > 1024)
while($sizeCount > 1024 and $i <= 4)
{
$sizeCount = $sizeCount / 1024;
$i ++;
}
$unitList = array('B', 'K', 'M', 'G');
$unitList = array('B', 'K', 'M', 'G', 'T');
$sizeCount = round($sizeCount, 1) . $unitList[$i];
/* Summary of each type. */
$extensionNum = count($extensionCount);
foreach($extensionCount as $extension => $count)
{
if(in_array($this->app->getClientLang(), ['zh-cn','zh-tw']))
{
$extensionSummary .= $extension . ' ' . $count . $this->lang->doc->ge;
$extensionNum--;
if(!empty($extensionNum)) $extensionSummary .= $this->lang->doc->point;
$extensionSummary .= $extension . ' ' . $count . $this->lang->doc->ge . $this->lang->doc->point;
}
else
{
$extensionSummary .= $extension . ' ' . $this->lang->doc->ge . ' ' . $count . $this->lang->doc->point;
}
}
$extensionSummary = rtrim($extensionSummary, $this->lang->doc->point);
return sprintf($this->lang->doc->summary, $filesCount, $sizeCount, $extensionSummary);
}