1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 04:42:40 +01:00

Various translation improvements

Summary: Depends on D14070.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D14073
This commit is contained in:
Joshua Spence 2015-11-03 06:54:38 +11:00
parent 495cb7a2e0
commit c35b564f4d
53 changed files with 217 additions and 142 deletions

View file

@ -102,7 +102,7 @@ function commit_symbols(
$repository->getPHID());
}
echo pht('Loading %s symbols...', new PhutilNumber(count($sql))), "\n";
echo pht('Loading %s symbols...', phutil_count($sql)), "\n";
foreach (array_chunk($sql, 128) as $chunk) {
queryfx(
$conn_w,

View file

@ -109,7 +109,7 @@ final class PhabricatorAuthListController
'only users with a verified email address at one of these %s '.
'allowed domain(s) will be able to register an account: %s',
$domains_link,
new PhutilNumber(count($domains_value)),
phutil_count($domains_value),
phutil_tag('strong', array(), implode(', ', $domains_value)));
} else {
$issues[] = pht(

View file

@ -78,7 +78,7 @@ final class PhabricatorAuthManagementRefreshWorkflow
"%s\n",
pht(
'Found %s account(s) to refresh.',
new PhutilNumber(count($accounts))));
phutil_count($accounts)));
}
$providers = PhabricatorAuthProvider::getAllEnabledProviders();

View file

@ -18,7 +18,7 @@ final class CelerityManagementMapWorkflow
$this->log(
pht(
'Rebuilding %d resource source(s).',
new PhutilNumber(count($resources_map))));
phutil_count($resources_map)));
foreach ($resources_map as $name => $resources) {
$this->rebuildResources($resources);

View file

@ -115,7 +115,7 @@ final class PhabricatorDaemonsSetupCheck extends PhabricatorSetupCheck {
$list_section = array(
pht(
'The configurations differ in the following %s way(s):',
new PhutilNumber(count($issues))),
phutil_count($issues)),
phutil_tag(
'ul',
array(),

View file

@ -111,7 +111,7 @@ final class PhabricatorPathSetupCheck extends PhabricatorSetupCheck {
$this
->newIssue('config.PATH.'.$digest)
->setName(pht('$PATH Component Unusable'))
->setName(pht('%s Component Unusable', '$PATH'))
->setSummary(
pht(
'A component of the configured PATH can not be used by '.

View file

@ -387,7 +387,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
array(),
pht(
'PHP also loaded these %s configuration file(s):',
new PhutilNumber(count($more_loc))));
phutil_count($more_loc)));
$info[] = phutil_tag(
'pre',
array(),

View file

@ -29,14 +29,13 @@ final class ConpherenceUpdateThreadConduitAPIMethod
protected function defineErrorTypes() {
return array(
'ERR_USAGE_NO_ROOM_ID' => pht(
'You must specify a room id or room phid to query transactions '.
'from.'),
'You must specify a room ID or room PHID to query transactions from.'),
'ERR_USAGE_ROOM_NOT_FOUND' => pht(
'room does not exist or logged in user can not see it.'),
'Room does not exist or logged in user can not see it.'),
'ERR_USAGE_ONLY_SELF_REMOVE' => pht(
'Only a user can remove themselves from a room.'),
'ERR_USAGE_NO_UPDATES' => pht(
'You must specify data that actually updates the conpherence.'),
'You must specify data that actually updates the Conpherence.'),
);
}

View file

@ -325,8 +325,7 @@ final class ConpherenceUpdateController
$remove_person = $request->getStr('remove_person');
$participants = $conpherence->getParticipants();
$message = pht(
'Are you sure you want to leave this room?');
$message = pht('Are you sure you want to leave this room?');
$test_conpherence = clone $conpherence;
$test_conpherence->attachParticipants(array());
if (!PhabricatorPolicyFilter::hasCapability(
@ -334,17 +333,14 @@ final class ConpherenceUpdateController
$test_conpherence,
PhabricatorPolicyCapability::CAN_VIEW)) {
if (count($participants) == 1) {
$message .= pht(
' The room will be inaccessible forever and ever.');
$message .= ' '.pht('The room will be inaccessible forever and ever.');
} else {
$message .= pht(
' Someone else in the room can add you back later.');
$message .= ' '.pht('Someone else in the room can add you back later.');
}
}
$body = phutil_tag(
'p',
array(
),
array(),
$message);
require_celerity_resource('conpherence-update-css');

View file

@ -77,14 +77,14 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
count($rem));
} else if ($add) {
$title = pht(
'%s added %d files(s).',
'%s added %s files(s).',
$this->renderHandleLink($author_phid),
count($add));
phutil_count($add));
} else {
$title = pht(
'%s removed %d file(s).',
'%s removed %s file(s).',
$this->renderHandleLink($author_phid),
count($rem));
phutil_count($rem));
}
return $title;
break;

View file

@ -226,7 +226,9 @@ abstract class PhabricatorDaemonManagementWorkflow
// Retry without sudo
$console->writeOut(
"%s\n",
pht('sudo command failed. Starting daemon as current user.'));
pht(
'%s command failed. Starting daemon as current user.',
'sudo'));
$this->executeDaemonLaunchCommand(
$command,
$daemon_script_dir,
@ -265,8 +267,9 @@ abstract class PhabricatorDaemonManagementWorkflow
if (preg_match('/sudo: a password is required/', $stderr)) {
throw new Exception(
pht(
'sudo exited with a zero exit code, but emitted output '.
'consistent with failure under OSX.'));
'%s exited with a zero exit code, but emitted output '.
'consistent with failure under OSX.',
'sudo'));
}
}
}

View file

@ -218,21 +218,21 @@ final class DifferentialJIRAIssuesField
return pht(
'%s updated JIRA issue(s): added %d %s; removed %d %s.',
$xaction->renderHandleLink($author_phid),
new PhutilNumber(count($add)),
phutil_count($add),
implode(', ', $add),
new PhutilNumber(count($rem)),
phutil_count($rem),
implode(', ', $rem));
} else if ($add) {
return pht(
'%s added %d JIRA issue(s): %s.',
$xaction->renderHandleLink($author_phid),
new PhutilNumber(count($add)),
phutil_count($add),
implode(', ', $add));
} else if ($rem) {
return pht(
'%s removed %d JIRA issue(s): %s.',
$xaction->renderHandleLink($author_phid),
new PhutilNumber(count($rem)),
phutil_count($rem),
implode(', ', $rem));
}

View file

@ -125,7 +125,7 @@ final class DifferentialUnitField
)) + $groups;
foreach ($groups as $result => $group) {
$count = new PhutilNumber(count($group));
$count = phutil_count($group);
switch ($result) {
case ArcanistUnitTestResult::RESULT_PASS:
$note[] = pht('%s Passed Test(s)', $count);

View file

@ -135,12 +135,12 @@ abstract class DifferentialReviewersHeraldAction
case self::DO_ADD_REVIEWERS:
return pht(
'Added %s reviewer(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_ADD_BLOCKING_REVIEWERS:
return pht(
'Added %s blocking reviewer(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -81,14 +81,14 @@ final class DifferentialCreateMailReceiver extends PhabricatorMailReceiver {
} else {
$subject = pht(
'Diff creation failed; see body for %s error(s).',
new PhutilNumber(count($errors)));
phutil_count($errors));
}
$body = new PhabricatorMetaMTAMailBody();
$body->addRawSection($subject);
if (count($diffs)) {
$text_body = '';
$html_body = array();
$body_label = pht('%s DIFF LINK(S)', new PhutilNumber(count($diffs)));
$body_label = pht('%s DIFF LINK(S)', phutil_count($diffs));
foreach ($diffs as $filename => $diff_uri) {
$text_body .= $filename.': '.$diff_uri."\n";
$html_body[] = phutil_tag(
@ -105,7 +105,7 @@ final class DifferentialCreateMailReceiver extends PhabricatorMailReceiver {
if (count($errors)) {
$body_section = new PhabricatorMetaMTAMailSection();
$body_label = pht('%s ERROR(S)', new PhutilNumber(count($errors)));
$body_label = pht('%s ERROR(S)', phutil_count($errors));
foreach ($errors as $error) {
$body_section->addFragment($error);
}

View file

@ -68,7 +68,7 @@ abstract class DiffusionAuditorsHeraldAction
case self::DO_ADD_AUDITORS:
return pht(
'Added %s auditor(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -152,8 +152,8 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
$atom->addWarning(
pht(
'This call takes %s parameter(s), but only %s are documented.',
new PhutilNumber(count($params)),
new PhutilNumber(count($docs))));
phutil_count($params),
phutil_count($docs)));
}
}

View file

@ -140,14 +140,14 @@ abstract class DivinerPublisher extends Phobject {
"%s\n",
pht(
'Deleting %s document(s).',
new PhutilNumber(count($deleted))));
phutil_count($deleted)));
$this->deleteDocumentsByHash($deleted);
$console->writeOut(
"%s\n",
pht(
'Creating %s document(s).',
new PhutilNumber(count($created))));
phutil_count($created)));
$this->createDocumentsByHash($created);
}

View file

@ -69,7 +69,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
'.book',
'--book <book>'));
} else {
$this->log(pht('Found %s book(s).', new PhutilNumber(count($books))));
$this->log(pht('Found %s book(s).', phutil_count($books)));
}
}
@ -224,26 +224,26 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
$this->log(
pht(
'Found %s file(s) in project.',
new PhutilNumber(count($file_hashes))));
phutil_count($file_hashes)));
$this->deleteDeadAtoms($file_hashes);
$atomize = $this->getFilesToAtomize($file_hashes);
$this->log(
pht(
'Found %s unatomized, uncached file(s).',
new PhutilNumber(count($atomize))));
phutil_count($atomize)));
$file_atomizers = $this->getAtomizersForFiles($atomize);
$this->log(
pht(
'Found %s file(s) to atomize.',
new PhutilNumber(count($file_atomizers))));
phutil_count($file_atomizers)));
$futures = $this->buildAtomizerFutures($file_atomizers);
$this->log(
pht(
'Atomizing %s file(s).',
new PhutilNumber(count($file_atomizers))));
phutil_count($file_atomizers)));
if ($futures) {
$this->resolveAtomizerFutures($futures, $file_hashes);
@ -452,7 +452,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
$this->log(
pht(
'Found %s obsolete atom(s) in graph.',
new PhutilNumber(count($del_atoms))));
phutil_count($del_atoms)));
foreach ($del_atoms as $nhash => $shash) {
$atom_cache->deleteSymbol($nhash);
@ -466,7 +466,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
$this->log(
pht(
'Found %s new atom(s) in graph.',
new PhutilNumber(count($new_atoms))));
phutil_count($new_atoms)));
foreach ($new_atoms as $nhash => $ignored) {
$shash = $this->computeSymbolHash($nhash);
@ -505,7 +505,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
$this->log(
pht(
'Found %s affected atoms.',
new PhutilNumber(count($dirty_nhashes))));
phutil_count($dirty_nhashes)));
foreach ($dirty_nhashes as $nhash => $ignored) {
$atom_cache->addGraph($nhash, $this->computeGraphHash($nhash));

View file

@ -96,8 +96,11 @@ final class PhabricatorAsanaConfigOptions
}
$out = array();
$out[] = pht('| Workspace ID | Workspace Name |');
$out[] = '| ------------ | -------------- |';
$out[] = sprintf(
'| %s | %s |',
pht('Workspace ID'),
pht('Workspace Name'));
$out[] = '| ------------ | -------------- |';
foreach ($workspaces as $workspace) {
$out[] = sprintf('| `%s` | `%s` |', $workspace['id'], $workspace['name']);
}

View file

@ -557,7 +557,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
'Failed to fetch remote URI "%s" after following %s redirect(s) '.
'(%s): %s',
$uri,
new PhutilNumber(count($redirects)),
phutil_count($redirects),
implode(' > ', array_keys($redirects)),
$ex->getMessage()),
$ex);

View file

@ -37,7 +37,7 @@ final class HarbormasterSendMessageConduitAPIMethod
$unit_spec = HarbormasterBuildUnitMessage::getParameterSpec();
foreach ($unit_spec as $key => $parameter) {
$type = idx($parameter, 'type');
$type = str_replace('|', pht(' or '), $type);
$type = str_replace('|', ' '.pht('or').' ', $type);
$description = idx($parameter, 'description');
$rows[] = "| `{$key}` | //{$type}// | {$description} |";
}
@ -61,7 +61,7 @@ final class HarbormasterSendMessageConduitAPIMethod
$lint_spec = HarbormasterBuildLintMessage::getParameterSpec();
foreach ($lint_spec as $key => $parameter) {
$type = idx($parameter, 'type');
$type = str_replace('|', pht(' or '), $type);
$type = str_replace('|', ' '.pht('or').' ', $type);
$description = idx($parameter, 'description');
$rows[] = "| `{$key}` | //{$type}// | {$description} |";
}

View file

@ -377,7 +377,7 @@ final class HarbormasterBuildViewController
array(
pht(
'%s empty logs are hidden.',
new PhutilNumber(count($empty_logs))),
phutil_count($empty_logs)),
' ',
javelin_tag(
'a',

View file

@ -231,7 +231,10 @@ final class HarbormasterStepEditController extends HarbormasterController {
'The following variables can be used in most fields. '.
'To reference a variable, use `%s` in a field.',
'${name}');
$rows[] = pht('| Variable | Description |');
$rows[] = sprintf(
'| %s | %s |',
pht('Variable'),
pht('Description'));
$rows[] = '|---|---|';
foreach ($variables as $name => $description) {
$rows[] = '| `'.$name.'` | '.$description.' |';

View file

@ -54,7 +54,7 @@ final class HarbormasterRunBuildPlansHeraldAction
case self::DO_BUILD:
return pht(
'Started %s build(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -346,22 +346,22 @@ abstract class HeraldAction extends Phobject {
case self::DO_STANDARD_NO_EFFECT:
return pht(
'This action has no effect on %s target(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_STANDARD_INVALID:
return pht(
'%s target(s) are invalid or of the wrong type: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_STANDARD_UNLOADABLE:
return pht(
'%s target(s) could not be loaded: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_STANDARD_PERMISSION:
return pht(
'%s target(s) do not have permission to see this object: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_STANDARD_INVALID_ACTION:
return pht(

View file

@ -95,12 +95,12 @@ final class LegalpadRequireSignatureHeraldAction
case self::DO_SIGNED:
return pht(
'%s document(s) are already signed: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_REQUIRED:
return pht(
'Required %s signature(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -546,23 +546,23 @@ final class ManiphestTransaction
$removed = array_diff($old, $new);
if ($added && !$removed) {
return pht(
'%s attached %d file(s): %s.',
'%s attached %s file(s): %s.',
$this->renderHandleLink($author_phid),
count($added),
phutil_count($added),
$this->renderHandleList($added));
} else if ($removed && !$added) {
return pht(
'%s detached %d file(s): %s.',
'%s detached %s file(s): %s.',
$this->renderHandleLink($author_phid),
count($removed),
phutil_count($removed),
$this->renderHandleList($removed));
} else {
return pht(
'%s changed file(s), attached %d: %s; detached %d: %s.',
'%s changed file(s), attached %s: %s; detached %s: %s.',
$this->renderHandleLink($author_phid),
count($added),
phutil_count($added),
$this->renderHandleList($added),
count($removed),
phutil_count($removed),
$this->renderHandleList($removed));
}
@ -585,9 +585,9 @@ final class ManiphestTransaction
case self::TYPE_MERGED_FROM:
return pht(
'%s merged %d task(s): %s.',
'%s merged %s task(s): %s.',
$this->renderHandleLink($author_phid),
count($new),
phutil_count($new),
$this->renderHandleList($new));
break;

View file

@ -82,7 +82,7 @@ final class ManiphestTaskResultListView extends ManiphestView {
$header = id(new PHUIHeaderView())
->addSigil('task-group')
->setMetadata(array('priority' => head($list)->getPriority()))
->setHeader(pht('%s (%s)', $group, new PhutilNumber(count($list))));
->setHeader(pht('%s (%s)', $group, phutil_count($list)));
$lists[] = id(new PHUIObjectBoxView())
->setHeader($header)

View file

@ -75,13 +75,13 @@ abstract class PhabricatorMetaMTAEmailHeraldAction
case self::DO_SEND:
return pht(
'Queued email to be delivered to %s target(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_FORCE:
return pht(
'Queued email to be delivered to %s target(s), ignoring their '.
'notification preferences: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -90,7 +90,7 @@ final class MultimeterSampleController extends MultimeterController {
$events_col = $this->renderGroupingLink(
$group,
'id',
pht('%s Events', new PhutilNumber($row['N'])));
pht('%s Event(s)', new PhutilNumber($row['N'])));
}
if (isset($group['request'])) {

View file

@ -49,9 +49,9 @@ final class PhabricatorPeopleDeleteController
$form = id(new AphrontFormView())
->setUser($admin)
->appendRemarkupInstructions(
pht(
" phabricator/ $ ./bin/remove destroy %s\n",
csprintf('%R', '@'.$user->getUsername())));
csprintf(
" phabricator/ $ ./bin/remove destroy %R\n",
'@'.$user->getUsername()));
return $this->newDialog()
->setWidth(AphrontDialogView::WIDTH_FORM)

View file

@ -156,7 +156,7 @@ final class PholioMockThumbGridView extends AphrontView {
array(
'class' => 'pholio-mock-thumb-grid-comment-count',
),
pht('%s', new PhutilNumber(count($image->getInlineComments()))));
pht('%s', phutil_count($image->getInlineComments())));
}
return javelin_tag(

View file

@ -199,7 +199,9 @@ abstract class PhragmentController extends PhabricatorController {
$alt = PhabricatorEnv::getEnvConfig('security.alternate-file-domain');
if ($alt === null) {
return id(new PHUIInfoView())
->setTitle(pht('security.alternate-file-domain must be configured!'))
->setTitle(pht(
'%s must be configured!',
'security.alternate-file-domain'))
->setSeverity(PHUIInfoView::SEVERITY_ERROR)
->appendChild(
phutil_tag(

View file

@ -292,7 +292,9 @@ final class PonderQuestionViewController extends PonderController {
$item->setObject($question);
$item->addAttribute(
pht('%d Answer(s)', $question->getAnswerCount()));
pht(
'%s Answer(s)',
new PhutilNumber($question->getAnswerCount())));
$list->addItem($item);
}

View file

@ -134,11 +134,11 @@ final class PonderQuestionSearchEngine
foreach ($questions as $question) {
$color = PonderQuestionStatus::getQuestionStatusTagColor(
$question->getStatus());
$question->getStatus());
$icon = PonderQuestionStatus::getQuestionStatusIcon(
$question->getStatus());
$question->getStatus());
$full_status = PonderQuestionStatus::getQuestionStatusFullName(
$question->getStatus());
$question->getStatus());
$item = new PHUIObjectItemView();
$item->setObjectName('Q'.$question->getID());
$item->setHeader($question->getTitle());
@ -158,7 +158,9 @@ final class PonderQuestionSearchEngine
$handles[$question->getAuthorPHID()]->renderLink()));
$item->addAttribute(
pht('%d Answer(s)', $question->getAnswerCount()));
pht(
'%s Answer(s)',
new PhutilNumber($question->getAnswerCount())));
if ($project_handles) {
$item->addAttribute(

View file

@ -112,12 +112,12 @@ abstract class PhabricatorProjectHeraldAction
case self::DO_ADD_PROJECTS:
return pht(
'Added %s project(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_REMOVE_PROJECTS:
return pht(
'Removed %s project(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -49,7 +49,7 @@ final class ReleephProductEditController extends ReleephProductController {
if (!$product_name) {
$e_name = pht('Required');
$errors[] =
pht('Your releeph product should have a simple descriptive name.');
pht('Your Releeph product should have a simple descriptive name.');
}
if (!$trunk_branch) {

View file

@ -31,6 +31,7 @@ final class ReleephDiffChurnFieldSpecification
$rejections = 0;
$comments = 0;
$updates = 0;
foreach ($xactions as $xaction) {
switch ($xaction->getTransactionType()) {
case PhabricatorTransactions::TYPE_COMMENT:
@ -60,13 +61,13 @@ final class ReleephDiffChurnFieldSpecification
} else {
$parts = array();
if ($rejections) {
$parts[] = pht('%d rejection(s)', $rejections);
$parts[] = pht('%s rejection(s)', new PhutilNumber($rejections));
}
if ($comments) {
$parts[] = pht('%d comment(s)', $comments);
$parts[] = pht('%s comment(s)', new PhutilNumber($comments));
}
if ($updates) {
$parts[] = pht('%d update(s)', $updates);
$parts[] = pht('%s update(s)', new PhutilNumber($updates));
}
if (count($parts) === 0) {

View file

@ -55,7 +55,7 @@ final class ReleephDiffSizeFieldSpecification
$mr_changes['tests']['lines'],
count($mr_changes['tests']['paths']));
foreach ($mr_changes['tests']['paths'] as $mr_test_path) {
$test_blurb .= pht("%s\n", $mr_test_path);
$test_blurb .= sprintf("%s\n", $mr_test_path);
}
$test_tag = javelin_tag(

View file

@ -182,7 +182,9 @@ final class ReleephBranchSearchEngine
$item->setStatusIcon('fa-code-fork orange');
$item->addIcon(
'fa-code-fork',
pht('%d Open Pull Request(s)', new PhutilNumber($open_count)));
pht(
'%s Open Pull Request(s)',
new PhutilNumber($open_count)));
}
$list->addItem($item);

View file

@ -172,7 +172,7 @@ final class PhabricatorRepositoryPullLocalDaemon
pht(
'Not enough process slots to schedule the other %s '.
'repository(s) for updates yet.',
new PhutilNumber(count($queue))));
phutil_count($queue)));
}
if ($futures) {

View file

@ -91,7 +91,7 @@ final class PhabricatorRepositoryManagementParentsWorkflow
"%s\n",
pht(
'Found %s total commit(s); updating...',
new PhutilNumber(count($graph))));
phutil_count($graph)));
$commit_table = id(new PhabricatorRepositoryCommit());
$commit_table_name = $commit_table->getTableName();

View file

@ -260,11 +260,12 @@ final class PhabricatorRepositoryManagementReparseWorkflow
if ($all_from_repo && !$force_local) {
$console->writeOut("%s\n", pht(
'**NOTE**: This script will queue tasks to reparse the data. Once the '.
'tasks have been queued, you need to run Taskmaster daemons to '.
'execute them.'."\n\n".
"QUEUEING TASKS (%s Commits):",
new PhutilNumber(count($commits))));
"**NOTE**: This script will queue tasks to reparse the data. Once the ".
"tasks have been queued, you need to run Taskmaster daemons to ".
"execute them.\n\n%s",
pht(
'QUEUEING TASKS (%s Commit(s)):',
phutil_count($commits))));
}
$progress = new PhutilConsoleProgressBar();

View file

@ -163,22 +163,22 @@ abstract class PhabricatorSubscriptionsHeraldAction
return pht(
'Declined to resubscribe %s target(s) because they previously '.
'unsubscribed: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_AUTOSUBSCRIBED:
return pht(
'%s automatically subscribed target(s) were not affected: %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_SUBSCRIBED:
return pht(
'Added %s subscriber(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
case self::DO_UNSUBSCRIBED:
return pht(
'Removed %s subscriber(s): %s.',
new PhutilNumber(count($data)),
phutil_count($data),
$this->renderHandleList($data));
}
}

View file

@ -119,7 +119,7 @@ EOBANNER;
$console->writeOut(
pht(
'These %s object(s) will be destroyed forever:',
new PhutilNumber(count($named_objects)))."\n\n");
phutil_count($named_objects))."\n\n");
foreach ($named_objects as $object_name => $object) {
$phid = $object->getPHID();
@ -136,7 +136,7 @@ EOBANNER;
$ok = $console->confirm(
pht(
'Are you absolutely certain you want to destroy these %s object(s)?',
new PhutilNumber(count($named_objects))));
phutil_count($named_objects)));
if (!$ok) {
throw new PhutilArgumentUsageException(
pht('Aborted, your objects are safe.'));
@ -160,7 +160,7 @@ EOBANNER;
"%s\n",
pht(
'Permanently destroyed %s object(s).',
new PhutilNumber(count($named_objects))));
phutil_count($named_objects)));
return 0;
}

View file

@ -32,16 +32,16 @@ final class PhabricatorApplicationTransactionNoEffectResponse
$only_empty_comment = (count($xactions) == 1) &&
(head($xactions)->getTransactionType() == $type_comment);
$count = new PhutilNumber(count($xactions));
$count = phutil_count($xactions);
if ($ex->hasAnyEffect()) {
$title = pht('%d Action(s) With No Effect', $count);
$head = pht('Some of your %d action(s) have no effect:', $count);
$title = pht('%s Action(s) With No Effect', $count);
$head = pht('Some of your %s action(s) have no effect:', $count);
$tail = pht('Apply remaining actions?');
$continue = pht('Apply Remaining Actions');
} else if ($ex->hasComment()) {
$title = pht('Post as Comment');
$head = pht('The %d action(s) you are taking have no effect:', $count);
$head = pht('The %s action(s) you are taking have no effect:', $count);
$tail = pht('Do you want to post your comment anyway?');
$continue = pht('Post Comment');
} else if ($only_empty_comment) {
@ -52,8 +52,8 @@ final class PhabricatorApplicationTransactionNoEffectResponse
$tail = null;
$continue = null;
} else {
$title = pht('%d Action(s) Have No Effect', $count);
$head = pht('The %d action(s) you are taking have no effect:', $count);
$title = pht('%s Action(s) Have No Effect', $count);
$head = pht('The %s action(s) you are taking have no effect:', $count);
$tail = null;
$continue = null;
}

View file

@ -710,19 +710,19 @@ abstract class PhabricatorApplicationTransaction
return $type_obj->getTransactionEditString(
$this->renderHandleLink($author_phid),
new PhutilNumber(count($add) + count($rem)),
new PhutilNumber(count($add)),
phutil_count($add),
$this->renderHandleList($add),
new PhutilNumber(count($rem)),
phutil_count($rem),
$this->renderHandleList($rem));
} else if ($add) {
return $type_obj->getTransactionAddString(
$this->renderHandleLink($author_phid),
new PhutilNumber(count($add)),
phutil_count($add),
$this->renderHandleList($add));
} else if ($rem) {
return $type_obj->getTransactionRemoveString(
$this->renderHandleLink($author_phid),
new PhutilNumber(count($rem)),
phutil_count($rem),
$this->renderHandleList($rem));
} else {
return $type_obj->getTransactionPreviewString(
@ -871,21 +871,21 @@ abstract class PhabricatorApplicationTransaction
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
new PhutilNumber(count($add) + count($rem)),
new PhutilNumber(count($add)),
phutil_count($add),
$this->renderHandleList($add),
new PhutilNumber(count($rem)),
phutil_count($rem),
$this->renderHandleList($rem));
} else if ($add) {
return $type_obj->getFeedAddString(
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
new PhutilNumber(count($add)),
phutil_count($add),
$this->renderHandleList($add));
} else if ($rem) {
return $type_obj->getFeedRemoveString(
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
new PhutilNumber(count($rem)),
phutil_count($rem),
$this->renderHandleList($rem));
} else {
return pht(

View file

@ -117,23 +117,23 @@ abstract class PhabricatorStandardCustomFieldPHIDs
'%s updated %s, added %d: %s.',
$xaction->renderHandleLink($author_phid),
$this->getFieldName(),
new PhutilNumber(count($add)),
phutil_count($add),
$xaction->renderHandleList($add));
} else if ($rem && !$add) {
return pht(
'%s updated %s, removed %d: %s.',
'%s updated %s, removed %s: %s.',
$xaction->renderHandleLink($author_phid),
$this->getFieldName(),
new PhutilNumber(count($rem)),
phutil_count($rem),
$xaction->renderHandleList($rem));
} else {
return pht(
'%s updated %s, added %d: %s; removed %d: %s.',
'%s updated %s, added %s: %s; removed %s: %s.',
$xaction->renderHandleLink($author_phid),
$this->getFieldName(),
new PhutilNumber(count($add)),
phutil_count($add),
$xaction->renderHandleList($add),
new PhutilNumber(count($rem)),
phutil_count($rem),
$xaction->renderHandleList($rem));
}
}

View file

@ -37,7 +37,7 @@ final class PhabricatorInternationalizationManagementExtractWorkflow
$console->writeOut(
"%s\n",
pht('Found %s file(s)...', new PhutilNumber(count($futures))));
pht('Found %s file(s)...', phutil_count($futures)));
$results = array();

View file

@ -32,7 +32,7 @@ final class PhabricatorUSEnglishTranslation
'%d path(s)' => array('%d path', '%d paths'),
'%d diff(s)' => array('%d diff', '%d diffs'),
'%d Answer(s)' => array('%d Answer', '%d Answers'),
'%s Answer(s)' => array('%s Answer', '%s Answers'),
'Show %d Comment(s)' => array('Show %d Comment', 'Show %d Comments'),
'%s DIFF LINK(S)' => array('DIFF LINK', 'DIFF LINKS'),
@ -114,17 +114,17 @@ final class PhabricatorUSEnglishTranslation
'This is a binary file. It is %s bytes in length.',
),
'%d Action(s) Have No Effect' => array(
'%s Action(s) Have No Effect' => array(
'Action Has No Effect',
'Actions Have No Effect',
),
'%d Action(s) With No Effect' => array(
'%s Action(s) With No Effect' => array(
'Action With No Effect',
'Actions With No Effect',
),
'Some of your %d action(s) have no effect:' => array(
'Some of your %s action(s) have no effect:' => array(
'One of your actions has no effect:',
'Some of your actions have no effect:',
),
@ -139,7 +139,7 @@ final class PhabricatorUSEnglishTranslation
'Apply Remaining Actions',
),
'The %d action(s) you are taking have no effect:' => array(
'The %s action(s) you are taking have no effect:' => array(
'The action you are taking has no effect:',
'The actions you are taking have no effect:',
),
@ -550,9 +550,9 @@ final class PhabricatorUSEnglishTranslation
),
),
'%d comment(s)' => array('%d comment', '%d comments'),
'%d rejection(s)' => array('%d rejection', '%d rejections'),
'%d update(s)' => array('%d update', '%d updates'),
'%s comment(s)' => array('%s comment', '%s comments'),
'%s rejection(s)' => array('%s rejection', '%s rejections'),
'%s update(s)' => array('%s update', '%s updates'),
'This configuration value is defined in these %d '.
'configuration source(s): %s.' => array(
@ -562,9 +562,9 @@ final class PhabricatorUSEnglishTranslation
'configuration sources: %s.',
),
'%d Open Pull Request(s)' => array(
'%d Open Pull Request',
'%d Open Pull Requests',
'%s Open Pull Request(s)' => array(
'%s Open Pull Request',
'%s Open Pull Requests',
),
'Stale (%s day(s))' => array(
@ -1153,6 +1153,10 @@ final class PhabricatorUSEnglishTranslation
'Found %s book.',
'Found %s books.',
),
'Found %s file(s)...' => array(
'Found %s file...',
'Found %s files...',
),
'Found %s file(s) in project.' => array(
'Found %s file in project.',
'Found %s files in project.',
@ -1392,6 +1396,10 @@ final class PhabricatorUSEnglishTranslation
'%s Day',
'%s Days',
),
'%s Day(s) Ago' => array(
'%s Day Ago',
'%s Days Ago',
),
'Setting retention policy for "%s" to %s day(s).' => array(
'Setting retention policy for "%s" to one day.',
@ -1425,6 +1433,59 @@ final class PhabricatorUSEnglishTranslation
'WARNING: There are unapproved authorizations!',
),
'Found %s Open Resource(s)' => array(
'Found %s Open Resource',
'Found %s Open Resources',
),
'%s Open Resource(s) Remain' => array(
'%s Open Resource Remain',
'%s Open Resources Remain',
),
'Found %s Blueprint(s)' => array(
'Found %s Blueprint',
'Found %s Blueprints',
),
'%s Blueprint(s) Can Allocate' => array(
'%s Blueprint Can Allocate',
'%s Blueprints Can Allocate',
),
'%s Blueprint(s) Enabled' => array(
'%s Blueprint Enabled',
'%s Blueprints Enabled',
),
'%s Event(s)' => array(
'%s Event',
'%s Events',
),
'%s Unit(s)' => array(
'%s Unit',
'%s Units',
),
'QUEUEING TASKS (%s Commit(s)):' => array(
'QUEUEING TASKS (%s Commit):',
'QUEUEING TASKS (%s Commits):',
),
'Found %s total commit(s); updating...' => array(
'Found %s total commit; updating...',
'Found %s total commits; updating...',
),
'Not enough process slots to schedule the other %s '.
'repository(s) for updates yet.' => array(
'Not enough process slots to schedule the other '.'
repository for update yet.',
'Not enough process slots to schedule the other %s '.
'repositories for updates yet.',
),
);
}

View file

@ -126,7 +126,7 @@ abstract class PhabricatorStorageManagementWorkflow
"documentation.\n\n".
"MySQL needs to copy table data to make some adjustments, so these ".
"migrations may take some time.",
new PhutilNumber(count($adjustments))));
phutil_count($adjustments)));
$prompt = pht('Fix these schema issues?');
if (!phutil_console_confirm($prompt, $default_no = true)) {

View file

@ -128,7 +128,7 @@ final class PHUIHeaderView extends AphrontTagView {
} else if ($age == 1) {
$when = pht('Yesterday');
} else {
$when = pht('%d Days Ago', $age);
$when = pht('%s Day(s) Ago', new PhutilNumber($age));
}
$this->setStatus('fa-clock-o bluegrey', null, pht('Updated %s', $when));