mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +01:00
Fix Paste translation
Summary: This syntax is extremely stupid, I'll probably rewrite it later. Test Plan: pht('%s Line(s)', number_format(1000)); Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4272
This commit is contained in:
parent
8f0bab73ef
commit
1c2e7e5daa
2 changed files with 8 additions and 4 deletions
|
@ -93,13 +93,17 @@ final class PhabricatorPasteListController extends PhabricatorPasteController {
|
||||||
$source_code);
|
$source_code);
|
||||||
|
|
||||||
$line_count = count(explode("\n", $paste->getContent()));
|
$line_count = count(explode("\n", $paste->getContent()));
|
||||||
|
$line_count = pht(
|
||||||
|
'%2$s Line(s)',
|
||||||
|
$line_count,
|
||||||
|
PhutilTranslator::getInstance()->formatNumber($line_count));
|
||||||
|
|
||||||
$item = id(new PhabricatorObjectItemView())
|
$item = id(new PhabricatorObjectItemView())
|
||||||
->setHeader($paste->getFullName())
|
->setHeader($paste->getFullName())
|
||||||
->setHref('/P'.$paste->getID())
|
->setHref('/P'.$paste->getID())
|
||||||
->setObject($paste)
|
->setObject($paste)
|
||||||
->addAttribute(pht('Created %s by %s', $created, $author))
|
->addAttribute(pht('Created %s by %s', $created, $author))
|
||||||
->addIcon('none', pht('%s Line(s)', number_format($line_count)))
|
->addIcon('none', $line_count)
|
||||||
->appendChild($source_code);
|
->appendChild($source_code);
|
||||||
|
|
||||||
$lang_name = $paste->getLanguage();
|
$lang_name = $paste->getLanguage();
|
||||||
|
|
|
@ -193,9 +193,9 @@ abstract class PhabricatorBaseEnglishTranslation
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
'%s Line(s)' => array(
|
'%2$s Line(s)' => array(
|
||||||
'%s Line',
|
'%2$s Line',
|
||||||
'%s Lines',
|
'%2$s Lines',
|
||||||
),
|
),
|
||||||
|
|
||||||
"Indexing %d object(s) of type %s." => array(
|
"Indexing %d object(s) of type %s." => array(
|
||||||
|
|
Loading…
Reference in a new issue