@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+217 -142
+1 -1
scripts/symbols/import_repository_symbols.php
··· 102 102 $repository->getPHID()); 103 103 } 104 104 105 - echo pht('Loading %s symbols...', new PhutilNumber(count($sql))), "\n"; 105 + echo pht('Loading %s symbols...', phutil_count($sql)), "\n"; 106 106 foreach (array_chunk($sql, 128) as $chunk) { 107 107 queryfx( 108 108 $conn_w,
+1 -1
src/applications/auth/controller/config/PhabricatorAuthListController.php
··· 109 109 'only users with a verified email address at one of these %s '. 110 110 'allowed domain(s) will be able to register an account: %s', 111 111 $domains_link, 112 - new PhutilNumber(count($domains_value)), 112 + phutil_count($domains_value), 113 113 phutil_tag('strong', array(), implode(', ', $domains_value))); 114 114 } else { 115 115 $issues[] = pht(
+1 -1
src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php
··· 78 78 "%s\n", 79 79 pht( 80 80 'Found %s account(s) to refresh.', 81 - new PhutilNumber(count($accounts)))); 81 + phutil_count($accounts))); 82 82 } 83 83 84 84 $providers = PhabricatorAuthProvider::getAllEnabledProviders();
+1 -1
src/applications/celerity/management/CelerityManagementMapWorkflow.php
··· 18 18 $this->log( 19 19 pht( 20 20 'Rebuilding %d resource source(s).', 21 - new PhutilNumber(count($resources_map)))); 21 + phutil_count($resources_map))); 22 22 23 23 foreach ($resources_map as $name => $resources) { 24 24 $this->rebuildResources($resources);
+1 -1
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
··· 115 115 $list_section = array( 116 116 pht( 117 117 'The configurations differ in the following %s way(s):', 118 - new PhutilNumber(count($issues))), 118 + phutil_count($issues)), 119 119 phutil_tag( 120 120 'ul', 121 121 array(),
+1 -1
src/applications/config/check/PhabricatorPathSetupCheck.php
··· 111 111 112 112 $this 113 113 ->newIssue('config.PATH.'.$digest) 114 - ->setName(pht('$PATH Component Unusable')) 114 + ->setName(pht('%s Component Unusable', '$PATH')) 115 115 ->setSummary( 116 116 pht( 117 117 'A component of the configured PATH can not be used by '.
+1 -1
src/applications/config/view/PhabricatorSetupIssueView.php
··· 387 387 array(), 388 388 pht( 389 389 'PHP also loaded these %s configuration file(s):', 390 - new PhutilNumber(count($more_loc)))); 390 + phutil_count($more_loc))); 391 391 $info[] = phutil_tag( 392 392 'pre', 393 393 array(),
+3 -4
src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
··· 29 29 protected function defineErrorTypes() { 30 30 return array( 31 31 'ERR_USAGE_NO_ROOM_ID' => pht( 32 - 'You must specify a room id or room phid to query transactions '. 33 - 'from.'), 32 + 'You must specify a room ID or room PHID to query transactions from.'), 34 33 'ERR_USAGE_ROOM_NOT_FOUND' => pht( 35 - 'room does not exist or logged in user can not see it.'), 34 + 'Room does not exist or logged in user can not see it.'), 36 35 'ERR_USAGE_ONLY_SELF_REMOVE' => pht( 37 36 'Only a user can remove themselves from a room.'), 38 37 'ERR_USAGE_NO_UPDATES' => pht( 39 - 'You must specify data that actually updates the conpherence.'), 38 + 'You must specify data that actually updates the Conpherence.'), 40 39 ); 41 40 } 42 41
+4 -8
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 325 325 $remove_person = $request->getStr('remove_person'); 326 326 $participants = $conpherence->getParticipants(); 327 327 328 - $message = pht( 329 - 'Are you sure you want to leave this room?'); 328 + $message = pht('Are you sure you want to leave this room?'); 330 329 $test_conpherence = clone $conpherence; 331 330 $test_conpherence->attachParticipants(array()); 332 331 if (!PhabricatorPolicyFilter::hasCapability( ··· 334 333 $test_conpherence, 335 334 PhabricatorPolicyCapability::CAN_VIEW)) { 336 335 if (count($participants) == 1) { 337 - $message .= pht( 338 - ' The room will be inaccessible forever and ever.'); 336 + $message .= ' '.pht('The room will be inaccessible forever and ever.'); 339 337 } else { 340 - $message .= pht( 341 - ' Someone else in the room can add you back later.'); 338 + $message .= ' '.pht('Someone else in the room can add you back later.'); 342 339 } 343 340 } 344 341 $body = phutil_tag( 345 342 'p', 346 - array( 347 - ), 343 + array(), 348 344 $message); 349 345 350 346 require_celerity_resource('conpherence-update-css');
+4 -4
src/applications/conpherence/storage/ConpherenceTransaction.php
··· 77 77 count($rem)); 78 78 } else if ($add) { 79 79 $title = pht( 80 - '%s added %d files(s).', 80 + '%s added %s files(s).', 81 81 $this->renderHandleLink($author_phid), 82 - count($add)); 82 + phutil_count($add)); 83 83 } else { 84 84 $title = pht( 85 - '%s removed %d file(s).', 85 + '%s removed %s file(s).', 86 86 $this->renderHandleLink($author_phid), 87 - count($rem)); 87 + phutil_count($rem)); 88 88 } 89 89 return $title; 90 90 break;
+6 -3
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 226 226 // Retry without sudo 227 227 $console->writeOut( 228 228 "%s\n", 229 - pht('sudo command failed. Starting daemon as current user.')); 229 + pht( 230 + '%s command failed. Starting daemon as current user.', 231 + 'sudo')); 230 232 $this->executeDaemonLaunchCommand( 231 233 $command, 232 234 $daemon_script_dir, ··· 265 267 if (preg_match('/sudo: a password is required/', $stderr)) { 266 268 throw new Exception( 267 269 pht( 268 - 'sudo exited with a zero exit code, but emitted output '. 269 - 'consistent with failure under OSX.')); 270 + '%s exited with a zero exit code, but emitted output '. 271 + 'consistent with failure under OSX.', 272 + 'sudo')); 270 273 } 271 274 } 272 275 }
+4 -4
src/applications/differential/customfield/DifferentialJIRAIssuesField.php
··· 218 218 return pht( 219 219 '%s updated JIRA issue(s): added %d %s; removed %d %s.', 220 220 $xaction->renderHandleLink($author_phid), 221 - new PhutilNumber(count($add)), 221 + phutil_count($add), 222 222 implode(', ', $add), 223 - new PhutilNumber(count($rem)), 223 + phutil_count($rem), 224 224 implode(', ', $rem)); 225 225 } else if ($add) { 226 226 return pht( 227 227 '%s added %d JIRA issue(s): %s.', 228 228 $xaction->renderHandleLink($author_phid), 229 - new PhutilNumber(count($add)), 229 + phutil_count($add), 230 230 implode(', ', $add)); 231 231 } else if ($rem) { 232 232 return pht( 233 233 '%s removed %d JIRA issue(s): %s.', 234 234 $xaction->renderHandleLink($author_phid), 235 - new PhutilNumber(count($rem)), 235 + phutil_count($rem), 236 236 implode(', ', $rem)); 237 237 } 238 238
+1 -1
src/applications/differential/customfield/DifferentialUnitField.php
··· 125 125 )) + $groups; 126 126 127 127 foreach ($groups as $result => $group) { 128 - $count = new PhutilNumber(count($group)); 128 + $count = phutil_count($group); 129 129 switch ($result) { 130 130 case ArcanistUnitTestResult::RESULT_PASS: 131 131 $note[] = pht('%s Passed Test(s)', $count);
+2 -2
src/applications/differential/herald/DifferentialReviewersHeraldAction.php
··· 135 135 case self::DO_ADD_REVIEWERS: 136 136 return pht( 137 137 'Added %s reviewer(s): %s.', 138 - new PhutilNumber(count($data)), 138 + phutil_count($data), 139 139 $this->renderHandleList($data)); 140 140 case self::DO_ADD_BLOCKING_REVIEWERS: 141 141 return pht( 142 142 'Added %s blocking reviewer(s): %s.', 143 - new PhutilNumber(count($data)), 143 + phutil_count($data), 144 144 $this->renderHandleList($data)); 145 145 } 146 146 }
+3 -3
src/applications/differential/mail/DifferentialCreateMailReceiver.php
··· 81 81 } else { 82 82 $subject = pht( 83 83 'Diff creation failed; see body for %s error(s).', 84 - new PhutilNumber(count($errors))); 84 + phutil_count($errors)); 85 85 } 86 86 $body = new PhabricatorMetaMTAMailBody(); 87 87 $body->addRawSection($subject); 88 88 if (count($diffs)) { 89 89 $text_body = ''; 90 90 $html_body = array(); 91 - $body_label = pht('%s DIFF LINK(S)', new PhutilNumber(count($diffs))); 91 + $body_label = pht('%s DIFF LINK(S)', phutil_count($diffs)); 92 92 foreach ($diffs as $filename => $diff_uri) { 93 93 $text_body .= $filename.': '.$diff_uri."\n"; 94 94 $html_body[] = phutil_tag( ··· 105 105 106 106 if (count($errors)) { 107 107 $body_section = new PhabricatorMetaMTAMailSection(); 108 - $body_label = pht('%s ERROR(S)', new PhutilNumber(count($errors))); 108 + $body_label = pht('%s ERROR(S)', phutil_count($errors)); 109 109 foreach ($errors as $error) { 110 110 $body_section->addFragment($error); 111 111 }
+1 -1
src/applications/diffusion/herald/DiffusionAuditorsHeraldAction.php
··· 68 68 case self::DO_ADD_AUDITORS: 69 69 return pht( 70 70 'Added %s auditor(s): %s.', 71 - new PhutilNumber(count($data)), 71 + phutil_count($data), 72 72 $this->renderHandleList($data)); 73 73 } 74 74 }
+2 -2
src/applications/diviner/atomizer/DivinerPHPAtomizer.php
··· 152 152 $atom->addWarning( 153 153 pht( 154 154 'This call takes %s parameter(s), but only %s are documented.', 155 - new PhutilNumber(count($params)), 156 - new PhutilNumber(count($docs)))); 155 + phutil_count($params), 156 + phutil_count($docs))); 157 157 } 158 158 } 159 159
+2 -2
src/applications/diviner/publisher/DivinerPublisher.php
··· 140 140 "%s\n", 141 141 pht( 142 142 'Deleting %s document(s).', 143 - new PhutilNumber(count($deleted)))); 143 + phutil_count($deleted))); 144 144 $this->deleteDocumentsByHash($deleted); 145 145 146 146 $console->writeOut( 147 147 "%s\n", 148 148 pht( 149 149 'Creating %s document(s).', 150 - new PhutilNumber(count($created)))); 150 + phutil_count($created))); 151 151 $this->createDocumentsByHash($created); 152 152 } 153 153
+8 -8
src/applications/diviner/workflow/DivinerGenerateWorkflow.php
··· 69 69 '.book', 70 70 '--book <book>')); 71 71 } else { 72 - $this->log(pht('Found %s book(s).', new PhutilNumber(count($books)))); 72 + $this->log(pht('Found %s book(s).', phutil_count($books))); 73 73 } 74 74 } 75 75 ··· 224 224 $this->log( 225 225 pht( 226 226 'Found %s file(s) in project.', 227 - new PhutilNumber(count($file_hashes)))); 227 + phutil_count($file_hashes))); 228 228 229 229 $this->deleteDeadAtoms($file_hashes); 230 230 $atomize = $this->getFilesToAtomize($file_hashes); 231 231 $this->log( 232 232 pht( 233 233 'Found %s unatomized, uncached file(s).', 234 - new PhutilNumber(count($atomize)))); 234 + phutil_count($atomize))); 235 235 236 236 $file_atomizers = $this->getAtomizersForFiles($atomize); 237 237 $this->log( 238 238 pht( 239 239 'Found %s file(s) to atomize.', 240 - new PhutilNumber(count($file_atomizers)))); 240 + phutil_count($file_atomizers))); 241 241 242 242 $futures = $this->buildAtomizerFutures($file_atomizers); 243 243 $this->log( 244 244 pht( 245 245 'Atomizing %s file(s).', 246 - new PhutilNumber(count($file_atomizers)))); 246 + phutil_count($file_atomizers))); 247 247 248 248 if ($futures) { 249 249 $this->resolveAtomizerFutures($futures, $file_hashes); ··· 452 452 $this->log( 453 453 pht( 454 454 'Found %s obsolete atom(s) in graph.', 455 - new PhutilNumber(count($del_atoms)))); 455 + phutil_count($del_atoms))); 456 456 457 457 foreach ($del_atoms as $nhash => $shash) { 458 458 $atom_cache->deleteSymbol($nhash); ··· 466 466 $this->log( 467 467 pht( 468 468 'Found %s new atom(s) in graph.', 469 - new PhutilNumber(count($new_atoms)))); 469 + phutil_count($new_atoms))); 470 470 471 471 foreach ($new_atoms as $nhash => $ignored) { 472 472 $shash = $this->computeSymbolHash($nhash); ··· 505 505 $this->log( 506 506 pht( 507 507 'Found %s affected atoms.', 508 - new PhutilNumber(count($dirty_nhashes)))); 508 + phutil_count($dirty_nhashes))); 509 509 510 510 foreach ($dirty_nhashes as $nhash => $ignored) { 511 511 $atom_cache->addGraph($nhash, $this->computeGraphHash($nhash));
+5 -2
src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php
··· 96 96 } 97 97 98 98 $out = array(); 99 - $out[] = pht('| Workspace ID | Workspace Name |'); 100 - $out[] = '| ------------ | -------------- |'; 99 + $out[] = sprintf( 100 + '| %s | %s |', 101 + pht('Workspace ID'), 102 + pht('Workspace Name')); 103 + $out[] = '| ------------ | -------------- |'; 101 104 foreach ($workspaces as $workspace) { 102 105 $out[] = sprintf('| `%s` | `%s` |', $workspace['id'], $workspace['name']); 103 106 }
+1 -1
src/applications/files/storage/PhabricatorFile.php
··· 557 557 'Failed to fetch remote URI "%s" after following %s redirect(s) '. 558 558 '(%s): %s', 559 559 $uri, 560 - new PhutilNumber(count($redirects)), 560 + phutil_count($redirects), 561 561 implode(' > ', array_keys($redirects)), 562 562 $ex->getMessage()), 563 563 $ex);
+2 -2
src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
··· 37 37 $unit_spec = HarbormasterBuildUnitMessage::getParameterSpec(); 38 38 foreach ($unit_spec as $key => $parameter) { 39 39 $type = idx($parameter, 'type'); 40 - $type = str_replace('|', pht(' or '), $type); 40 + $type = str_replace('|', ' '.pht('or').' ', $type); 41 41 $description = idx($parameter, 'description'); 42 42 $rows[] = "| `{$key}` | //{$type}// | {$description} |"; 43 43 } ··· 61 61 $lint_spec = HarbormasterBuildLintMessage::getParameterSpec(); 62 62 foreach ($lint_spec as $key => $parameter) { 63 63 $type = idx($parameter, 'type'); 64 - $type = str_replace('|', pht(' or '), $type); 64 + $type = str_replace('|', ' '.pht('or').' ', $type); 65 65 $description = idx($parameter, 'description'); 66 66 $rows[] = "| `{$key}` | //{$type}// | {$description} |"; 67 67 }
+1 -1
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 377 377 array( 378 378 pht( 379 379 '%s empty logs are hidden.', 380 - new PhutilNumber(count($empty_logs))), 380 + phutil_count($empty_logs)), 381 381 ' ', 382 382 javelin_tag( 383 383 'a',
+4 -1
src/applications/harbormaster/controller/HarbormasterStepEditController.php
··· 231 231 'The following variables can be used in most fields. '. 232 232 'To reference a variable, use `%s` in a field.', 233 233 '${name}'); 234 - $rows[] = pht('| Variable | Description |'); 234 + $rows[] = sprintf( 235 + '| %s | %s |', 236 + pht('Variable'), 237 + pht('Description')); 235 238 $rows[] = '|---|---|'; 236 239 foreach ($variables as $name => $description) { 237 240 $rows[] = '| `'.$name.'` | '.$description.' |';
+1 -1
src/applications/harbormaster/herald/HarbormasterRunBuildPlansHeraldAction.php
··· 54 54 case self::DO_BUILD: 55 55 return pht( 56 56 'Started %s build(s): %s.', 57 - new PhutilNumber(count($data)), 57 + phutil_count($data), 58 58 $this->renderHandleList($data)); 59 59 } 60 60 }
+4 -4
src/applications/herald/action/HeraldAction.php
··· 346 346 case self::DO_STANDARD_NO_EFFECT: 347 347 return pht( 348 348 'This action has no effect on %s target(s): %s.', 349 - new PhutilNumber(count($data)), 349 + phutil_count($data), 350 350 $this->renderHandleList($data)); 351 351 case self::DO_STANDARD_INVALID: 352 352 return pht( 353 353 '%s target(s) are invalid or of the wrong type: %s.', 354 - new PhutilNumber(count($data)), 354 + phutil_count($data), 355 355 $this->renderHandleList($data)); 356 356 case self::DO_STANDARD_UNLOADABLE: 357 357 return pht( 358 358 '%s target(s) could not be loaded: %s.', 359 - new PhutilNumber(count($data)), 359 + phutil_count($data), 360 360 $this->renderHandleList($data)); 361 361 case self::DO_STANDARD_PERMISSION: 362 362 return pht( 363 363 '%s target(s) do not have permission to see this object: %s.', 364 - new PhutilNumber(count($data)), 364 + phutil_count($data), 365 365 $this->renderHandleList($data)); 366 366 case self::DO_STANDARD_INVALID_ACTION: 367 367 return pht(
+2 -2
src/applications/legalpad/herald/LegalpadRequireSignatureHeraldAction.php
··· 95 95 case self::DO_SIGNED: 96 96 return pht( 97 97 '%s document(s) are already signed: %s.', 98 - new PhutilNumber(count($data)), 98 + phutil_count($data), 99 99 $this->renderHandleList($data)); 100 100 case self::DO_REQUIRED: 101 101 return pht( 102 102 'Required %s signature(s): %s.', 103 - new PhutilNumber(count($data)), 103 + phutil_count($data), 104 104 $this->renderHandleList($data)); 105 105 } 106 106 }
+9 -9
src/applications/maniphest/storage/ManiphestTransaction.php
··· 546 546 $removed = array_diff($old, $new); 547 547 if ($added && !$removed) { 548 548 return pht( 549 - '%s attached %d file(s): %s.', 549 + '%s attached %s file(s): %s.', 550 550 $this->renderHandleLink($author_phid), 551 - count($added), 551 + phutil_count($added), 552 552 $this->renderHandleList($added)); 553 553 } else if ($removed && !$added) { 554 554 return pht( 555 - '%s detached %d file(s): %s.', 555 + '%s detached %s file(s): %s.', 556 556 $this->renderHandleLink($author_phid), 557 - count($removed), 557 + phutil_count($removed), 558 558 $this->renderHandleList($removed)); 559 559 } else { 560 560 return pht( 561 - '%s changed file(s), attached %d: %s; detached %d: %s.', 561 + '%s changed file(s), attached %s: %s; detached %s: %s.', 562 562 $this->renderHandleLink($author_phid), 563 - count($added), 563 + phutil_count($added), 564 564 $this->renderHandleList($added), 565 - count($removed), 565 + phutil_count($removed), 566 566 $this->renderHandleList($removed)); 567 567 } 568 568 ··· 585 585 586 586 case self::TYPE_MERGED_FROM: 587 587 return pht( 588 - '%s merged %d task(s): %s.', 588 + '%s merged %s task(s): %s.', 589 589 $this->renderHandleLink($author_phid), 590 - count($new), 590 + phutil_count($new), 591 591 $this->renderHandleList($new)); 592 592 break; 593 593
+1 -1
src/applications/maniphest/view/ManiphestTaskResultListView.php
··· 82 82 $header = id(new PHUIHeaderView()) 83 83 ->addSigil('task-group') 84 84 ->setMetadata(array('priority' => head($list)->getPriority())) 85 - ->setHeader(pht('%s (%s)', $group, new PhutilNumber(count($list)))); 85 + ->setHeader(pht('%s (%s)', $group, phutil_count($list))); 86 86 87 87 $lists[] = id(new PHUIObjectBoxView()) 88 88 ->setHeader($header)
+2 -2
src/applications/metamta/herald/PhabricatorMetaMTAEmailHeraldAction.php
··· 75 75 case self::DO_SEND: 76 76 return pht( 77 77 'Queued email to be delivered to %s target(s): %s.', 78 - new PhutilNumber(count($data)), 78 + phutil_count($data), 79 79 $this->renderHandleList($data)); 80 80 case self::DO_FORCE: 81 81 return pht( 82 82 'Queued email to be delivered to %s target(s), ignoring their '. 83 83 'notification preferences: %s.', 84 - new PhutilNumber(count($data)), 84 + phutil_count($data), 85 85 $this->renderHandleList($data)); 86 86 } 87 87 }
+1 -1
src/applications/multimeter/controller/MultimeterSampleController.php
··· 90 90 $events_col = $this->renderGroupingLink( 91 91 $group, 92 92 'id', 93 - pht('%s Events', new PhutilNumber($row['N']))); 93 + pht('%s Event(s)', new PhutilNumber($row['N']))); 94 94 } 95 95 96 96 if (isset($group['request'])) {
+3 -3
src/applications/people/controller/PhabricatorPeopleDeleteController.php
··· 49 49 $form = id(new AphrontFormView()) 50 50 ->setUser($admin) 51 51 ->appendRemarkupInstructions( 52 - pht( 53 - " phabricator/ $ ./bin/remove destroy %s\n", 54 - csprintf('%R', '@'.$user->getUsername()))); 52 + csprintf( 53 + " phabricator/ $ ./bin/remove destroy %R\n", 54 + '@'.$user->getUsername())); 55 55 56 56 return $this->newDialog() 57 57 ->setWidth(AphrontDialogView::WIDTH_FORM)
+1 -1
src/applications/pholio/view/PholioMockThumbGridView.php
··· 156 156 array( 157 157 'class' => 'pholio-mock-thumb-grid-comment-count', 158 158 ), 159 - pht('%s', new PhutilNumber(count($image->getInlineComments())))); 159 + pht('%s', phutil_count($image->getInlineComments()))); 160 160 } 161 161 162 162 return javelin_tag(
+3 -1
src/applications/phragment/controller/PhragmentController.php
··· 199 199 $alt = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 200 200 if ($alt === null) { 201 201 return id(new PHUIInfoView()) 202 - ->setTitle(pht('security.alternate-file-domain must be configured!')) 202 + ->setTitle(pht( 203 + '%s must be configured!', 204 + 'security.alternate-file-domain')) 203 205 ->setSeverity(PHUIInfoView::SEVERITY_ERROR) 204 206 ->appendChild( 205 207 phutil_tag(
+3 -1
src/applications/ponder/controller/PonderQuestionViewController.php
··· 292 292 $item->setObject($question); 293 293 294 294 $item->addAttribute( 295 - pht('%d Answer(s)', $question->getAnswerCount())); 295 + pht( 296 + '%s Answer(s)', 297 + new PhutilNumber($question->getAnswerCount()))); 296 298 297 299 $list->addItem($item); 298 300 }
+6 -4
src/applications/ponder/query/PonderQuestionSearchEngine.php
··· 134 134 135 135 foreach ($questions as $question) { 136 136 $color = PonderQuestionStatus::getQuestionStatusTagColor( 137 - $question->getStatus()); 137 + $question->getStatus()); 138 138 $icon = PonderQuestionStatus::getQuestionStatusIcon( 139 - $question->getStatus()); 139 + $question->getStatus()); 140 140 $full_status = PonderQuestionStatus::getQuestionStatusFullName( 141 - $question->getStatus()); 141 + $question->getStatus()); 142 142 $item = new PHUIObjectItemView(); 143 143 $item->setObjectName('Q'.$question->getID()); 144 144 $item->setHeader($question->getTitle()); ··· 158 158 $handles[$question->getAuthorPHID()]->renderLink())); 159 159 160 160 $item->addAttribute( 161 - pht('%d Answer(s)', $question->getAnswerCount())); 161 + pht( 162 + '%s Answer(s)', 163 + new PhutilNumber($question->getAnswerCount()))); 162 164 163 165 if ($project_handles) { 164 166 $item->addAttribute(
+2 -2
src/applications/project/herald/PhabricatorProjectHeraldAction.php
··· 112 112 case self::DO_ADD_PROJECTS: 113 113 return pht( 114 114 'Added %s project(s): %s.', 115 - new PhutilNumber(count($data)), 115 + phutil_count($data), 116 116 $this->renderHandleList($data)); 117 117 case self::DO_REMOVE_PROJECTS: 118 118 return pht( 119 119 'Removed %s project(s): %s.', 120 - new PhutilNumber(count($data)), 120 + phutil_count($data), 121 121 $this->renderHandleList($data)); 122 122 } 123 123 }
+1 -1
src/applications/releeph/controller/product/ReleephProductEditController.php
··· 49 49 if (!$product_name) { 50 50 $e_name = pht('Required'); 51 51 $errors[] = 52 - pht('Your releeph product should have a simple descriptive name.'); 52 + pht('Your Releeph product should have a simple descriptive name.'); 53 53 } 54 54 55 55 if (!$trunk_branch) {
+4 -3
src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
··· 31 31 $rejections = 0; 32 32 $comments = 0; 33 33 $updates = 0; 34 + 34 35 foreach ($xactions as $xaction) { 35 36 switch ($xaction->getTransactionType()) { 36 37 case PhabricatorTransactions::TYPE_COMMENT: ··· 60 61 } else { 61 62 $parts = array(); 62 63 if ($rejections) { 63 - $parts[] = pht('%d rejection(s)', $rejections); 64 + $parts[] = pht('%s rejection(s)', new PhutilNumber($rejections)); 64 65 } 65 66 if ($comments) { 66 - $parts[] = pht('%d comment(s)', $comments); 67 + $parts[] = pht('%s comment(s)', new PhutilNumber($comments)); 67 68 } 68 69 if ($updates) { 69 - $parts[] = pht('%d update(s)', $updates); 70 + $parts[] = pht('%s update(s)', new PhutilNumber($updates)); 70 71 } 71 72 72 73 if (count($parts) === 0) {
+1 -1
src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
··· 55 55 $mr_changes['tests']['lines'], 56 56 count($mr_changes['tests']['paths'])); 57 57 foreach ($mr_changes['tests']['paths'] as $mr_test_path) { 58 - $test_blurb .= pht("%s\n", $mr_test_path); 58 + $test_blurb .= sprintf("%s\n", $mr_test_path); 59 59 } 60 60 61 61 $test_tag = javelin_tag(
+3 -1
src/applications/releeph/query/ReleephBranchSearchEngine.php
··· 182 182 $item->setStatusIcon('fa-code-fork orange'); 183 183 $item->addIcon( 184 184 'fa-code-fork', 185 - pht('%d Open Pull Request(s)', new PhutilNumber($open_count))); 185 + pht( 186 + '%s Open Pull Request(s)', 187 + new PhutilNumber($open_count))); 186 188 } 187 189 188 190 $list->addItem($item);
+1 -1
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 172 172 pht( 173 173 'Not enough process slots to schedule the other %s '. 174 174 'repository(s) for updates yet.', 175 - new PhutilNumber(count($queue)))); 175 + phutil_count($queue))); 176 176 } 177 177 178 178 if ($futures) {
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
··· 91 91 "%s\n", 92 92 pht( 93 93 'Found %s total commit(s); updating...', 94 - new PhutilNumber(count($graph)))); 94 + phutil_count($graph))); 95 95 96 96 $commit_table = id(new PhabricatorRepositoryCommit()); 97 97 $commit_table_name = $commit_table->getTableName();
+6 -5
src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php
··· 260 260 261 261 if ($all_from_repo && !$force_local) { 262 262 $console->writeOut("%s\n", pht( 263 - '**NOTE**: This script will queue tasks to reparse the data. Once the '. 264 - 'tasks have been queued, you need to run Taskmaster daemons to '. 265 - 'execute them.'."\n\n". 266 - "QUEUEING TASKS (%s Commits):", 267 - new PhutilNumber(count($commits)))); 263 + "**NOTE**: This script will queue tasks to reparse the data. Once the ". 264 + "tasks have been queued, you need to run Taskmaster daemons to ". 265 + "execute them.\n\n%s", 266 + pht( 267 + 'QUEUEING TASKS (%s Commit(s)):', 268 + phutil_count($commits)))); 268 269 } 269 270 270 271 $progress = new PhutilConsoleProgressBar();
+4 -4
src/applications/subscriptions/herald/PhabricatorSubscriptionsHeraldAction.php
··· 163 163 return pht( 164 164 'Declined to resubscribe %s target(s) because they previously '. 165 165 'unsubscribed: %s.', 166 - new PhutilNumber(count($data)), 166 + phutil_count($data), 167 167 $this->renderHandleList($data)); 168 168 case self::DO_AUTOSUBSCRIBED: 169 169 return pht( 170 170 '%s automatically subscribed target(s) were not affected: %s.', 171 - new PhutilNumber(count($data)), 171 + phutil_count($data), 172 172 $this->renderHandleList($data)); 173 173 case self::DO_SUBSCRIBED: 174 174 return pht( 175 175 'Added %s subscriber(s): %s.', 176 - new PhutilNumber(count($data)), 176 + phutil_count($data), 177 177 $this->renderHandleList($data)); 178 178 case self::DO_UNSUBSCRIBED: 179 179 return pht( 180 180 'Removed %s subscriber(s): %s.', 181 - new PhutilNumber(count($data)), 181 + phutil_count($data), 182 182 $this->renderHandleList($data)); 183 183 } 184 184 }
+3 -3
src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php
··· 119 119 $console->writeOut( 120 120 pht( 121 121 'These %s object(s) will be destroyed forever:', 122 - new PhutilNumber(count($named_objects)))."\n\n"); 122 + phutil_count($named_objects))."\n\n"); 123 123 124 124 foreach ($named_objects as $object_name => $object) { 125 125 $phid = $object->getPHID(); ··· 136 136 $ok = $console->confirm( 137 137 pht( 138 138 'Are you absolutely certain you want to destroy these %s object(s)?', 139 - new PhutilNumber(count($named_objects)))); 139 + phutil_count($named_objects))); 140 140 if (!$ok) { 141 141 throw new PhutilArgumentUsageException( 142 142 pht('Aborted, your objects are safe.')); ··· 160 160 "%s\n", 161 161 pht( 162 162 'Permanently destroyed %s object(s).', 163 - new PhutilNumber(count($named_objects)))); 163 + phutil_count($named_objects))); 164 164 165 165 return 0; 166 166 }
+6 -6
src/applications/transactions/response/PhabricatorApplicationTransactionNoEffectResponse.php
··· 32 32 $only_empty_comment = (count($xactions) == 1) && 33 33 (head($xactions)->getTransactionType() == $type_comment); 34 34 35 - $count = new PhutilNumber(count($xactions)); 35 + $count = phutil_count($xactions); 36 36 37 37 if ($ex->hasAnyEffect()) { 38 - $title = pht('%d Action(s) With No Effect', $count); 39 - $head = pht('Some of your %d action(s) have no effect:', $count); 38 + $title = pht('%s Action(s) With No Effect', $count); 39 + $head = pht('Some of your %s action(s) have no effect:', $count); 40 40 $tail = pht('Apply remaining actions?'); 41 41 $continue = pht('Apply Remaining Actions'); 42 42 } else if ($ex->hasComment()) { 43 43 $title = pht('Post as Comment'); 44 - $head = pht('The %d action(s) you are taking have no effect:', $count); 44 + $head = pht('The %s action(s) you are taking have no effect:', $count); 45 45 $tail = pht('Do you want to post your comment anyway?'); 46 46 $continue = pht('Post Comment'); 47 47 } else if ($only_empty_comment) { ··· 52 52 $tail = null; 53 53 $continue = null; 54 54 } else { 55 - $title = pht('%d Action(s) Have No Effect', $count); 56 - $head = pht('The %d action(s) you are taking have no effect:', $count); 55 + $title = pht('%s Action(s) Have No Effect', $count); 56 + $head = pht('The %s action(s) you are taking have no effect:', $count); 57 57 $tail = null; 58 58 $continue = null; 59 59 }
+8 -8
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 710 710 return $type_obj->getTransactionEditString( 711 711 $this->renderHandleLink($author_phid), 712 712 new PhutilNumber(count($add) + count($rem)), 713 - new PhutilNumber(count($add)), 713 + phutil_count($add), 714 714 $this->renderHandleList($add), 715 - new PhutilNumber(count($rem)), 715 + phutil_count($rem), 716 716 $this->renderHandleList($rem)); 717 717 } else if ($add) { 718 718 return $type_obj->getTransactionAddString( 719 719 $this->renderHandleLink($author_phid), 720 - new PhutilNumber(count($add)), 720 + phutil_count($add), 721 721 $this->renderHandleList($add)); 722 722 } else if ($rem) { 723 723 return $type_obj->getTransactionRemoveString( 724 724 $this->renderHandleLink($author_phid), 725 - new PhutilNumber(count($rem)), 725 + phutil_count($rem), 726 726 $this->renderHandleList($rem)); 727 727 } else { 728 728 return $type_obj->getTransactionPreviewString( ··· 871 871 $this->renderHandleLink($author_phid), 872 872 $this->renderHandleLink($object_phid), 873 873 new PhutilNumber(count($add) + count($rem)), 874 - new PhutilNumber(count($add)), 874 + phutil_count($add), 875 875 $this->renderHandleList($add), 876 - new PhutilNumber(count($rem)), 876 + phutil_count($rem), 877 877 $this->renderHandleList($rem)); 878 878 } else if ($add) { 879 879 return $type_obj->getFeedAddString( 880 880 $this->renderHandleLink($author_phid), 881 881 $this->renderHandleLink($object_phid), 882 - new PhutilNumber(count($add)), 882 + phutil_count($add), 883 883 $this->renderHandleList($add)); 884 884 } else if ($rem) { 885 885 return $type_obj->getFeedRemoveString( 886 886 $this->renderHandleLink($author_phid), 887 887 $this->renderHandleLink($object_phid), 888 - new PhutilNumber(count($rem)), 888 + phutil_count($rem), 889 889 $this->renderHandleList($rem)); 890 890 } else { 891 891 return pht(
+6 -6
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
··· 117 117 '%s updated %s, added %d: %s.', 118 118 $xaction->renderHandleLink($author_phid), 119 119 $this->getFieldName(), 120 - new PhutilNumber(count($add)), 120 + phutil_count($add), 121 121 $xaction->renderHandleList($add)); 122 122 } else if ($rem && !$add) { 123 123 return pht( 124 - '%s updated %s, removed %d: %s.', 124 + '%s updated %s, removed %s: %s.', 125 125 $xaction->renderHandleLink($author_phid), 126 126 $this->getFieldName(), 127 - new PhutilNumber(count($rem)), 127 + phutil_count($rem), 128 128 $xaction->renderHandleList($rem)); 129 129 } else { 130 130 return pht( 131 - '%s updated %s, added %d: %s; removed %d: %s.', 131 + '%s updated %s, added %s: %s; removed %s: %s.', 132 132 $xaction->renderHandleLink($author_phid), 133 133 $this->getFieldName(), 134 - new PhutilNumber(count($add)), 134 + phutil_count($add), 135 135 $xaction->renderHandleList($add), 136 - new PhutilNumber(count($rem)), 136 + phutil_count($rem), 137 137 $xaction->renderHandleList($rem)); 138 138 } 139 139 }
+1 -1
src/infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php
··· 37 37 38 38 $console->writeOut( 39 39 "%s\n", 40 - pht('Found %s file(s)...', new PhutilNumber(count($futures)))); 40 + pht('Found %s file(s)...', phutil_count($futures))); 41 41 42 42 $results = array(); 43 43
+72 -11
src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
··· 32 32 '%d path(s)' => array('%d path', '%d paths'), 33 33 '%d diff(s)' => array('%d diff', '%d diffs'), 34 34 35 - '%d Answer(s)' => array('%d Answer', '%d Answers'), 35 + '%s Answer(s)' => array('%s Answer', '%s Answers'), 36 36 'Show %d Comment(s)' => array('Show %d Comment', 'Show %d Comments'), 37 37 38 38 '%s DIFF LINK(S)' => array('DIFF LINK', 'DIFF LINKS'), ··· 114 114 'This is a binary file. It is %s bytes in length.', 115 115 ), 116 116 117 - '%d Action(s) Have No Effect' => array( 117 + '%s Action(s) Have No Effect' => array( 118 118 'Action Has No Effect', 119 119 'Actions Have No Effect', 120 120 ), 121 121 122 - '%d Action(s) With No Effect' => array( 122 + '%s Action(s) With No Effect' => array( 123 123 'Action With No Effect', 124 124 'Actions With No Effect', 125 125 ), 126 126 127 - 'Some of your %d action(s) have no effect:' => array( 127 + 'Some of your %s action(s) have no effect:' => array( 128 128 'One of your actions has no effect:', 129 129 'Some of your actions have no effect:', 130 130 ), ··· 139 139 'Apply Remaining Actions', 140 140 ), 141 141 142 - 'The %d action(s) you are taking have no effect:' => array( 142 + 'The %s action(s) you are taking have no effect:' => array( 143 143 'The action you are taking has no effect:', 144 144 'The actions you are taking have no effect:', 145 145 ), ··· 550 550 ), 551 551 ), 552 552 553 - '%d comment(s)' => array('%d comment', '%d comments'), 554 - '%d rejection(s)' => array('%d rejection', '%d rejections'), 555 - '%d update(s)' => array('%d update', '%d updates'), 553 + '%s comment(s)' => array('%s comment', '%s comments'), 554 + '%s rejection(s)' => array('%s rejection', '%s rejections'), 555 + '%s update(s)' => array('%s update', '%s updates'), 556 556 557 557 'This configuration value is defined in these %d '. 558 558 'configuration source(s): %s.' => array( ··· 562 562 'configuration sources: %s.', 563 563 ), 564 564 565 - '%d Open Pull Request(s)' => array( 566 - '%d Open Pull Request', 567 - '%d Open Pull Requests', 565 + '%s Open Pull Request(s)' => array( 566 + '%s Open Pull Request', 567 + '%s Open Pull Requests', 568 568 ), 569 569 570 570 'Stale (%s day(s))' => array( ··· 1153 1153 'Found %s book.', 1154 1154 'Found %s books.', 1155 1155 ), 1156 + 'Found %s file(s)...' => array( 1157 + 'Found %s file...', 1158 + 'Found %s files...', 1159 + ), 1156 1160 'Found %s file(s) in project.' => array( 1157 1161 'Found %s file in project.', 1158 1162 'Found %s files in project.', ··· 1392 1396 '%s Day', 1393 1397 '%s Days', 1394 1398 ), 1399 + '%s Day(s) Ago' => array( 1400 + '%s Day Ago', 1401 + '%s Days Ago', 1402 + ), 1395 1403 1396 1404 'Setting retention policy for "%s" to %s day(s).' => array( 1397 1405 'Setting retention policy for "%s" to one day.', ··· 1423 1431 'WARNING: There are %s unapproved authorization(s)!' => array( 1424 1432 'WARNING: There is an unapproved authorization!', 1425 1433 'WARNING: There are unapproved authorizations!', 1434 + ), 1435 + 1436 + 'Found %s Open Resource(s)' => array( 1437 + 'Found %s Open Resource', 1438 + 'Found %s Open Resources', 1439 + ), 1440 + 1441 + '%s Open Resource(s) Remain' => array( 1442 + '%s Open Resource Remain', 1443 + '%s Open Resources Remain', 1444 + ), 1445 + 1446 + 'Found %s Blueprint(s)' => array( 1447 + 'Found %s Blueprint', 1448 + 'Found %s Blueprints', 1449 + ), 1450 + 1451 + '%s Blueprint(s) Can Allocate' => array( 1452 + '%s Blueprint Can Allocate', 1453 + '%s Blueprints Can Allocate', 1454 + ), 1455 + 1456 + '%s Blueprint(s) Enabled' => array( 1457 + '%s Blueprint Enabled', 1458 + '%s Blueprints Enabled', 1459 + ), 1460 + 1461 + '%s Event(s)' => array( 1462 + '%s Event', 1463 + '%s Events', 1464 + ), 1465 + 1466 + '%s Unit(s)' => array( 1467 + '%s Unit', 1468 + '%s Units', 1469 + ), 1470 + 1471 + 'QUEUEING TASKS (%s Commit(s)):' => array( 1472 + 'QUEUEING TASKS (%s Commit):', 1473 + 'QUEUEING TASKS (%s Commits):', 1474 + ), 1475 + 1476 + 'Found %s total commit(s); updating...' => array( 1477 + 'Found %s total commit; updating...', 1478 + 'Found %s total commits; updating...', 1479 + ), 1480 + 1481 + 'Not enough process slots to schedule the other %s '. 1482 + 'repository(s) for updates yet.' => array( 1483 + 'Not enough process slots to schedule the other '.' 1484 + repository for update yet.', 1485 + 'Not enough process slots to schedule the other %s '. 1486 + 'repositories for updates yet.', 1426 1487 ), 1427 1488 1428 1489 );
+1 -1
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
··· 126 126 "documentation.\n\n". 127 127 "MySQL needs to copy table data to make some adjustments, so these ". 128 128 "migrations may take some time.", 129 - new PhutilNumber(count($adjustments)))); 129 + phutil_count($adjustments))); 130 130 131 131 $prompt = pht('Fix these schema issues?'); 132 132 if (!phutil_console_confirm($prompt, $default_no = true)) {
+1 -1
src/view/phui/PHUIHeaderView.php
··· 128 128 } else if ($age == 1) { 129 129 $when = pht('Yesterday'); 130 130 } else { 131 - $when = pht('%d Days Ago', $age); 131 + $when = pht('%s Day(s) Ago', new PhutilNumber($age)); 132 132 } 133 133 134 134 $this->setStatus('fa-clock-o bluegrey', null, pht('Updated %s', $when));