From a9fb828635b298c13acafeb70d2fa91ccd7cdeee Mon Sep 17 00:00:00 2001 From: vrana Date: Mon, 28 Jan 2013 13:32:56 -0800 Subject: [PATCH] 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 --- .../controller/DifferentialRevisionViewController.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 9cbead02b4..1dffc8ff1b 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -176,14 +176,17 @@ final class DifferentialRevisionViewController extends DifferentialController { $limit = 100; $large = $request->getStr('large'); if (count($changesets) > $limit && !$large) { - $count = number_format(count($changesets)); + $count = count($changesets); $warning = new AphrontErrorView(); $warning->setTitle('Very Large Diff'); $warning->setSeverity(AphrontErrorView::SEVERITY_WARNING); $warning->appendChild( - '

'.pht('This diff is very large and affects %d files. Load '. - 'each file individually. ', $count). - "". + pht( + 'This diff is very large and affects %2$s files. Load each file '. + 'individually.', + $count, + PhutilTranslator::getInstance()->formatNumber($count)). + " ". phutil_render_tag( 'a', array(