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

More Differential PHT

Summary: I think I've gotten like 95% of Differential now. Some outliers that need rethinking.

Test Plan: Bring up a new diff, edit a diff, search and sort diffs.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

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

+76 -70
+1 -1
src/applications/differential/DifferentialReplyHandler.php
··· 46 46 47 47 $comment_command_printed = false; 48 48 if (in_array(DifferentialAction::ACTION_COMMENT, $supported_commands)) { 49 - $text .= 'Reply to comment'; 49 + $text .= pht('Reply to comment'); 50 50 $comment_command_printed = true; 51 51 52 52 $supported_commands = array_diff(
+4 -4
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
··· 285 285 return 286 286 '<table class="differential-property-table">'. 287 287 '<tr class="property-table-header">'. 288 - '<th>Property Changes</th>'. 289 - '<td class="oval">Old Value</td>'. 290 - '<td class="nval">New Value</td>'. 288 + '<th>'.pht('Property Changes').'</th>'. 289 + '<td class="oval">'.pht('Old Value').'</td>'. 290 + '<td class="nval">'.pht('New Value').'</td>'. 291 291 '</tr>'. 292 292 implode('', $rows). 293 293 '</table>'; ··· 330 330 'href' => '#', 331 331 'meta' => $meta, 332 332 ), 333 - 'Show File Contents'); 333 + pht('Show File Contents')); 334 334 } 335 335 336 336 return $this->wrapChangeInTable(
+5 -5
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
··· 95 95 ), 96 96 ), 97 97 $is_first_block 98 - ? "Show First 20 Lines" 99 - : "\xE2\x96\xB2 Show 20 Lines"); 98 + ? pht("Show First 20 Lines") 99 + : pht("\xE2\x96\xB2 Show 20 Lines")); 100 100 } 101 101 102 102 $contents[] = javelin_render_tag( ··· 111 111 'range' => "{$top}-{$len}/{$top}-{$len}", 112 112 ), 113 113 ), 114 - 'Show All '.$len.' Lines'); 114 + pht('Show All %d Lines', $len)); 115 115 116 116 $is_last_block = false; 117 117 if ($ii + $len >= $rows) { ··· 131 131 ), 132 132 ), 133 133 $is_last_block 134 - ? "Show Last 20 Lines" 135 - : "\xE2\x96\xBC Show 20 Lines"); 134 + ? pht("Show Last 20 Lines") 135 + : pht("\xE2\x96\xBC Show 20 Lines")); 136 136 } 137 137 138 138 $context = null;
+9 -9
src/applications/differential/view/DifferentialAddCommentView.php
··· 86 86 ->addHiddenInput('revision_id', $revision->getID()) 87 87 ->appendChild( 88 88 id(new AphrontFormSelectControl()) 89 - ->setLabel('Action') 89 + ->setLabel(pht('Action')) 90 90 ->setName('action') 91 91 ->setValue($action) 92 92 ->setID('comment-action') 93 93 ->setOptions($this->actions)) 94 94 ->appendChild( 95 95 id(new AphrontFormTokenizerControl()) 96 - ->setLabel('Add Reviewers') 96 + ->setLabel(pht('Add Reviewers')) 97 97 ->setName('reviewers') 98 98 ->setControlID('add-reviewers') 99 99 ->setControlStyle($enable_reviewers ? null : 'display: none') ··· 101 101 ->setDisableBehavior(true)) 102 102 ->appendChild( 103 103 id(new AphrontFormTokenizerControl()) 104 - ->setLabel('Add CCs') 104 + ->setLabel(pht('Add CCs')) 105 105 ->setName('ccs') 106 106 ->setControlID('add-ccs') 107 107 ->setControlStyle($enable_ccs ? null : 'display: none') ··· 111 111 id(new PhabricatorRemarkupControl()) 112 112 ->setName('comment') 113 113 ->setID('comment-content') 114 - ->setLabel('Comment') 114 + ->setLabel(pht('Comment')) 115 115 ->setValue($this->draft ? $this->draft->getDraft() : null) 116 116 ->setUser($this->user)) 117 117 ->appendChild( 118 118 id(new AphrontFormSubmitControl()) 119 - ->setValue($is_serious ? 'Submit' : 'Clowncopterize')); 119 + ->setValue($is_serious ? pht('Submit') : pht('Clowncopterize'))); 120 120 121 121 Javelin::initBehavior( 122 122 'differential-add-reviewers-and-ccs', ··· 128 128 'value' => $this->reviewers, 129 129 'row' => 'add-reviewers', 130 130 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 131 - 'placeholder' => 'Type a user name...', 131 + 'placeholder' => pht('Type a user name...'), 132 132 ), 133 133 'add-ccs-tokenizer' => array( 134 134 'actions' => array('add_ccs' => 1), ··· 136 136 'value' => $this->ccs, 137 137 'row' => 'add-ccs', 138 138 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 139 - 'placeholder' => 'Type a user or mailing list...', 139 + 'placeholder' => pht('Type a user or mailing list...'), 140 140 ), 141 141 ), 142 142 'select' => 'comment-action', ··· 179 179 $warning_container .= '</div>'; 180 180 181 181 $header = id(new PhabricatorHeaderView()) 182 - ->setHeader($is_serious ? 'Add Comment' : 'Leap Into Action'); 182 + ->setHeader($is_serious ? pht('Add Comment') : pht('Leap Into Action')); 183 183 184 184 return 185 185 id(new PhabricatorAnchorView()) ··· 193 193 '<div class="aphront-panel-preview aphront-panel-flush">'. 194 194 '<div id="comment-preview">'. 195 195 '<span class="aphront-panel-preview-loading-text">'. 196 - 'Loading comment preview...'. 196 + pht('Loading comment preview...'). 197 197 '</span>'. 198 198 '</div>'. 199 199 '<div id="inline-comment-preview">'.
+1 -1
src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php
··· 120 120 '<div class="phabricator-filetree">'. 121 121 implode("\n", $filetree). 122 122 '</div>'; 123 - $nav->addLabel('Changed Files'); 123 + $nav->addLabel(pht('Changed Files')); 124 124 $nav->addCustomBlock($filetree); 125 125 $nav->setActive(true); 126 126 $nav->selectFilter(null);
+17 -11
src/applications/differential/view/DifferentialDiffTableOfContentsView.php
··· 89 89 if (count($away) > 1) { 90 90 $meta = array(); 91 91 if ($type == DifferentialChangeType::TYPE_MULTICOPY) { 92 - $meta[] = 'Deleted after being copied to multiple locations:'; 92 + $meta[] = pht('Deleted after being copied to multiple locations:'); 93 93 } else { 94 - $meta[] = 'Copied to multiple locations:'; 94 + $meta[] = pht('Copied to multiple locations:'); 95 95 } 96 96 foreach ($away as $path) { 97 97 $meta[] = phutil_escape_html($path); ··· 99 99 $meta = implode('<br />', $meta); 100 100 } else { 101 101 if ($type == DifferentialChangeType::TYPE_MOVE_AWAY) { 102 - $meta = 'Moved to '.phutil_escape_html(reset($away)); 102 + $meta = pht('Moved to %s', phutil_escape_html(reset($away))); 103 103 } else { 104 - $meta = 'Copied to '.phutil_escape_html(reset($away)); 104 + $meta = pht('Copied to %s', phutil_escape_html(reset($away))); 105 105 } 106 106 } 107 107 } else if ($type == DifferentialChangeType::TYPE_MOVE_HERE) { 108 - $meta = 'Moved from '.phutil_escape_html($changeset->getOldFile()); 108 + $meta = pht('Moved from %s', 109 + phutil_escape_html($changeset->getOldFile())); 109 110 } else if ($type == DifferentialChangeType::TYPE_COPY_HERE) { 110 - $meta = 'Copied from '.phutil_escape_html($changeset->getOldFile()); 111 + $meta = pht('Copied from %s', 112 + phutil_escape_html($changeset->getOldFile())); 111 113 } else { 112 114 $meta = null; 113 115 } ··· 128 130 $pchar = 129 131 ($changeset->getOldProperties() === $changeset->getNewProperties()) 130 132 ? null 131 - : '<span title="Properties Changed">M</span>'; 133 + : '<span title="'.pht('Properties Changed').'">M</span>'; 132 134 133 135 $fname = $changeset->getFilename(); 134 136 $cov = $this->renderCoverage($coverage, $fname); ··· 186 188 'href' => $editor_link, 187 189 'class' => 'button differential-toc-edit-all', 188 190 ), 189 - 'Open All in Editor'); 191 + pht('Open All in Editor')); 190 192 } 191 193 } 192 194 ··· 198 200 'mustcapture' => true, 199 201 'class' => 'button differential-toc-reveal-all', 200 202 ), 201 - 'Show All Context' 203 + pht('Show All Context') 202 204 ); 203 205 204 206 $buttons = ··· 221 223 '<th></th>'. 222 224 '<th></th>'. 223 225 '<th>Path</th>'. 224 - '<th class="differential-toc-cov">Coverage (All)</th>'. 225 - '<th class="differential-toc-mcov">Coverage (Touched)</th>'. 226 + '<th class="differential-toc-cov">'. 227 + pht('Coverage (All)'). 228 + '</th>'. 229 + '<th class="differential-toc-mcov">'. 230 + pht('Coverage (Touched)'). 231 + '</th>'. 226 232 '</tr>'. 227 233 implode("\n", $rows). 228 234 $buttons.
+2 -2
src/applications/differential/view/DifferentialInlineCommentEditView.php
··· 101 101 'sigil' => 'inline-edit-cancel', 102 102 'class' => 'grey', 103 103 ), 104 - 'Cancel'); 104 + pht('Cancel')); 105 105 106 106 $buttons = implode('', $buttons); 107 107 ··· 113 113 'tabindex' => '-1', 114 114 'target' => '_blank', 115 115 ), 116 - 'Formatting Reference'); 116 + pht('Formatting Reference')); 117 117 118 118 return javelin_render_tag( 119 119 'div',
+8 -8
src/applications/differential/view/DifferentialInlineCommentView.php
··· 90 90 91 91 $is_draft = false; 92 92 if ($inline->isDraft() && !$is_synthetic) { 93 - $links[] = 'Not Submitted Yet'; 93 + $links[] = pht('Not Submitted Yet'); 94 94 $is_draft = true; 95 95 } 96 96 ··· 102 102 'mustcapture' => true, 103 103 'sigil' => 'differential-inline-prev', 104 104 ), 105 - 'Previous'); 105 + pht('Previous')); 106 106 107 107 $links[] = javelin_render_tag( 108 108 'a', ··· 111 111 'mustcapture' => true, 112 112 'sigil' => 'differential-inline-next', 113 113 ), 114 - 'Next'); 114 + pht('Next')); 115 115 116 116 if ($this->allowReply) { 117 117 ··· 129 129 'mustcapture' => true, 130 130 'sigil' => 'differential-inline-reply', 131 131 ), 132 - 'Reply'); 132 + pht('Reply')); 133 133 } 134 134 135 135 } ··· 145 145 'mustcapture' => true, 146 146 'sigil' => 'differential-inline-edit', 147 147 ), 148 - 'Edit'); 148 + pht('Edit')); 149 149 $links[] = javelin_render_tag( 150 150 'a', 151 151 array( ··· 153 153 'mustcapture' => true, 154 154 'sigil' => 'differential-inline-delete', 155 155 ), 156 - 'Delete'); 156 + pht('Delete')); 157 157 } else if ($this->preview) { 158 158 $links[] = javelin_render_tag( 159 159 'a', ··· 163 163 ), 164 164 'sigil' => 'differential-inline-preview-jump', 165 165 ), 166 - 'Not Visible'); 166 + pht('Not Visible')); 167 167 $links[] = javelin_render_tag( 168 168 'a', 169 169 array( ··· 171 171 'mustcapture' => true, 172 172 'sigil' => 'differential-inline-delete', 173 173 ), 174 - 'Delete'); 174 + pht('Delete')); 175 175 } 176 176 177 177 if ($links) {
+7 -7
src/applications/differential/view/DifferentialLocalCommitsView.php
··· 114 114 115 115 116 116 $headers = array(); 117 - $headers[] = '<th>Commit</th>'; 117 + $headers[] = '<th>'.pht('Commit').'</th>'; 118 118 if ($has_tree) { 119 - $headers[] = '<th>Tree</th>'; 119 + $headers[] = '<th>'.pht('Tree').'</th>'; 120 120 } 121 121 if ($has_local) { 122 - $headers[] = '<th>Local</th>'; 122 + $headers[] = '<th>'.pht('Local').'</th>'; 123 123 } 124 - $headers[] = '<th>Parents</th>'; 125 - $headers[] = '<th>Author</th>'; 126 - $headers[] = '<th>Summary</th>'; 127 - $headers[] = '<th>Date</th>'; 124 + $headers[] = '<th>'.pht('Parents').'</th>'; 125 + $headers[] = '<th>'.pht('Author').'</th>'; 126 + $headers[] = '<th>'.pht('Summary').'</th>'; 127 + $headers[] = '<th>'.pht('Date').'</th>'; 128 128 129 129 $headers = '<tr>'.implode('', $headers).'</tr>'; 130 130
+2 -2
src/applications/differential/view/DifferentialRevisionCommentListView.php
··· 165 165 'sigil' => "differential-all-comments-container", 166 166 ), 167 167 '<div class="differential-older-comments-are-hidden">'. 168 - number_format(count($hidden)).' older comments are hidden. '. 168 + pht('%d older comments are hidden. ', number_format(count($hidden))). 169 169 javelin_render_tag( 170 170 'a', 171 171 array( ··· 173 173 'mustcapture' => true, 174 174 'sigil' => 'differential-show-all-comments', 175 175 ), 176 - 'Show all comments.'). 176 + pht('Show all comments.')). 177 177 '</div>'); 178 178 } else { 179 179 $hidden = null;
+1
src/applications/differential/view/DifferentialRevisionCommentView.php
··· 119 119 $verb = phutil_escape_html($verb); 120 120 121 121 $actions = array(); 122 + // TODO: i18n 122 123 switch ($comment->getAction()) { 123 124 case DifferentialAction::ACTION_ADDCCS: 124 125 $actions[] = "{$author_link} added CCs: ".
+1 -1
src/applications/differential/view/DifferentialRevisionDetailView.php
··· 74 74 } 75 75 } 76 76 if ($next_step) { 77 - $properties->addProperty('Next Step', $next_step); 77 + $properties->addProperty(pht('Next Step'), $next_step); 78 78 } 79 79 80 80 foreach ($this->auxiliaryFields as $field) {
+2 -3
src/applications/differential/view/DifferentialRevisionListView.php
··· 11 11 private $handles; 12 12 private $fields; 13 13 private $highlightAge; 14 - const NO_DATA_STRING = 'No revisions found.'; 15 14 16 15 public function setFields(array $fields) { 17 16 assert_instances_of($fields, 'DifferentialFieldSpecification'); ··· 138 137 'width' => 16, 139 138 'height' => 16, 140 139 'alt' => 'Draft', 141 - 'title' => 'Draft Comment', 140 + 'title' => pht('Draft Comment'), 142 141 )). 143 142 '</a>'; 144 143 } ··· 178 177 $table->setColumnClasses($classes); 179 178 $table->setCellClasses($cell_classes); 180 179 181 - $table->setNoDataString(DifferentialRevisionListView::NO_DATA_STRING); 180 + $table->setNoDataString(pht('No revisions found.')); 182 181 183 182 require_celerity_resource('differential-revision-history-css'); 184 183
+7 -7
src/applications/differential/view/DifferentialRevisionStatsView.php
··· 124 124 $old_count = $counts[$age]; 125 125 126 126 $row_array[$age] = array( 127 - 'Revisions per week' => number_format($counts[$age] / $weeks, 2), 128 - 'Lines per week' => number_format($lines[$age] / $weeks, 1), 129 - 'Active days per week' => 127 + pht('Revisions per week') => number_format($counts[$age] / $weeks, 2), 128 + pht('Lines per week') => number_format($lines[$age] / $weeks, 1), 129 + pht('Active days per week') => 130 130 number_format($count_active[$age] / $weeks, 1), 131 - 'Revisions' => number_format($counts[$age]), 132 - 'Lines' => number_format($lines[$age]), 133 - 'Lines per diff' => number_format($lines[$age] / 131 + pht('Revisions') => number_format($counts[$age]), 132 + pht('Lines') => number_format($lines[$age]), 133 + pht('Lines per diff') => number_format($lines[$age] / 134 134 ($counts[$age] + 0.0001)), 135 - 'Active days' => number_format($count_active[$age]), 135 + pht('Active days') => number_format($count_active[$age]), 136 136 ); 137 137 138 138 switch ($this->filter) {
+9 -9
src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
··· 199 199 '<form action="#toc">'. 200 200 '<table class="differential-revision-history-table">'. 201 201 '<tr>'. 202 - '<th>Diff</th>'. 203 - '<th>ID</th>'. 204 - '<th>Base</th>'. 205 - '<th>Description</th>'. 206 - '<th>Created</th>'. 207 - '<th>Lint</th>'. 208 - '<th>Unit</th>'. 202 + '<th>'.pht('Diff').'</th>'. 203 + '<th>'.pht('ID').'</th>'. 204 + '<th>'.pht('Base').'</th>'. 205 + '<th>'.pht('Description').'</th>'. 206 + '<th>'.pht('Created').'</th>'. 207 + '<th>'.pht('Lint').'</th>'. 208 + '<th>'.pht('Unit').'</th>'. 209 209 '</tr>'. 210 210 implode("\n", $rows). 211 211 '<tr>'. 212 212 '<td colspan="9" class="diff-differ-submit">'. 213 - '<label>Whitespace Changes: '.$select.'</label>'. 214 - '<button>Show Diff</button>'. 213 + '<label>'.pht('Whitespace Changes: %s', $select).'</label>'. 214 + '<button>'.pht('Show Diff').'</button>'. 215 215 '</td>'. 216 216 '</tr>'. 217 217 '</table>'.