Skip to content

Commit 36e2d02

Browse files
committed
phtize all the things
Summary: `pht`ize a whole bunch of strings in rP. Test Plan: Intense eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12797
1 parent d3268ae commit 36e2d02

File tree

928 files changed

+5268
-4240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

928 files changed

+5268
-4240
lines changed

.arclint

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"type": "xhpast",
7575
"include": "(\\.php$)",
7676
"severity": {
77-
"16": "advice",
7877
"34": "error"
7978
},
8079
"xhpast.blacklisted.function": {

resources/sql/autopatches/20140106.macromailkey.2.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3-
echo "Adding mailkeys to macros.\n";
3+
echo pht('Adding mailkeys to macros.')."\n";
44

55
$table = new PhabricatorFileImageMacro();
66
$conn_w = $table->establishConnection('w');
77
$iterator = new LiskMigrationIterator($table);
88
foreach ($iterator as $macro) {
99
$id = $macro->getID();
1010

11-
echo "Populating macro {$id}...\n";
11+
echo pht('Populating macro %d...', $id)."\n";
1212

1313
if (!$macro->getMailKey()) {
1414
queryfx(
@@ -20,4 +20,4 @@
2020
}
2121
}
2222

23-
echo "Done.\n";
23+
echo pht('Done.')."\n";

resources/sql/autopatches/20140108.ddbpname.2.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3-
echo "Adding names to Drydock blueprints.\n";
3+
echo pht('Adding names to Drydock blueprints.')."\n";
44

55
$table = new DrydockBlueprint();
66
$conn_w = $table->establishConnection('w');
77
$iterator = new LiskMigrationIterator($table);
88
foreach ($iterator as $blueprint) {
99
$id = $blueprint->getID();
1010

11-
echo "Populating blueprint {$id}...\n";
11+
echo pht('Populating blueprint %d...', $id)."\n";
1212

1313
if (!strlen($blueprint->getBlueprintName())) {
1414
queryfx(
@@ -20,4 +20,4 @@
2020
}
2121
}
2222

23-
echo "Done.\n";
23+
echo pht('Done.')."\n";

resources/sql/autopatches/20140113.legalpadsig.2.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3-
echo "Adding secretkeys to legalpad document signatures.\n";
3+
echo pht('Adding secretkeys to legalpad document signatures.')."\n";
44

55
$table = new LegalpadDocumentSignature();
66
$conn_w = $table->establishConnection('w');
77
$iterator = new LiskMigrationIterator($table);
88
foreach ($iterator as $sig) {
99
$id = $sig->getID();
1010

11-
echo "Populating signature {$id}...\n";
11+
echo pht('Populating signature %d...', $id)."\n";
1212

1313
if (!$sig->getSecretKey()) {
1414
queryfx(
@@ -20,4 +20,4 @@
2020
}
2121
}
2222

23-
echo "Done.\n";
23+
echo pht('Done.')."\n";

resources/sql/autopatches/20140115.auth.3.unlimit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
foreach (new LiskMigrationIterator($session_table) as $session) {
1010
$id = $session->getID();
1111

12-
echo "Migrating session {$id}...\n";
12+
echo pht('Migrating session %d...', $id)."\n";
1313
$old_type = $session->getType();
1414
$new_type = preg_replace('/-.*$/', '', $old_type);
1515

@@ -23,4 +23,4 @@
2323
}
2424
}
2525

26-
echo "Done.\n";
26+
echo pht('Done.')."\n";

resources/sql/autopatches/20140205.cal.3.phid-mig.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
$table = new PhabricatorCalendarEvent();
44
$conn_w = $table->establishConnection('w');
55

6-
echo "Assigning PHIDs to events...\n";
6+
echo pht('Assigning PHIDs to events...')."\n";
77
foreach (new LiskMigrationIterator($table) as $event) {
88
$id = $event->getID();
99

10-
echo "Updating event {$id}...\n";
10+
echo pht('Updating event %d...', $id)."\n";
1111
if ($event->getPHID()) {
1212
continue;
1313
}
@@ -19,4 +19,4 @@
1919
$table->generatePHID(),
2020
$id);
2121
}
22-
echo "Done.\n";
22+
echo pht('Done.')."\n";

resources/sql/autopatches/20140210.herald.rule-condition-mig.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
$table = new HeraldCondition();
44
$conn_w = $table->establishConnection('w');
55

6-
echo "Migrating Herald conditions of type Herald rule from IDs to PHIDs...\n";
6+
echo pht(
7+
"Migrating Herald conditions of type Herald rule from IDs to PHIDs...\n");
78
foreach (new LiskMigrationIterator($table) as $condition) {
89
if ($condition->getFieldName() != HeraldAdapter::FIELD_RULE) {
910
continue;
@@ -14,7 +15,7 @@
1415
continue;
1516
}
1617
$id = $condition->getID();
17-
echo "Updating condition {$id}...\n";
18+
echo pht('Updating condition %s...', $id)."\n";
1819

1920
$rule = id(new HeraldRuleQuery())
2021
->setViewer(PhabricatorUser::getOmnipotentUser())
@@ -28,4 +29,4 @@
2829
json_encode($rule->getPHID()),
2930
$id);
3031
}
31-
echo "Done.\n";
32+
echo pht('Done.')."\n";

resources/sql/autopatches/20140210.projcfield.1.blurb.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
$rows = new LiskRawMigrationIterator($conn_w, 'project_profile');
77

8-
echo "Migrating project descriptions to custom storage...\n";
8+
echo pht('Migrating project descriptions to custom storage...')."\n";
99
foreach ($rows as $row) {
1010
$phid = $row['projectPHID'];
11-
echo "Migrating {$phid}...\n";
1211

1312
$desc = $row['blurb'];
1413
if (strlen($desc)) {
@@ -23,4 +22,4 @@
2322
}
2423
}
2524

26-
echo "Done.\n";
25+
echo pht('Done.')."\n";

resources/sql/autopatches/20140211.dx.2.migcommenttext.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
PhabricatorContentSource::SOURCE_LEGACY,
88
array())->serialize();
99

10-
echo "Migrating Differential comment text to modern storage...\n";
10+
echo pht('Migrating Differential comment text to modern storage...')."\n";
1111
foreach ($rows as $row) {
1212
$id = $row['id'];
13-
echo "Migrating Differential comment {$id}...\n";
13+
echo pht('Migrating Differential comment %d...', $id)."\n";
1414
if (!strlen($row['content'])) {
15-
echo "Comment has no text, continuing.\n";
15+
echo pht('Comment has no text, continuing.')."\n";
1616
continue;
1717
}
1818

1919
$revision = id(new DifferentialRevision())->load($row['revisionID']);
2020
if (!$revision) {
21-
echo "Comment has no valid revision, continuing.\n";
21+
echo pht('Comment has no valid revision, continuing.')."\n";
2222
continue;
2323
}
2424

@@ -68,4 +68,4 @@
6868
$row['id']);
6969
}
7070

71-
echo "Done.\n";
71+
echo pht('Done.')."\n";

resources/sql/autopatches/20140212.dx.1.armageddon.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
PhabricatorContentSource::SOURCE_LEGACY,
88
array())->serialize();
99

10-
echo "Migrating Differential comments to modern storage...\n";
10+
echo pht('Migrating Differential comments to modern storage...')."\n";
1111
foreach ($rows as $row) {
1212
$id = $row['id'];
13-
echo "Migrating comment {$id}...\n";
13+
echo pht('Migrating comment %d...', $id)."\n";
1414

1515
$revision = id(new DifferentialRevision())->load($row['revisionID']);
1616
if (!$revision) {
17-
echo "No revision, continuing.\n";
17+
echo pht('No revision, continuing.')."\n";
1818
continue;
1919
}
2020

@@ -219,4 +219,4 @@
219219
}
220220

221221
}
222-
echo "Done.\n";
222+
echo pht('Done.')."\n";

resources/sql/autopatches/20140218.passwords.4.vcs.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
$table = new PhabricatorRepositoryVCSPassword();
44
$conn_w = $table->establishConnection('w');
55

6-
echo "Upgrading password hashing for VCS passwords.\n";
6+
echo pht('Upgrading password hashing for VCS passwords.')."\n";
77

88
$best_hasher = PhabricatorPasswordHasher::getBestHasher();
99
foreach (new LiskMigrationIterator($table) as $password) {
1010
$id = $password->getID();
1111

12-
echo "Migrating VCS password {$id}...\n";
12+
echo pht('Migrating VCS password %d...', $id)."\n";
1313

1414
$input_hash = $password->getPasswordHash();
1515
$input_envelope = new PhutilOpaqueEnvelope($input_hash);
@@ -24,4 +24,4 @@
2424
$id);
2525
}
2626

27-
echo "Done.\n";
27+
echo pht('Done.')."\n";

resources/sql/autopatches/20140226.dxcustom.1.fielddata.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
$conn_w = id(new DifferentialRevision())->establishConnection('w');
44
$rows = new LiskRawMigrationIterator($conn_w, 'differential_auxiliaryfield');
55

6-
echo "Modernizing Differential auxiliary field storage...\n";
6+
echo pht('Modernizing Differential auxiliary field storage...')."\n";
77

88
$table_name = id(new DifferentialCustomFieldStorage())->getTableName();
99
foreach ($rows as $row) {
1010
$id = $row['id'];
11-
echo "Migrating row {$id}...\n";
11+
echo pht('Migrating row %d...', $id)."\n";
1212
queryfx(
1313
$conn_w,
1414
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
@@ -19,4 +19,4 @@
1919
$row['value']);
2020
}
2121

22-
echo "Done.\n";
22+
echo pht('Done.')."\n";

resources/sql/autopatches/20140321.mstatus.2.mig.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
$conn_w = id(new ManiphestTask())->establishConnection('w');
1313

14-
echo "Migrating tasks to new status constants...\n";
14+
echo pht('Migrating tasks to new status constants...')."\n";
1515
foreach (new LiskMigrationIterator(new ManiphestTask()) as $task) {
1616
$id = $task->getID();
17-
echo "Migrating T{$id}...\n";
17+
echo pht('Migrating %s...', "T{$id}")."\n";
1818

1919
$status = $task->getStatus();
2020
if (isset($status_map[$status])) {
@@ -27,13 +27,13 @@
2727
}
2828
}
2929

30-
echo "Done.\n";
30+
echo pht('Done.')."\n";
3131

3232

33-
echo "Migrating task transactions to new status constants...\n";
33+
echo pht('Migrating task transactions to new status constants...')."\n";
3434
foreach (new LiskMigrationIterator(new ManiphestTransaction()) as $xaction) {
3535
$id = $xaction->getID();
36-
echo "Migrating {$id}...\n";
36+
echo pht('Migrating %d...', $id)."\n";
3737

3838
if ($xaction->getTransactionType() == ManiphestTransaction::TYPE_STATUS) {
3939
$old = $xaction->getOldValue();
@@ -55,14 +55,14 @@
5555
$id);
5656
}
5757
}
58-
echo "Done.\n";
58+
echo pht('Done.')."\n";
5959

6060
$conn_w = id(new PhabricatorSavedQuery())->establishConnection('w');
6161

62-
echo "Migrating searches to new status constants...\n";
62+
echo pht('Migrating searches to new status constants...')."\n";
6363
foreach (new LiskMigrationIterator(new PhabricatorSavedQuery()) as $query) {
6464
$id = $query->getID();
65-
echo "Migrating {$id}...\n";
65+
echo pht('Migrating %d...', $id)."\n";
6666

6767
if ($query->getEngineClassName() !== 'ManiphestTaskSearchEngine') {
6868
continue;
@@ -91,4 +91,4 @@
9191
}
9292
}
9393
}
94-
echo "Done.\n";
94+
echo pht('Done.')."\n";

resources/sql/autopatches/20140323.harbor.1.renames.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
id(new HarbormasterBuildTarget())->getTableName(),
1515
);
1616

17-
echo "Renaming Harbormaster classes...\n";
17+
echo pht('Renaming Harbormaster classes...')."\n";
1818

1919
$conn_w = id(new HarbormasterBuildStep())->establishConnection('w');
2020
foreach ($names as $name) {
2121
$old = $name;
2222
$new = 'Harbormaster'.$name;
2323

24-
echo "Renaming {$old} -> {$new}...\n";
24+
echo pht('Renaming %s -> %s...', $old, $new)."\n";
2525
foreach ($tables as $table) {
2626
queryfx(
2727
$conn_w,
@@ -32,4 +32,4 @@
3232
}
3333
}
3434

35-
echo "Done.\n";
35+
echo pht('Done.')."\n";

resources/sql/autopatches/20140325.push.3.groups.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
$conn_w = id(new PhabricatorRepository())->establishConnection('w');
44

5-
echo "Adding transaction log event groups...\n";
5+
echo pht('Adding transaction log event groups...')."\n";
66

77
$logs = queryfx_all(
88
$conn_w,
99
'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC',
1010
'repository_pushlog');
1111
foreach ($logs as $log) {
1212
$id = $log['id'];
13-
echo "Migrating log {$id}...\n";
13+
echo pht('Migrating log %d...', $id)."\n";
1414
if ($log['pushEventPHID']) {
1515
continue;
1616
}
@@ -40,4 +40,4 @@
4040
$log['transactionKey']);
4141
}
4242

43-
echo "Done.\n";
43+
echo pht('Done.')."\n";

resources/sql/autopatches/20140410.accountsecret.2.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<?php
22

3-
echo "Updating users...\n";
4-
3+
echo pht('Updating users...')."\n";
54

65
foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
7-
86
$id = $user->getID();
9-
echo "Updating {$id}...\n";
7+
echo pht('Updating %d...', $id)."\n";
108

119
if (strlen($user->getAccountSecret())) {
1210
continue;
@@ -20,4 +18,4 @@
2018
$id);
2119
}
2220

23-
echo "Done.\n";
21+
echo pht('Done.')."\n";

resources/sql/autopatches/20140420.rel.2.objectmig.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
$table_name = $pull_table->getTableName();
55
$conn_w = $pull_table->establishConnection('w');
66

7-
echo "Setting object PHIDs for requests...\n";
7+
echo pht('Setting object PHIDs for requests...')."\n";
88
foreach (new LiskMigrationIterator($pull_table) as $pull) {
99
$id = $pull->getID();
1010

11-
echo "Migrating pull request {$id}...\n";
11+
echo pht('Migrating pull request %d...', $id)."\n";
1212
if ($pull->getRequestedObjectPHID()) {
1313
// We already have a valid PHID, so skip this request.
1414
continue;
@@ -42,4 +42,4 @@
4242
$id);
4343
}
4444

45-
echo "Done.\n";
45+
echo pht('Done.')."\n";

0 commit comments

Comments
 (0)