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

Remove product literal strings in "pht()", part 2

Summary: Ref T13658.

Test Plan:
This test plan is non-exhaustive.

- Used Auth to start an "another copy of Phabricator" OAuth server workflow.

Maniphest Tasks: T13658

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

+44 -43
+2 -2
src/applications/auth/controller/PhabricatorEmailVerificationController.php
··· 44 44 $title = pht('Address Already Verified'); 45 45 $content = pht( 46 46 'This email address has already been verified.'); 47 - $continue = pht('Continue to Phabricator'); 47 + $continue = pht('Continue'); 48 48 } else if ($request->isFormPost()) { 49 49 50 50 id(new PhabricatorUserEditor()) ··· 55 55 $content = pht( 56 56 'The email address %s is now verified.', 57 57 phutil_tag('strong', array(), $email->getAddress())); 58 - $continue = pht('Continue to Phabricator'); 58 + $continue = pht('Continue'); 59 59 } else { 60 60 $title = pht('Verify Email Address'); 61 61 $content = pht(
+1 -1
src/applications/auth/controller/contact/PhabricatorAuthContactNumberTestController.php
··· 39 39 ->setSensitiveContent(false) 40 40 ->setBody( 41 41 pht( 42 - 'This is a terse test text message from Phabricator (%s).', 42 + 'This is a terse test text message (from "%s").', 43 43 $uri->getDomain())) 44 44 ->save(); 45 45
+5 -3
src/applications/auth/factor/PhabricatorDuoAuthFactor.php
··· 133 133 ->setTransactionType($xaction_usernames) 134 134 ->setOptions( 135 135 array( 136 - 'username' => pht('Use Phabricator Username'), 136 + 'username' => pht( 137 + 'Use %s Username', 138 + PlatformSymbols::getPlatformServerName()), 137 139 'email' => pht('Use Primary Email Address'), 138 140 )), 139 141 id(new PhabricatorSelectEditField()) ··· 510 512 ->setIsError(true) 511 513 ->setErrorMessage( 512 514 pht( 513 - 'This factor has been removed from your device, so Phabricator '. 515 + 'This factor has been removed from your device, so this server '. 514 516 'can not send you a challenge. To continue, an administrator '. 515 517 'must strip this factor from your account.')); 516 518 } ··· 547 549 // The Duo push timeout is 60 seconds. Set our challenge to expire slightly 548 550 // more quickly so that we'll re-issue a new challenge before Duo times out. 549 551 // This should keep users away from a dead-end where they can't respond to 550 - // Duo but Phabricator won't issue a new challenge yet. 552 + // Duo but we won't issue a new challenge yet. 551 553 $ttl_seconds = 55; 552 554 553 555 return array(
+2 -1
src/applications/auth/factor/PhabricatorSMSAuthFactor.php
··· 388 388 ->setSensitiveContent(true) 389 389 ->setBody( 390 390 pht( 391 - 'Phabricator (%s) MFA Code: %s', 391 + '%s (%s) MFA Code: %s', 392 + PlatformSymbols::getPlatformServerName(), 392 393 $this->getInstallDisplayName(), 393 394 $envelope->openEnvelope())) 394 395 ->save();
+6 -7
src/applications/auth/management/PhabricatorAuthManagementTrustOAuthClientWorkflow.php
··· 9 9 ->setExamples('**trust-oauth-client** [--id client_id]') 10 10 ->setSynopsis( 11 11 pht( 12 - 'Set Phabricator to trust an OAuth client. Phabricator '. 13 - 'redirects to trusted OAuth clients that users have authorized '. 14 - 'without user intervention.')) 12 + 'Mark an OAuth client as trusted. Trusted OAuth clients may be '. 13 + 'reauthorized without requiring users to manually confirm the '. 14 + 'action.')) 15 15 ->setArguments( 16 16 array( 17 17 array( ··· 28 28 if (!$id) { 29 29 throw new PhutilArgumentUsageException( 30 30 pht( 31 - 'Specify an OAuth client id with %s.', 32 - '--id')); 31 + 'Specify an OAuth client id with "--id".')); 33 32 } 34 33 35 34 $client = id(new PhabricatorOAuthServerClientQuery()) ··· 46 45 if ($client->getIsTrusted()) { 47 46 throw new PhutilArgumentUsageException( 48 47 pht( 49 - 'Phabricator already trusts OAuth client "%s".', 48 + 'OAuth client "%s" is already trusted.', 50 49 $client->getName())); 51 50 } 52 51 ··· 57 56 $console->writeOut( 58 57 "%s\n", 59 58 pht( 60 - 'Updated; Phabricator trusts OAuth client %s.', 59 + 'OAuth client "%s" is now trusted.', 61 60 $client->getName())); 62 61 } 63 62
+4 -5
src/applications/auth/management/PhabricatorAuthManagementUntrustOAuthClientWorkflow.php
··· 9 9 ->setExamples('**untrust-oauth-client** [--id client_id]') 10 10 ->setSynopsis( 11 11 pht( 12 - 'Set Phabricator to not trust an OAuth client. Phabricator '. 13 - 'redirects to trusted OAuth clients that users have authorized '. 14 - 'without user intervention.')) 12 + 'Remove trust from an OAuth client. Users must manually confirm '. 13 + 'reauthorization of untrusted OAuth clients.')) 15 14 ->setArguments( 16 15 array( 17 16 array( ··· 46 45 if (!$client->getIsTrusted()) { 47 46 throw new PhutilArgumentUsageException( 48 47 pht( 49 - 'Phabricator already does not trust OAuth client "%s".', 48 + 'OAuth client "%s" is already untrusted.', 50 49 $client->getName())); 51 50 } 52 51 ··· 57 56 $console->writeOut( 58 57 "%s\n", 59 58 pht( 60 - 'Updated; Phabricator does not trust OAuth client %s.', 59 + 'OAuth client "%s" is now trusted.', 61 60 $client->getName())); 62 61 } 63 62
+18 -20
src/applications/auth/provider/PhabricatorPhabricatorAuthProvider.php
··· 7 7 const PROPERTY_PHABRICATOR_URI = 'oauth2:phabricator:uri'; 8 8 9 9 public function getProviderName() { 10 - return pht('Phabricator'); 10 + return PlatformSymbols::getPlatformServerName(); 11 11 } 12 12 13 13 public function getConfigurationHelp() { 14 14 if ($this->isCreate()) { 15 15 return pht( 16 - "**Step 1 of 2 - Name Phabricator OAuth Instance**\n\n". 17 - 'Choose a permanent name for the OAuth server instance of '. 18 - 'Phabricator. //This// instance of Phabricator uses this name '. 19 - 'internally to keep track of the OAuth server instance of '. 20 - 'Phabricator, in case the URL changes later.'); 16 + "**Step 1 of 2 - Name Remote Server**\n\n". 17 + 'Choose a permanent name for the remote server you want to connect '. 18 + 'to. This name is used internally to keep track of the remote '. 19 + 'server, in case the URL changes later.'); 21 20 } 22 21 23 22 return parent::getConfigurationHelp(); ··· 29 28 $login_uri = PhabricatorEnv::getURI($this->getLoginURI()); 30 29 31 30 return pht( 32 - "**Step 2 of 2 - Configure Phabricator OAuth Instance**\n\n". 33 - "To configure Phabricator OAuth, create a new application here:". 31 + "**Step 2 of 2 - Configure OAuth Server**\n\n". 32 + "To configure OAuth, create a new application here:". 34 33 "\n\n". 35 34 "%s/oauthserver/client/create/". 36 35 "\n\n". ··· 54 53 } 55 54 56 55 protected function getLoginIcon() { 57 - return 'Phabricator'; 56 + return PlatformSymbols::getPlatformServerName(); 58 57 } 59 58 60 59 private function isCreate() { ··· 106 105 $key_uri = self::PROPERTY_PHABRICATOR_URI; 107 106 108 107 if (!strlen($values[$key_name])) { 109 - $errors[] = pht('Phabricator instance name is required.'); 108 + $errors[] = pht('Server name is required.'); 110 109 $issues[$key_name] = pht('Required'); 111 110 } else if (!preg_match('/^[a-z0-9.]+\z/', $values[$key_name])) { 112 111 $errors[] = pht( 113 - 'Phabricator instance name must contain only lowercase letters, '. 112 + 'Server name must contain only lowercase letters, '. 114 113 'digits, and periods.'); 115 114 $issues[$key_name] = pht('Invalid'); 116 115 } 117 116 118 117 if (!strlen($values[$key_uri])) { 119 - $errors[] = pht('Phabricator base URI is required.'); 118 + $errors[] = pht('Base URI is required.'); 120 119 $issues[$key_uri] = pht('Required'); 121 120 } else { 122 121 $uri = new PhutilURI($values[$key_uri]); 123 122 if (!$uri->getProtocol()) { 124 123 $errors[] = pht( 125 - 'Phabricator base URI should include protocol (like "%s").', 124 + 'Base URI should include protocol (like "%s").', 126 125 'https://'); 127 126 $issues[$key_uri] = pht('Invalid'); 128 127 } ··· 161 160 $form 162 161 ->appendChild( 163 162 id(new AphrontFormTextControl()) 164 - ->setLabel(pht('Phabricator Instance Name')) 163 + ->setLabel(pht('Server Name')) 165 164 ->setValue($v_name) 166 165 ->setName(self::PROPERTY_PHABRICATOR_NAME) 167 166 ->setError($e_name) ··· 170 169 phutil_tag( 171 170 'tt', 172 171 array(), 173 - '`phabricator.oauthserver`')))); 172 + '`example.oauthserver`')))); 174 173 } else { 175 174 $form 176 175 ->appendChild( 177 176 id(new AphrontFormStaticControl()) 178 - ->setLabel(pht('Phabricator Instance Name')) 177 + ->setLabel(pht('Server Name')) 179 178 ->setValue($v_name)); 180 179 } 181 180 182 181 $form 183 182 ->appendChild( 184 183 id(new AphrontFormTextControl()) 185 - ->setLabel(pht('Phabricator Base URI')) 184 + ->setLabel(pht('Base URI')) 186 185 ->setValue($v_uri) 187 186 ->setName(self::PROPERTY_PHABRICATOR_URI) 188 187 ->setCaption( 189 188 pht( 190 - 'The URI where the OAuth server instance of Phabricator is '. 191 - 'installed. For example: %s', 192 - phutil_tag('tt', array(), 'https://phabricator.mycompany.com/'))) 189 + 'The URI where the OAuth server is installed. For example: %s', 190 + phutil_tag('tt', array(), 'https://devtools.example.com/'))) 193 191 ->setError($e_uri)); 194 192 195 193 if (!$is_setup) {
+4 -2
src/applications/auth/worker/PhabricatorAuthInviteWorker.php
··· 51 51 ->setForceDelivery(true) 52 52 ->setSubject( 53 53 pht( 54 - '[Phabricator] %s has invited you to join Phabricator', 55 - $author->getFullName())) 54 + '[%s] %s has invited you to join %s', 55 + PlatformSymbols::getPlatformServerName(), 56 + $author->getFullName(), 57 + PlatformSymbols::getPlatformServerName())) 56 58 ->setBody($template) 57 59 ->saveAndSend(); 58 60 }
+1 -1
src/applications/calendar/codex/PhabricatorCalendarEventPolicyCodex.php
··· 71 71 ->setIsActive($object->isImportedEvent()) 72 72 ->setDescription( 73 73 pht( 74 - 'Imported events can not be edited in Phabricator.')); 74 + 'Imported events can not be edited.')); 75 75 76 76 return $rules; 77 77 }
+1 -1
src/applications/config/application/PhabricatorConfigApplication.php
··· 31 31 } 32 32 33 33 public function getShortDescription() { 34 - return pht('Configure Phabricator'); 34 + return pht('Configure %s', PlatformSymbols::getPlatformServerName()); 35 35 } 36 36 37 37 public function getRoutes() {