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

Summary: Ref T13658.

Test Plan: None of these strings look trivially testable, just relied on static tools.

Maniphest Tasks: T13658

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

+66 -33
+1 -1
src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php
··· 4 4 extends NuanceSourceDefinition { 5 5 6 6 public function getName() { 7 - return pht('Phabricator Form'); 7 + return pht('Web Form'); 8 8 } 9 9 10 10 public function getSourceDescription() {
+3 -1
src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php
··· 23 23 } 24 24 25 25 public function getFlavorText() { 26 - return pht('Log In with Phabricator'); 26 + return pht( 27 + 'Log In with %s', 28 + PlatformSymbols::getPlatformServerName()); 27 29 } 28 30 29 31 public function getApplicationGroup() {
+1 -1
src/applications/people/controller/PhabricatorPeopleApproveController.php
··· 52 52 ->setTitle(pht('Confirm Approval')) 53 53 ->appendChild( 54 54 pht( 55 - 'Allow %s to access this Phabricator install?', 55 + 'Allow %s to access this server?', 56 56 phutil_tag('strong', array(), $user->getUsername()))) 57 57 ->addCancelButton($done_uri) 58 58 ->addSubmitButton(pht('Approve Account'));
+4 -3
src/applications/people/controller/PhabricatorPeopleInviteSendController.php
··· 77 77 78 78 $template = array(); 79 79 $template[] = pht( 80 - '%s has invited you to join Phabricator.', 81 - $viewer->getFullName()); 80 + '%s has invited you to join %s.', 81 + $viewer->getFullName(), 82 + PlatformSymbols::getPlatformServerName()); 82 83 83 84 if (strlen(trim($message))) { 84 85 $template[] = $message; ··· 174 175 ->setUser($viewer) 175 176 ->appendRemarkupInstructions( 176 177 pht( 177 - 'To invite users to Phabricator, enter their email addresses below. '. 178 + 'To invite users, enter their email addresses below. '. 178 179 'Separate addresses with commas or newlines.')) 179 180 ->appendChild( 180 181 id(new AphrontFormTextAreaControl())
+7 -5
src/applications/people/controller/PhabricatorPeopleNewController.php
··· 185 185 ->addCheckbox( 186 186 'welcome', 187 187 1, 188 - pht('Send "Welcome to Phabricator" email with login instructions.'), 188 + pht( 189 + 'Send "Welcome to %s" email with login instructions.', 190 + PlatformSymbols::getPlatformServerName()), 189 191 $welcome_checked)); 190 192 } 191 193 ··· 202 204 pht( 203 205 '**Why do bot accounts need an email address?**'. 204 206 "\n\n". 205 - 'Although bots do not normally receive email from Phabricator, '. 206 - 'they can interact with other systems which require an email '. 207 - 'address. Examples include:'. 207 + 'Although bots do not normally receive email, they can interact '. 208 + 'with other systems which require an email address. Examples '. 209 + 'include:'. 208 210 "\n\n". 209 211 " - If the account takes actions which //send// email, we need ". 210 212 " an address to use in the //From// header.\n". 211 213 " - If the account creates commits, Git and Mercurial require ". 212 214 " an email address for authorship.\n". 213 - " - If you send email //to// Phabricator on behalf of the ". 215 + " - If you send email //to// this server on behalf of the ". 214 216 " account, the address can identify the sender.\n". 215 217 " - Some internal authentication functions depend on accounts ". 216 218 " having an email address.\n".
+8 -5
src/applications/people/mail/PhabricatorPeopleEmailLoginMailEngine.php
··· 28 28 $is_set_password = $this->isSetPasswordWorkflow(); 29 29 30 30 if ($is_set_password) { 31 - $subject = pht('[Phabricator] Account Password Link'); 31 + $subject = pht( 32 + '[%s] Account Password Link', 33 + PlatformSymbols::getPlatformServerName()); 32 34 } else { 33 - $subject = pht('[Phabricator] Account Login Link'); 35 + $subject = pht( 36 + '[%s] Account Login Link', 37 + PlatformSymbols::getPlatformServerName()); 34 38 } 35 39 36 40 $recipient = $this->getRecipient(); ··· 72 76 $login_uri); 73 77 } else if ($is_serious) { 74 78 $body[] = pht( 75 - "You can use this link to reset your Phabricator password:". 79 + "You can use this link to reset your password:". 76 80 "\n\n %s\n", 77 81 $login_uri); 78 82 } else { ··· 90 94 } 91 95 } else { 92 96 $body[] = pht( 93 - "You can use this login link to regain access to your Phabricator ". 94 - "account:". 97 + "You can use this login link to regain access to your account:". 95 98 "\n\n". 96 99 " %s\n", 97 100 $login_uri);
+7 -3
src/applications/people/mail/PhabricatorPeopleUsernameMailEngine.php
··· 40 40 $body = sprintf( 41 41 "%s\n\n %s\n %s\n", 42 42 pht( 43 - '%s (%s) has changed your Phabricator username.', 43 + '%s (%s) has changed your %s username.', 44 44 $sender_username, 45 - $sender_realname), 45 + $sender_realname, 46 + PlatformSymbols::getPlatformServerName()), 46 47 pht( 47 48 'Old Username: %s', 48 49 $old_username), ··· 51 52 $new_username)); 52 53 53 54 return id(new PhabricatorMetaMTAMail()) 54 - ->setSubject(pht('[Phabricator] Username Changed')) 55 + ->setSubject( 56 + pht( 57 + '[%s] Username Changed', 58 + PlatformSymbols::getPlatformServerName())) 55 59 ->setBody($body); 56 60 } 57 61
+8 -4
src/applications/people/mail/PhabricatorPeopleWelcomeMailEngine.php
··· 80 80 $use_passwords = PhabricatorPasswordAuthProvider::getPasswordProvider(); 81 81 if ($use_passwords) { 82 82 $message[] = pht( 83 - 'To log in to Phabricator, follow this link and set a password:'); 83 + 'To log in, follow this link and set a password:'); 84 84 $message[] = pht(' %s', $uri); 85 85 $message[] = pht( 86 - 'After you have set a password, you can log in to Phabricator in '. 86 + 'After you have set a password, you can log in again in '. 87 87 'the future by going here:'); 88 88 $message[] = pht(' %s', $base_uri); 89 89 } else { ··· 91 91 'To log in to your account for the first time, follow this link:'); 92 92 $message[] = pht(' %s', $uri); 93 93 $message[] = pht( 94 - 'After you set up your account, you can log in to Phabricator in '. 94 + 'After you set up your account, you can log in again in '. 95 95 'the future by going here:'); 96 96 $message[] = pht(' %s', $base_uri); 97 97 } ··· 104 104 $message = implode("\n\n", $message); 105 105 106 106 return id(new PhabricatorMetaMTAMail()) 107 - ->setSubject(pht('[Phabricator] Welcome to Phabricator')) 107 + ->setSubject( 108 + pht( 109 + '[%s] Welcome to %s', 110 + PlatformSymbols::getPlatformServerName(), 111 + PlatformSymbols::getPlatformServerName())) 108 112 ->setBody($message); 109 113 } 110 114
+18 -7
src/applications/people/storage/PhabricatorUserEmail.php
··· 195 195 196 196 $signature = null; 197 197 if (!$is_serious) { 198 - $signature = pht("Get Well Soon,\nPhabricator"); 198 + $signature = pht( 199 + "Get Well Soon,\n%s", 200 + PlatformSymbols::getPlatformServerName()); 199 201 } 200 202 201 203 $body = sprintf( ··· 211 213 id(new PhabricatorMetaMTAMail()) 212 214 ->addRawTos(array($address)) 213 215 ->setForceDelivery(true) 214 - ->setSubject(pht('[Phabricator] Email Verification')) 216 + ->setSubject( 217 + pht( 218 + '[%s] Email Verification', 219 + PlatformSymbols::getPlatformServerName())) 215 220 ->setBody($body) 216 221 ->setRelatedPHID($user->getPHID()) 217 222 ->saveAndSend(); ··· 242 247 pht('Hi %s', $username), 243 248 pht( 244 249 'This email address (%s) is no longer your primary email address. '. 245 - 'Going forward, Phabricator will send all email to your new primary '. 246 - 'email address (%s).', 250 + 'Going forward, all email will be sent to your new primary email '. 251 + 'address (%s).', 247 252 $old_address, 248 253 $new_address)); 249 254 250 255 id(new PhabricatorMetaMTAMail()) 251 256 ->addRawTos(array($old_address)) 252 257 ->setForceDelivery(true) 253 - ->setSubject(pht('[Phabricator] Primary Address Changed')) 258 + ->setSubject( 259 + pht( 260 + '[%s] Primary Address Changed', 261 + PlatformSymbols::getPlatformServerName())) 254 262 ->setBody($body) 255 263 ->setFrom($user->getPHID()) 256 264 ->setRelatedPHID($user->getPHID()) ··· 276 284 pht('Hi %s', $username), 277 285 pht( 278 286 'This is now your primary email address (%s). Going forward, '. 279 - 'Phabricator will send all email here.', 287 + 'all email will be sent here.', 280 288 $new_address)); 281 289 282 290 id(new PhabricatorMetaMTAMail()) 283 291 ->addRawTos(array($new_address)) 284 292 ->setForceDelivery(true) 285 - ->setSubject(pht('[Phabricator] Primary Address Changed')) 293 + ->setSubject( 294 + pht( 295 + '[%s] Primary Address Changed', 296 + PlatformSymbols::getPlatformServerName())) 286 297 ->setBody($body) 287 298 ->setFrom($user->getPHID()) 288 299 ->setRelatedPHID($user->getPHID())
+9 -3
src/applications/people/xaction/PhabricatorUserApproveTransaction.php
··· 22 22 23 23 $actor = $this->getActor(); 24 24 $title = pht( 25 - 'Phabricator Account "%s" Approved', 25 + '%s Account "%s" Approved', 26 + PlatformSymbols::getPlatformServerName(), 26 27 $user->getUsername()); 27 28 28 29 $body = sprintf( 29 30 "%s\n\n %s\n\n", 30 31 pht( 31 - 'Your Phabricator account (%s) has been approved by %s. You can '. 32 + 'Your %s account (%s) has been approved by %s. You can '. 32 33 'login here:', 34 + PlatformSymbols::getPlatformServerName(), 33 35 $user->getUsername(), 34 36 $actor->getUsername()), 35 37 PhabricatorEnv::getProductionURI('/')); ··· 37 39 $mail = id(new PhabricatorMetaMTAMail()) 38 40 ->addTos(array($user->getPHID())) 39 41 ->addCCs(array($actor->getPHID())) 40 - ->setSubject('[Phabricator] '.$title) 42 + ->setSubject( 43 + pht( 44 + '[%s] %s', 45 + PlatformSymbols::getPlatformServerName(), 46 + $title)) 41 47 ->setForceDelivery(true) 42 48 ->setBody($body) 43 49 ->saveAndSend();