1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

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
This commit is contained in:
epriestley 2022-04-25 12:02:18 -07:00
parent b3557796fe
commit 67795a46eb
10 changed files with 66 additions and 33 deletions

View file

@ -4,7 +4,7 @@ final class NuancePhabricatorFormSourceDefinition
extends NuanceSourceDefinition {
public function getName() {
return pht('Phabricator Form');
return pht('Web Form');
}
public function getSourceDescription() {

View file

@ -23,7 +23,9 @@ final class PhabricatorOAuthServerApplication extends PhabricatorApplication {
}
public function getFlavorText() {
return pht('Log In with Phabricator');
return pht(
'Log In with %s',
PlatformSymbols::getPlatformServerName());
}
public function getApplicationGroup() {

View file

@ -52,7 +52,7 @@ final class PhabricatorPeopleApproveController
->setTitle(pht('Confirm Approval'))
->appendChild(
pht(
'Allow %s to access this Phabricator install?',
'Allow %s to access this server?',
phutil_tag('strong', array(), $user->getUsername())))
->addCancelButton($done_uri)
->addSubmitButton(pht('Approve Account'));

View file

@ -77,8 +77,9 @@ final class PhabricatorPeopleInviteSendController
$template = array();
$template[] = pht(
'%s has invited you to join Phabricator.',
$viewer->getFullName());
'%s has invited you to join %s.',
$viewer->getFullName(),
PlatformSymbols::getPlatformServerName());
if (strlen(trim($message))) {
$template[] = $message;
@ -174,7 +175,7 @@ final class PhabricatorPeopleInviteSendController
->setUser($viewer)
->appendRemarkupInstructions(
pht(
'To invite users to Phabricator, enter their email addresses below. '.
'To invite users, enter their email addresses below. '.
'Separate addresses with commas or newlines.'))
->appendChild(
id(new AphrontFormTextAreaControl())

View file

@ -185,7 +185,9 @@ final class PhabricatorPeopleNewController
->addCheckbox(
'welcome',
1,
pht('Send "Welcome to Phabricator" email with login instructions.'),
pht(
'Send "Welcome to %s" email with login instructions.',
PlatformSymbols::getPlatformServerName()),
$welcome_checked));
}
@ -202,15 +204,15 @@ final class PhabricatorPeopleNewController
pht(
'**Why do bot accounts need an email address?**'.
"\n\n".
'Although bots do not normally receive email from Phabricator, '.
'they can interact with other systems which require an email '.
'address. Examples include:'.
'Although bots do not normally receive email, they can interact '.
'with other systems which require an email address. Examples '.
'include:'.
"\n\n".
" - If the account takes actions which //send// email, we need ".
" an address to use in the //From// header.\n".
" - If the account creates commits, Git and Mercurial require ".
" an email address for authorship.\n".
" - If you send email //to// Phabricator on behalf of the ".
" - If you send email //to// this server on behalf of the ".
" account, the address can identify the sender.\n".
" - Some internal authentication functions depend on accounts ".
" having an email address.\n".

View file

@ -28,9 +28,13 @@ final class PhabricatorPeopleEmailLoginMailEngine
$is_set_password = $this->isSetPasswordWorkflow();
if ($is_set_password) {
$subject = pht('[Phabricator] Account Password Link');
$subject = pht(
'[%s] Account Password Link',
PlatformSymbols::getPlatformServerName());
} else {
$subject = pht('[Phabricator] Account Login Link');
$subject = pht(
'[%s] Account Login Link',
PlatformSymbols::getPlatformServerName());
}
$recipient = $this->getRecipient();
@ -72,7 +76,7 @@ final class PhabricatorPeopleEmailLoginMailEngine
$login_uri);
} else if ($is_serious) {
$body[] = pht(
"You can use this link to reset your Phabricator password:".
"You can use this link to reset your password:".
"\n\n %s\n",
$login_uri);
} else {
@ -90,8 +94,7 @@ final class PhabricatorPeopleEmailLoginMailEngine
}
} else {
$body[] = pht(
"You can use this login link to regain access to your Phabricator ".
"account:".
"You can use this login link to regain access to your account:".
"\n\n".
" %s\n",
$login_uri);

View file

@ -40,9 +40,10 @@ final class PhabricatorPeopleUsernameMailEngine
$body = sprintf(
"%s\n\n %s\n %s\n",
pht(
'%s (%s) has changed your Phabricator username.',
'%s (%s) has changed your %s username.',
$sender_username,
$sender_realname),
$sender_realname,
PlatformSymbols::getPlatformServerName()),
pht(
'Old Username: %s',
$old_username),
@ -51,7 +52,10 @@ final class PhabricatorPeopleUsernameMailEngine
$new_username));
return id(new PhabricatorMetaMTAMail())
->setSubject(pht('[Phabricator] Username Changed'))
->setSubject(
pht(
'[%s] Username Changed',
PlatformSymbols::getPlatformServerName()))
->setBody($body);
}

View file

@ -80,10 +80,10 @@ final class PhabricatorPeopleWelcomeMailEngine
$use_passwords = PhabricatorPasswordAuthProvider::getPasswordProvider();
if ($use_passwords) {
$message[] = pht(
'To log in to Phabricator, follow this link and set a password:');
'To log in, follow this link and set a password:');
$message[] = pht(' %s', $uri);
$message[] = pht(
'After you have set a password, you can log in to Phabricator in '.
'After you have set a password, you can log in again in '.
'the future by going here:');
$message[] = pht(' %s', $base_uri);
} else {
@ -91,7 +91,7 @@ final class PhabricatorPeopleWelcomeMailEngine
'To log in to your account for the first time, follow this link:');
$message[] = pht(' %s', $uri);
$message[] = pht(
'After you set up your account, you can log in to Phabricator in '.
'After you set up your account, you can log in again in '.
'the future by going here:');
$message[] = pht(' %s', $base_uri);
}
@ -104,7 +104,11 @@ final class PhabricatorPeopleWelcomeMailEngine
$message = implode("\n\n", $message);
return id(new PhabricatorMetaMTAMail())
->setSubject(pht('[Phabricator] Welcome to Phabricator'))
->setSubject(
pht(
'[%s] Welcome to %s',
PlatformSymbols::getPlatformServerName(),
PlatformSymbols::getPlatformServerName()))
->setBody($message);
}

View file

@ -195,7 +195,9 @@ final class PhabricatorUserEmail
$signature = null;
if (!$is_serious) {
$signature = pht("Get Well Soon,\nPhabricator");
$signature = pht(
"Get Well Soon,\n%s",
PlatformSymbols::getPlatformServerName());
}
$body = sprintf(
@ -211,7 +213,10 @@ final class PhabricatorUserEmail
id(new PhabricatorMetaMTAMail())
->addRawTos(array($address))
->setForceDelivery(true)
->setSubject(pht('[Phabricator] Email Verification'))
->setSubject(
pht(
'[%s] Email Verification',
PlatformSymbols::getPlatformServerName()))
->setBody($body)
->setRelatedPHID($user->getPHID())
->saveAndSend();
@ -242,15 +247,18 @@ final class PhabricatorUserEmail
pht('Hi %s', $username),
pht(
'This email address (%s) is no longer your primary email address. '.
'Going forward, Phabricator will send all email to your new primary '.
'email address (%s).',
'Going forward, all email will be sent to your new primary email '.
'address (%s).',
$old_address,
$new_address));
id(new PhabricatorMetaMTAMail())
->addRawTos(array($old_address))
->setForceDelivery(true)
->setSubject(pht('[Phabricator] Primary Address Changed'))
->setSubject(
pht(
'[%s] Primary Address Changed',
PlatformSymbols::getPlatformServerName()))
->setBody($body)
->setFrom($user->getPHID())
->setRelatedPHID($user->getPHID())
@ -276,13 +284,16 @@ final class PhabricatorUserEmail
pht('Hi %s', $username),
pht(
'This is now your primary email address (%s). Going forward, '.
'Phabricator will send all email here.',
'all email will be sent here.',
$new_address));
id(new PhabricatorMetaMTAMail())
->addRawTos(array($new_address))
->setForceDelivery(true)
->setSubject(pht('[Phabricator] Primary Address Changed'))
->setSubject(
pht(
'[%s] Primary Address Changed',
PlatformSymbols::getPlatformServerName()))
->setBody($body)
->setFrom($user->getPHID())
->setRelatedPHID($user->getPHID())

View file

@ -22,14 +22,16 @@ final class PhabricatorUserApproveTransaction
$actor = $this->getActor();
$title = pht(
'Phabricator Account "%s" Approved',
'%s Account "%s" Approved',
PlatformSymbols::getPlatformServerName(),
$user->getUsername());
$body = sprintf(
"%s\n\n %s\n\n",
pht(
'Your Phabricator account (%s) has been approved by %s. You can '.
'Your %s account (%s) has been approved by %s. You can '.
'login here:',
PlatformSymbols::getPlatformServerName(),
$user->getUsername(),
$actor->getUsername()),
PhabricatorEnv::getProductionURI('/'));
@ -37,7 +39,11 @@ final class PhabricatorUserApproveTransaction
$mail = id(new PhabricatorMetaMTAMail())
->addTos(array($user->getPHID()))
->addCCs(array($actor->getPHID()))
->setSubject('[Phabricator] '.$title)
->setSubject(
pht(
'[%s] %s',
PlatformSymbols::getPlatformServerName(),
$title))
->setForceDelivery(true)
->setBody($body)
->saveAndSend();