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

Summary: Ref T13658. I used the linter in D21763 to identify these and `split` them into arbitrary groups of 10 files.

Test Plan:
This test plan is non-exhaustive, because some of these strings are difficult to reach.

- Looked at "Create Service" in Almanac.
- Used "bin/auth" to go through a one-time auth workflow (not all related strings can be hit on a single workflow).
- Started the "Generate Keypair" worfklow in "SSH Public Keys".

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13658

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

+65 -49
+1 -1
resources/sql/patches/20130820.file-mailkey-populate.php
··· 1 1 <?php 2 2 3 - echo pht('Populating Phabricator files with mail keys xactions...')."\n"; 3 + echo pht('Populating files with mail keys...')."\n"; 4 4 5 5 $table = new PhabricatorFile(); 6 6 $table_name = $table->getTableName();
+7 -7
scripts/sql/manage_storage.php
··· 5 5 require_once $root.'/scripts/init/init-setup.php'; 6 6 7 7 $args = new PhutilArgumentParser($argv); 8 - $args->setTagline(pht('manage Phabricator storage and schemata')); 8 + $args->setTagline(pht('manage storage and schemata')); 9 9 $args->setSynopsis(<<<EOHELP 10 10 **storage** __workflow__ [__options__] 11 - Manage Phabricator database storage and schema versioning. 11 + Manage database storage and schema versioning. 12 12 13 13 **storage** upgrade 14 - Initialize or upgrade Phabricator storage. 14 + Initialize or upgrade storage. 15 15 16 16 **storage** upgrade --user __root__ --password __hunter2__ 17 17 Use administrative credentials for schema changes. ··· 74 74 'name' => 'disable-utf8mb4', 75 75 'help' => pht( 76 76 'Disable %s, even if the database supports it. This is an '. 77 - 'advanced feature used for testing changes to Phabricator; you '. 77 + 'advanced feature used for testing internal changes; you '. 78 78 'should not normally use this flag.', 79 79 'utf8mb4'), 80 80 ), ··· 168 168 'Unable to connect to MySQL using the configured credentials. '. 169 169 'You must configure standard credentials before you can upgrade '. 170 170 'storage. Run these commands to set up credentials:'), 171 - " phabricator/ $ ./bin/config set mysql.host __host__\n". 172 - " phabricator/ $ ./bin/config set mysql.user __username__\n". 173 - " phabricator/ $ ./bin/config set mysql.pass __password__", 171 + " $ ./bin/config set mysql.host __host__\n". 172 + " $ ./bin/config set mysql.user __username__\n". 173 + " $ ./bin/config set mysql.pass __password__", 174 174 pht( 175 175 'These standard credentials are separate from any administrative '. 176 176 'credentials provided to this command with __%s__ or '.
+8 -6
scripts/ssh/ssh-exec.php
··· 130 130 if (!PhabricatorEnv::isClusterAddress($remote_address)) { 131 131 throw new Exception( 132 132 pht( 133 - 'This request originates from outside of the Phabricator cluster '. 134 - 'address range. Requests signed with a trusted device key must '. 135 - 'originate from trusted hosts.')); 133 + 'This request originates from outside of the cluster address range. '. 134 + 'Requests signed with a trusted device key must originate from '. 135 + 'trusted hosts.')); 136 136 } 137 137 138 138 $device = id(new AlmanacDeviceQuery()) ··· 228 228 $command_list = implode(', ', $command_list); 229 229 230 230 $error_lines = array(); 231 - $error_lines[] = pht('Welcome to Phabricator.'); 231 + $error_lines[] = pht( 232 + 'Welcome to %s.', 233 + PlatformSymbols::getPlatformServerName()); 232 234 $error_lines[] = pht( 233 235 'You are logged in as %s.', 234 236 $user_name); ··· 236 238 if (!$original_argv) { 237 239 $error_lines[] = pht( 238 240 'You have not specified a command to run. This means you are requesting '. 239 - 'an interactive shell, but Phabricator does not provide interactive '. 241 + 'an interactive shell, but this server does not provide interactive '. 240 242 'shells over SSH.'); 241 243 $error_lines[] = pht( 242 244 '(Usually, you should run a command like "git clone" or "hg push" '. ··· 270 272 if (empty($workflows[$command])) { 271 273 $error_lines[] = pht( 272 274 'You have specified the command "%s", but that command is not '. 273 - 'supported by Phabricator. As received by Phabricator, your entire '. 275 + 'supported by this server. As received by this server, your entire '. 274 276 'argument list was:', 275 277 $command); 276 278
+2 -2
src/applications/almanac/servicetype/AlmanacClusterDatabaseServiceType.php
··· 10 10 } 11 11 12 12 public function getServiceTypeName() { 13 - return pht('Phabricator Cluster: Database'); 13 + return pht('Cluster: Database'); 14 14 } 15 15 16 16 public function getServiceTypeDescription() { 17 17 return pht( 18 - 'Defines a database service for use in a Phabricator cluster.'); 18 + 'Defines a database service for use in a cluster.'); 19 19 } 20 20 21 21 }
+2 -2
src/applications/almanac/servicetype/AlmanacClusterRepositoryServiceType.php
··· 10 10 } 11 11 12 12 public function getServiceTypeName() { 13 - return pht('Phabricator Cluster: Repository'); 13 + return pht('Cluster: Repository'); 14 14 } 15 15 16 16 public function getServiceTypeDescription() { 17 17 return pht( 18 - 'Defines a repository service for use in a Phabricator cluster.'); 18 + 'Defines a repository service for use in a cluster.'); 19 19 } 20 20 21 21 public function getFieldSpecifications() {
+1 -2
src/applications/auth/adapter/PhutilPhabricatorAuthAdapter.php
··· 89 89 } catch (PhutilJSONParserException $ex) { 90 90 throw new Exception( 91 91 pht( 92 - 'Expected valid JSON response from Phabricator %s request.', 93 - 'user.whoami'), 92 + 'Expected valid JSON response from "user.whoami" request.'), 94 93 $ex); 95 94 } 96 95 }
+7 -3
src/applications/auth/controller/PhabricatorAuthController.php
··· 254 254 } 255 255 256 256 $invite_item = id(new PHUIObjectItemView()) 257 - ->setHeader(pht('Welcome to Phabricator!')) 257 + ->setHeader( 258 + pht( 259 + 'Welcome to %s!', 260 + PlatformSymbols::getPlatformServerName())) 258 261 ->setImageURI($invite_author->getProfileImageURI()) 259 262 ->addAttribute( 260 263 pht( 261 - '%s has invited you to join Phabricator.', 262 - $invite_author->getFullName())); 264 + '%s has invited you to join %s.', 265 + $invite_author->getFullName(), 266 + PlatformSymbols::getPlatformServerName())); 263 267 264 268 $invite_list = id(new PHUIObjectItemListView()) 265 269 ->addItem($invite_item)
+6 -2
src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php
··· 151 151 152 152 switch ($link_type) { 153 153 case PhabricatorAuthSessionEngine::ONETIME_WELCOME: 154 - $title = pht('Welcome to Phabricator'); 154 + $title = pht( 155 + 'Welcome to %s', 156 + PlatformSymbols::getPlatformServerName()); 155 157 break; 156 158 case PhabricatorAuthSessionEngine::ONETIME_RECOVER: 157 159 $title = pht('Account Recovery'); ··· 159 161 case PhabricatorAuthSessionEngine::ONETIME_USERNAME: 160 162 case PhabricatorAuthSessionEngine::ONETIME_RESET: 161 163 default: 162 - $title = pht('Log in to Phabricator'); 164 + $title = pht( 165 + 'Log in to %s', 166 + PlatformSymbols::getPlatformServerName()); 163 167 break; 164 168 } 165 169
+30 -23
src/applications/auth/controller/PhabricatorAuthRegisterController.php
··· 83 83 if (!PhabricatorUserEmail::isValidAddress($default_email)) { 84 84 $errors[] = pht( 85 85 'The email address associated with this external account ("%s") is '. 86 - 'not a valid email address and can not be used to register a '. 87 - 'Phabricator account. Choose a different, valid address.', 86 + 'not a valid email address and can not be used to register an '. 87 + 'account. Choose a different, valid address.', 88 88 phutil_tag('strong', array(), $default_email)); 89 89 $default_email = null; 90 90 } ··· 102 102 $errors[] = pht( 103 103 'The email address associated with this account ("%s") is '. 104 104 'already in use by an application and can not be used to '. 105 - 'register a new Phabricator account. Choose a different, valid '. 106 - 'address.', 105 + 'register a new account. Choose a different, valid address.', 107 106 phutil_tag('strong', array(), $default_email)); 108 107 $default_email = null; 109 108 } ··· 122 121 array( 123 122 pht( 124 123 'The account you are attempting to register with has an invalid '. 125 - 'email address (%s). This Phabricator install only allows '. 126 - 'registration with specific email addresses:', 124 + 'email address (%s). This server only allows registration with '. 125 + 'specific email addresses:', 127 126 $debug_email), 128 127 phutil_tag('br'), 129 128 phutil_tag('br'), ··· 157 156 ->addHiddenInput('phase', 1) 158 157 ->appendParagraph( 159 158 pht( 160 - 'You are creating a new Phabricator account linked to an '. 161 - 'existing external account from outside Phabricator.')) 159 + 'You are creating a new account linked to an existing '. 160 + 'external account.')) 162 161 ->appendParagraph( 163 162 pht( 164 163 'The email address ("%s") associated with the external account '. 165 - 'is already in use by an existing Phabricator account. Multiple '. 166 - 'Phabricator accounts may not have the same email address, so '. 167 - 'you can not use this email address to register a new '. 168 - 'Phabricator account.', 169 - phutil_tag('strong', array(), $show_existing))) 164 + 'is already in use by an existing %s account. Multiple '. 165 + '%s accounts may not have the same email address, so '. 166 + 'you can not use this email address to register a new account.', 167 + phutil_tag('strong', array(), $show_existing), 168 + PlatformSymbols::getPlatformServerName(), 169 + PlatformSymbols::getPlatformServerName())) 170 170 ->appendParagraph( 171 171 pht( 172 172 'If you want to register a new account, continue with this '. ··· 174 174 'for the new account.')) 175 175 ->appendParagraph( 176 176 pht( 177 - 'If you want to link an existing Phabricator account to this '. 177 + 'If you want to link an existing %s account to this '. 178 178 'external account, do not continue. Instead: log in to your '. 179 179 'existing account, then go to "Settings" and link the account '. 180 - 'in the "External Accounts" panel.')) 180 + 'in the "External Accounts" panel.', 181 + PlatformSymbols::getPlatformServerName())) 181 182 ->appendParagraph( 182 183 pht( 183 184 'If you continue, you will create a new account. You will not '. ··· 187 188 } else { 188 189 $errors[] = pht( 189 190 'The external account you are registering with has an email address '. 190 - 'that is already in use ("%s") by an existing Phabricator account. '. 191 - 'Choose a new, valid email address to register a new Phabricator '. 192 - 'account.', 193 - phutil_tag('strong', array(), $show_existing)); 191 + 'that is already in use ("%s") by an existing %s account. '. 192 + 'Choose a new, valid email address to register a new account.', 193 + phutil_tag('strong', array(), $show_existing), 194 + PlatformSymbols::getPlatformServerName()); 194 195 } 195 196 } 196 197 ··· 595 596 596 597 if ($is_setup) { 597 598 $crumbs->addTextCrumb(pht('Setup Admin Account')); 598 - $title = pht('Welcome to Phabricator'); 599 + $title = pht( 600 + 'Welcome to %s', 601 + PlatformSymbols::getPlatformServerName()); 599 602 } else { 600 603 $crumbs->addTextCrumb(pht('Register')); 601 604 $crumbs->addTextCrumb($provider->getProviderName()); ··· 607 610 if ($is_setup) { 608 611 $welcome_view = id(new PHUIInfoView()) 609 612 ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 610 - ->setTitle(pht('Welcome to Phabricator')) 613 + ->setTitle( 614 + pht( 615 + 'Welcome to %s', 616 + PlatformSymbols::getPlatformServerName())) 611 617 ->appendChild( 612 618 pht( 613 619 'Installation is complete. Register your administrator account '. ··· 710 716 } 711 717 712 718 private function sendWaitingForApprovalEmail(PhabricatorUser $user) { 713 - $title = '[Phabricator] '.pht( 714 - 'New User "%s" Awaiting Approval', 719 + $title = pht( 720 + '[%s] New User "%s" Awaiting Approval', 721 + PlatformSymbols::getPlatformServerName(), 715 722 $user->getUsername()); 716 723 717 724 $body = new PhabricatorMetaMTAMailBody();
+1 -1
src/applications/auth/controller/PhabricatorAuthSSHKeyGenerateController.php
··· 105 105 'This workflow will generate a new SSH keypair, add the public '. 106 106 'key, and let you download the private key.')) 107 107 ->appendParagraph( 108 - pht('Phabricator will not retain a copy of the private key.')) 108 + pht('The private key will not be retained.')) 109 109 ->addSubmitButton(pht('Generate New Keypair')) 110 110 ->addCancelButton($cancel_uri); 111 111 } catch (Exception $ex) {