1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 07:20:57 +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:
vrana 2012-12-21 14:31:55 -08:00
parent 8f0bab73ef
commit 1c2e7e5daa
2 changed files with 8 additions and 4 deletions

View file

@ -93,13 +93,17 @@ final class PhabricatorPasteListController extends PhabricatorPasteController {
$source_code);
$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())
->setHeader($paste->getFullName())
->setHref('/P'.$paste->getID())
->setObject($paste)
->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);
$lang_name = $paste->getLanguage();

View file

@ -193,9 +193,9 @@ abstract class PhabricatorBaseEnglishTranslation
),
),
'%s Line(s)' => array(
'%s Line',
'%s Lines',
'%2$s Line(s)' => array(
'%2$s Line',
'%2$s Lines',
),
"Indexing %d object(s) of type %s." => array(