1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-24 05:28:18 +01:00

Display proper number in too large diff

Summary: Also avoid trailing space in translation.

Test Plan: Displayed diff with 7000 files.

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4705
This commit is contained in:
vrana 2013-01-28 13:32:56 -08:00
parent 8ac1afc81a
commit a9fb828635

View file

@ -176,14 +176,17 @@ final class DifferentialRevisionViewController extends DifferentialController {
$limit = 100; $limit = 100;
$large = $request->getStr('large'); $large = $request->getStr('large');
if (count($changesets) > $limit && !$large) { if (count($changesets) > $limit && !$large) {
$count = number_format(count($changesets)); $count = count($changesets);
$warning = new AphrontErrorView(); $warning = new AphrontErrorView();
$warning->setTitle('Very Large Diff'); $warning->setTitle('Very Large Diff');
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING); $warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
$warning->appendChild( $warning->appendChild(
'<p>'.pht('This diff is very large and affects %d files. Load '. pht(
'each file individually. ', $count). 'This diff is very large and affects %2$s files. Load each file '.
"<strong>". 'individually.',
$count,
PhutilTranslator::getInstance()->formatNumber($count)).
" <strong>".
phutil_render_tag( phutil_render_tag(
'a', 'a',
array( array(