@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.

Fix `pht` method calls

Summary: Ref T7046. This is mainly a proof-of-concept for D11661.

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7046

Differential Revision: https://secure.phabricator.com/D11680

+35 -56
+1 -1
src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php
··· 192 192 193 193 $console->writeOut( 194 194 "%s\n", 195 - pht('Installing device ID...', $raw_device)); 195 + pht('Installing device %s...', $raw_device)); 196 196 197 197 // The permissions on this file are more open because the webserver also 198 198 // needs to read it.
+2 -1
src/applications/conduit/protocol/exception/ConduitMethodDoesNotExistException.php
··· 6 6 public function __construct($method_name) { 7 7 parent::__construct( 8 8 pht( 9 - 'Conduit API method "%s" does not exist.')); 9 + 'Conduit API method "%s" does not exist.', 10 + $method_name)); 10 11 } 11 12 12 13 }
+2 -2
src/applications/config/view/PhabricatorSetupIssueView.php
··· 385 385 'p', 386 386 array(), 387 387 pht( 388 - 'PHP also loaded these configuration file(s):', 389 - count($more_loc))); 388 + 'PHP also loaded these %s configuration file(s):', 389 + new PhutilNumber(count($more_loc)))); 390 390 $info[] = phutil_tag( 391 391 'pre', 392 392 array(),
+1 -1
src/applications/differential/event/DifferentialHovercardEventListener.php
··· 60 60 implode_selected_handle_links(', ', $handles, $reviewer_phids)); 61 61 62 62 if ($tasks) { 63 - $hovercard->addField(pht('Task(s)', count($tasks)), 63 + $hovercard->addField(pht('%s Task(s)', new PhutilNumber(count($tasks))), 64 64 implode_selected_handle_links(', ', $handles, $tasks)); 65 65 } 66 66
+4 -4
src/applications/differential/mail/DifferentialCreateMailReceiver.php
··· 79 79 count($diffs)); 80 80 } else { 81 81 $subject = pht( 82 - 'Diff creation failed; see body for error(s).', 83 - count($errors)); 82 + 'Diff creation failed; see body for %s error(s).', 83 + new PhutilNumber(count($errors))); 84 84 } 85 85 $body = new PhabricatorMetaMTAMailBody(); 86 86 $body->addRawSection($subject); 87 87 if (count($diffs)) { 88 88 $text_body = ''; 89 89 $html_body = array(); 90 - $body_label = pht('DIFF LINK(S)', count($diffs)); 90 + $body_label = pht('%s DIFF LINK(S)', new PhutilNumber(count($diffs))); 91 91 foreach ($diffs as $filename => $diff_uri) { 92 92 $text_body .= $filename.': '.$diff_uri."\n"; 93 93 $html_body[] = phutil_tag( ··· 104 104 105 105 if (count($errors)) { 106 106 $body_section = new PhabricatorMetaMTAMailSection(); 107 - $body_label = pht('ERROR(S)', count($errors)); 107 + $body_label = pht('%s ERROR(S)', new PhutilNumber(count($errors))); 108 108 foreach ($errors as $error) { 109 109 $body_section->addFragment($error); 110 110 }
+12 -37
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
··· 10 10 $file = $changeset->getFileType(); 11 11 12 12 $messages = array(); 13 - $none = hsprintf(''); 14 13 switch ($change) { 15 14 16 15 case DifferentialChangeType::TYPE_ADD: 17 16 switch ($file) { 18 17 case DifferentialChangeType::FILE_TEXT: 19 - $messages[] = pht( 20 - 'This file was <strong>added</strong>.', 21 - $none); 18 + $messages[] = pht('This file was added.'); 22 19 break; 23 20 case DifferentialChangeType::FILE_IMAGE: 24 - $messages[] = pht( 25 - 'This image was <strong>added</strong>.', 26 - $none); 21 + $messages[] = pht('This image was added.'); 27 22 break; 28 23 case DifferentialChangeType::FILE_DIRECTORY: 29 - $messages[] = pht( 30 - 'This directory was <strong>added</strong>.', 31 - $none); 24 + $messages[] = pht('This directory was added.'); 32 25 break; 33 26 case DifferentialChangeType::FILE_BINARY: 34 - $messages[] = pht( 35 - 'This binary file was <strong>added</strong>.', 36 - $none); 27 + $messages[] = pht('This binary file was added.'); 37 28 break; 38 29 case DifferentialChangeType::FILE_SYMLINK: 39 - $messages[] = pht( 40 - 'This symlink was <strong>added</strong>.', 41 - $none); 30 + $messages[] = pht('This symlink was added.'); 42 31 break; 43 32 case DifferentialChangeType::FILE_SUBMODULE: 44 - $messages[] = pht( 45 - 'This submodule was <strong>added</strong>.', 46 - $none); 33 + $messages[] = pht('This submodule was added.'); 47 34 break; 48 35 } 49 36 break; ··· 51 38 case DifferentialChangeType::TYPE_DELETE: 52 39 switch ($file) { 53 40 case DifferentialChangeType::FILE_TEXT: 54 - $messages[] = pht( 55 - 'This file was <strong>deleted</strong>.', 56 - $none); 41 + $messages[] = pht('This file was deleted.'); 57 42 break; 58 43 case DifferentialChangeType::FILE_IMAGE: 59 - $messages[] = pht( 60 - 'This image was <strong>deleted</strong>.', 61 - $none); 44 + $messages[] = pht('This image was deleted.'); 62 45 break; 63 46 case DifferentialChangeType::FILE_DIRECTORY: 64 - $messages[] = pht( 65 - 'This directory was <strong>deleted</strong>.', 66 - $none); 47 + $messages[] = pht('This directory was deleted.'); 67 48 break; 68 49 case DifferentialChangeType::FILE_BINARY: 69 - $messages[] = pht( 70 - 'This binary file was <strong>deleted</strong>.', 71 - $none); 50 + $messages[] = pht('This binary file was deleted.'); 72 51 break; 73 52 case DifferentialChangeType::FILE_SYMLINK: 74 - $messages[] = pht( 75 - 'This symlink was <strong>deleted</strong>.', 76 - $none); 53 + $messages[] = pht('This symlink was deleted.'); 77 54 break; 78 55 case DifferentialChangeType::FILE_SUBMODULE: 79 - $messages[] = pht( 80 - 'This submodule was <strong>deleted</strong>.', 81 - $none); 56 + $messages[] = pht('This submodule was deleted.'); 82 57 break; 83 58 } 84 59 break;
+1 -2
src/applications/people/controller/PhabricatorPeopleApproveController.php
··· 31 31 32 32 $title = pht( 33 33 'Phabricator Account "%s" Approved', 34 - $user->getUsername(), 35 - $admin->getUsername()); 34 + $user->getUsername()); 36 35 37 36 $body = pht( 38 37 "Your Phabricator account (%s) has been approved by %s. You can ".
+1 -1
src/applications/repository/data/PhabricatorRepositoryURINormalizer.php
··· 52 52 case self::TYPE_MERCURIAL: 53 53 break; 54 54 default: 55 - throw new Exception(pht('Unknown URI type "%s"!')); 55 + throw new Exception(pht('Unknown URI type "%s"!', $type)); 56 56 } 57 57 58 58 $this->type = $type;
+3 -1
src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php
··· 48 48 49 49 if (empty($refs_raw['data'])) { 50 50 throw new Exception( 51 - pht('Unable to retrieve details for commit "%s"!')); 51 + pht( 52 + 'Unable to retrieve details for commit "%s"!', 53 + $commit->getPHID())); 52 54 } 53 55 54 56 $ref = DiffusionCommitRef::newFromConduitResult(head($refs_raw['data']));
+5 -5
src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php
··· 17 17 'This configuration value is related:', 18 18 'These configuration values are related:', 19 19 ), 20 - 'Task(s)' => array('Task', 'Tasks'), 20 + '%s Task(s)' => array('Task', 'Tasks'), 21 21 22 - 'ERROR(S)' => array('ERROR', 'ERRORS'), 22 + '%s ERROR(S)' => array('ERROR', 'ERRORS'), 23 23 '%d Error(s)' => array('%d Error', '%d Errors'), 24 24 '%d Warning(s)' => array('%d Warning', '%d Warnings'), 25 25 '%d Auto-Fix(es)' => array('%d Auto-Fix', '%d Auto-Fixes'), ··· 32 32 '%d path(s)' => array('%d path', '%d paths'), 33 33 '%d diff(s)' => array('%d diff', '%d diffs'), 34 34 35 - 'DIFF LINK(S)' => array('DIFF LINK', 'DIFF LINKS'), 35 + '%s DIFF LINK(S)' => array('DIFF LINK', 'DIFF LINKS'), 36 36 'You successfully created %d diff(s).' => array( 37 37 'You successfully created %d diff.', 38 38 'You successfully created %d diffs.', 39 39 ), 40 - 'Diff creation failed; see body for error(s).' => array( 40 + 'Diff creation failed; see body for %s error(s).' => array( 41 41 'Diff creation failed; see body for error.', 42 42 'Diff creation failed; see body for errors.', 43 43 ), ··· 499 499 'here:', 500 500 ), 501 501 502 - 'PHP also loaded these configuration file(s):' => array( 502 + 'PHP also loaded these %s configuration file(s):' => array( 503 503 'PHP also loaded this configuration file:', 504 504 'PHP also loaded these configuration files:', 505 505 ),
+3 -1
src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php
··· 37 37 if ($err) { 38 38 return $this->markupError( 39 39 pht( 40 - 'Execution of `cowsay` failed:', $stderr)); 40 + 'Execution of `%s` failed: %s', 41 + 'cowsay', 42 + $stderr)); 41 43 } 42 44 43 45