mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 15:30:58 +01:00
Display correct size of binary files in Diffusion
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/image/header_logo.png Reviewers: btrahan, epriestley Reviewed By: btrahan CC: aran, Korvin Maniphest Tasks: T1139 Differential Revision: https://secure.phabricator.com/D3961
This commit is contained in:
parent
ede1f4721f
commit
abd880e30f
2 changed files with 9 additions and 2 deletions
|
@ -885,9 +885,11 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
private function buildBinaryCorpus($file_uri, $data) {
|
||||
$properties = new PhabricatorPropertyListView();
|
||||
|
||||
$size = strlen($data);
|
||||
$properties->addTextContent(
|
||||
pht('This is a binary file. It is %d bytes in length.',
|
||||
number_format(strlen($data)))
|
||||
pht('This is a binary file. It is %2$s byte(s) in length.',
|
||||
$size,
|
||||
PhutilTranslator::getInstance()->formatNumber($size))
|
||||
);
|
||||
|
||||
$actions = id(new PhabricatorActionListView())
|
||||
|
|
|
@ -167,6 +167,11 @@ abstract class PhabricatorBaseEnglishTranslation
|
|||
'%d Lint Messages',
|
||||
),
|
||||
|
||||
'This is a binary file. It is %2$s byte(s) in length.' => array(
|
||||
'This is a binary file. It is %2$s byte in length.',
|
||||
'This is a binary file. It is %2$s bytes in length.',
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue