Select the types of activity you want to include in your feed.
@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
···217217 $effect->setAction(HeraldActionConfig::ACTION_ADD_CC);
218218 $effect->setTarget(array_keys($this->explicitCCs));
219219 $effect->setReason(
220220- 'CCs provided explicitly by revision author or carried over from a '.
221221- 'previous version of the revision.');
220220+ pht('CCs provided explicitly by revision author or carried over '.
221221+ 'from a previous version of the revision.'));
222222 $result[] = new HeraldApplyTranscript(
223223 $effect,
224224 true,
225225- 'Added addresses to CC list.');
225225+ pht('Added addresses to CC list.'));
226226 }
227227228228 $forbidden_ccs = array_fill_keys(
···236236 $result[] = new HeraldApplyTranscript(
237237 $effect,
238238 true,
239239- 'OK, did nothing.');
239239+ pht('OK, did nothing.'));
240240 break;
241241 case HeraldActionConfig::ACTION_FLAG:
242242 $result[] = parent::applyFlagEffect(
···269269 $result[] = new HeraldApplyTranscript(
270270 $effect,
271271 true,
272272- 'Added these addresses to '.$op.' list. '.
273273- 'Others could not be added.');
272272+ pht('Added these addresses to %s list. '.
273273+ 'Others could not be added.', $op));
274274 }
275275 $result[] = new HeraldApplyTranscript(
276276 $failed,
277277 false,
278278- $op.' forbidden, these addresses have unsubscribed.');
278278+ pht('%s forbidden, these addresses have unsubscribed.', $op));
279279 } else {
280280 $result[] = new HeraldApplyTranscript(
281281 $effect,
282282 true,
283283- 'Added addresses to '.$op.' list.');
283283+ pht('Added addresses to %s list.', $op));
284284 }
285285 break;
286286 case HeraldActionConfig::ACTION_REMOVE_CC:
···290290 $result[] = new HeraldApplyTranscript(
291291 $effect,
292292 true,
293293- 'Removed addresses from CC list.');
293293+ pht('Removed addresses from CC list.'));
294294 break;
295295 default:
296296 throw new Exception("No rules to handle action '{$action}'.");
···2525 $results[] = new HeraldApplyTranscript(
2626 $effect,
2727 false,
2828- 'This was a dry run, so no actions were actually taken.');
2828+ pht('This was a dry run, so no actions were actually taken.'));
2929 }
3030 return $results;
3131 }
···1515 $errors = array();
1616 if ($request->isFormPost()) {
1717 if (!$object_name) {
1818- $e_name = 'Required';
1919- $errors[] = 'An object name is required.';
1818+ $e_name = pht('Required');
1919+ $errors[] = pht('An object name is required.');
2020 }
21212222 if (!$errors) {
···2525 if (preg_match('/^D(\d+)$/', $object_name, $matches)) {
2626 $object = id(new DifferentialRevision())->load($matches[1]);
2727 if (!$object) {
2828- $e_name = 'Invalid';
2929- $errors[] = 'No Differential Revision with that ID exists.';
2828+ $e_name = pht('Invalid');
2929+ $errors[] = pht('No Differential Revision with that ID exists.');
3030 }
3131 } else if (preg_match('/^r([A-Z]+)(\w+)$/', $object_name, $matches)) {
3232 $repo = id(new PhabricatorRepository())->loadOneWhere(
3333 'callsign = %s',
3434 $matches[1]);
3535 if (!$repo) {
3636- $e_name = 'Invalid';
3737- $errors[] = 'There is no repository with the callsign '.
3838- $matches[1].'.';
3636+ $e_name = pht('Invalid');
3737+ $errors[] = pht('There is no repository with the callsign: %s.',
3838+ $matches[1]);
3939 }
4040 $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
4141 'repositoryID = %d AND commitIdentifier = %s',
4242 $repo->getID(),
4343 $matches[2]);
4444 if (!$commit) {
4545- $e_name = 'Invalid';
4646- $errors[] = 'There is no commit with that identifier.';
4545+ $e_name = pht('Invalid');
4646+ $errors[] = pht('There is no commit with that identifier.');
4747 }
4848 $object = $commit;
4949 } else {
5050- $e_name = 'Invalid';
5151- $errors[] = 'This object name is not recognized.';
5050+ $e_name = pht('Invalid');
5151+ $errors[] = pht('This object name is not recognized.');
5252 }
53535454 if (!$errors) {
···88888989 if ($errors) {
9090 $error_view = new AphrontErrorView();
9191- $error_view->setTitle('Form Errors');
9191+ $error_view->setTitle(pht('Form Errors'));
9292 $error_view->setErrors($errors);
9393 } else {
9494 $error_view = null;
9595 }
96969797+ $text = pht('Enter an object to test rules '.
9898+ 'for, like a Diffusion commit (e.g., rX123) or a '.
9999+ 'Differential revision (e.g., D123). You will be shown the '.
100100+ 'results of a dry run on the object.');
101101+97102 $form = id(new AphrontFormView())
98103 ->setUser($user)
99104 ->appendChild(hsprintf(
100100- '<p class="aphront-form-instructions">Enter an object to test rules '.
101101- 'for, like a Diffusion commit (e.g., <tt>rX123</tt>) or a '.
102102- 'Differential revision (e.g., <tt>D123</tt>). You will be shown the '.
103103- 'results of a dry run on the object.</p>'))
105105+ '<p class="aphront-form-instructions">%s</p>', $text))
104106 ->appendChild(
105107 id(new AphrontFormTextControl())
106108 ->setLabel(pht('Object Name'))