mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
Use PhutilNumber in translations
Summary: It's a little bit confusing that you couldn't use %d but kind of expected taken that the number will be formatted so it's not a number anymore. Test Plan: /paste/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4764
This commit is contained in:
parent
356c300086
commit
01236dcaf0
4 changed files with 13 additions and 16 deletions
|
@ -182,10 +182,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$warning->appendChild(
|
||||
pht(
|
||||
'This diff is very large and affects %2$s files. Load each file '.
|
||||
'This diff is very large and affects %s files. Load each file '.
|
||||
'individually.',
|
||||
$count,
|
||||
PhutilTranslator::getInstance()->formatNumber($count)).
|
||||
new PhutilNumber($count)).
|
||||
" <strong>".
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
|
|
|
@ -807,10 +807,9 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
|
||||
$size = strlen($data);
|
||||
$properties->addTextContent(
|
||||
pht('This is a binary file. It is %2$s byte(s) in length.',
|
||||
$size,
|
||||
PhutilTranslator::getInstance()->formatNumber($size))
|
||||
);
|
||||
pht(
|
||||
'This is a binary file. It is %s byte(s) in length.',
|
||||
new PhutilNumber($size)));
|
||||
|
||||
$actions = id(new PhabricatorActionListView())
|
||||
->setUser($this->getRequest()->getUser())
|
||||
|
|
|
@ -94,9 +94,8 @@ final class PhabricatorPasteListController extends PhabricatorPasteController {
|
|||
|
||||
$line_count = count(explode("\n", $paste->getContent()));
|
||||
$line_count = pht(
|
||||
'%2$s Line(s)',
|
||||
$line_count,
|
||||
PhutilTranslator::getInstance()->formatNumber($line_count));
|
||||
'%s Line(s)',
|
||||
new PhutilNumber($line_count));
|
||||
|
||||
$item = id(new PhabricatorObjectItemView())
|
||||
->setHeader($paste->getFullName())
|
||||
|
|
|
@ -167,9 +167,9 @@ 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.',
|
||||
'This is a binary file. It is %s byte(s) in length.' => array(
|
||||
'This is a binary file. It is %s byte in length.',
|
||||
'This is a binary file. It is %s bytes in length.',
|
||||
),
|
||||
|
||||
'%d Action(s) Have No Effect' => array(
|
||||
|
@ -226,9 +226,9 @@ abstract class PhabricatorBaseEnglishTranslation
|
|||
),
|
||||
),
|
||||
|
||||
'%2$s Line(s)' => array(
|
||||
'%2$s Line',
|
||||
'%2$s Lines',
|
||||
'%s Line(s)' => array(
|
||||
'%s Line',
|
||||
'%s Lines',
|
||||
),
|
||||
|
||||
"Indexing %d object(s) of type %s." => array(
|
||||
|
|
Loading…
Reference in a new issue