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

pht for Releeph

Summary: Went and pht'd most everything I could find, except exceptions. Fixes T3091

Test Plan: Bopped around the application, didn't seem to break anything but didn't test all flows. Should be safe.

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3091

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

+156 -145
+2 -2
src/applications/releeph/application/PhabricatorApplicationReleeph.php
··· 3 3 final class PhabricatorApplicationReleeph extends PhabricatorApplication { 4 4 5 5 public function getName() { 6 - return 'Releeph'; 6 + return pht('Releeph'); 7 7 } 8 8 9 9 public function getShortDescription() { 10 - return 'Release Branches'; 10 + return pht('Release Branches'); 11 11 } 12 12 13 13 public function getBaseURI() {
+1 -1
src/applications/releeph/controller/ReleephController.php
··· 109 109 public function buildStandardPageResponse($view, array $data) { 110 110 $page = $this->buildStandardPageView(); 111 111 112 - $page->setApplicationName('Releeph'); 112 + $page->setApplicationName(pht('Releeph')); 113 113 $page->setBaseURI('/releeph/'); 114 114 $page->setTitle(idx($data, 'title')); 115 115 $page->setGlyph("\xD3\x82");
+4 -4
src/applications/releeph/controller/branch/ReleephBranchAccessController.php
··· 41 41 ->setURI($origin_uri); 42 42 } 43 43 44 - $button_text = ucfirst($this->action).' Branch'; 45 - $message = hsprintf( 46 - '<p>Really %s the branch <i>%s</i>?</p>', 44 + $button_text = pht('%s Branch', $this->action); 45 + $text = pht('Really %s the branch: %s?', 47 46 $this->action, 48 47 $rph_branch->getBasename()); 48 + $message = phutil_tag('p', array(), $text); 49 49 50 50 51 51 $dialog = new AphrontDialogView(); 52 52 $dialog 53 53 ->setUser($request->getUser()) 54 - ->setTitle('Confirm') 54 + ->setTitle(pht('Confirm')) 55 55 ->appendChild($message) 56 56 ->addSubmitButton($button_text) 57 57 ->addCancelButton($origin_uri);
+15 -14
src/applications/releeph/controller/branch/ReleephBranchCreateController.php
··· 28 28 $branch_date_control = id(new AphrontFormDateControl()) 29 29 ->setUser($request->getUser()) 30 30 ->setName('templateDate') 31 - ->setLabel('Date') 32 - ->setCaption('The date used for filling out the branch template.') 31 + ->setLabel(pht('Date')) 32 + ->setCaption(pht('The date used for filling out the branch template.')) 33 33 ->setInitialTime(AphrontFormDateControl::TIME_START_OF_DAY); 34 34 $branch_date = $branch_date_control->readValueFromRequest($request); 35 35 36 36 if ($request->isFormPost()) { 37 37 $cut_commit = null; 38 38 if (!$cut_point) { 39 - $e_cut = 'Required'; 40 - $errors[] = 'You must give a branch cut point'; 39 + $e_cut = pht('Required'); 40 + $errors[] = pht('You must give a branch cut point'); 41 41 } else { 42 42 try { 43 43 $finder = id(new ReleephCommitFinder()) 44 44 ->setReleephProject($releeph_project); 45 45 $cut_commit = $finder->fromPartial($cut_point); 46 46 } catch (Exception $e) { 47 - $e_cut = 'Invalid'; 47 + $e_cut = pht('Invalid'); 48 48 $errors[] = $e->getMessage(); 49 49 } 50 50 } ··· 67 67 if ($errors) { 68 68 $error_view = new AphrontErrorView(); 69 69 $error_view->setErrors($errors); 70 - $error_view->setTitle('Form Errors'); 70 + $error_view->setTitle(pht('Form Errors')); 71 71 } 72 72 73 73 $form = id(new AphrontFormView()) 74 74 ->setUser($request->getUser()) 75 75 ->appendChild( 76 76 id(new AphrontFormTextControl()) 77 - ->setLabel('Symbolic name') 77 + ->setLabel(pht('Symbolic Name')) 78 78 ->setName('symbolicName') 79 79 ->setValue($symbolic_name) 80 - ->setCaption('Mutable alternate name, for easy reference, '. 81 - '(e.g. "LATEST")')) 80 + ->setCaption(pht('Mutable alternate name, for easy reference, '. 81 + '(e.g. "LATEST")'))) 82 82 ->appendChild( 83 83 id(new AphrontFormTextControl()) 84 - ->setLabel('Cut point') 84 + ->setLabel(pht('Cut point')) 85 85 ->setName('cutPoint') 86 86 ->setValue($cut_point) 87 87 ->setError($e_cut) 88 88 ->setCaption( 89 - 'A commit ID for your repo type, or a Diffusion ID like "rE123"')) 89 + pht('A commit ID for your repo type, or a '. 90 + 'Diffusion ID like "rE123"'))) 90 91 ->appendChild($branch_date_control) 91 92 ->appendChild( 92 93 id(new AphrontFormSubmitControl()) 93 - ->setValue('Cut Branch') 94 + ->setValue(pht('Cut Branch')) 94 95 ->addCancelButton($releeph_project->getURI())); 95 96 96 97 $panel = id(new AphrontPanelView()) 97 98 ->appendChild($form) 98 - ->setHeader('Cut Branch') 99 + ->setHeader(pht('Cut Branch')) 99 100 ->setWidth(AphrontPanelView::WIDTH_FORM); 100 101 101 102 return $this->buildStandardPageResponse( 102 103 array($error_view, $panel), 103 - array('title' => 'Cut new branch')); 104 + array('title' => pht('Cut new branch'))); 104 105 } 105 106 }
+22 -21
src/applications/releeph/controller/branch/ReleephBranchEditController.php
··· 25 25 $branch_name); 26 26 27 27 if ($existing_with_same_branch_name) { 28 - $errors[] = sprintf( 28 + $errors[] = pht( 29 29 "The branch name %s is currently taken. Please use another name. ", 30 30 $branch_name); 31 - $e_existing_with_same_branch_name = 'Error'; 31 + $e_existing_with_same_branch_name = pht('Error'); 32 32 } 33 33 34 34 if (!$errors) { ··· 73 73 ->setUser($request->getUser()) 74 74 ->appendChild( 75 75 id(new AphrontFormStaticControl()) 76 - ->setLabel('Branch name') 76 + ->setLabel(pht('Branch Name')) 77 77 ->setValue($branch_name)) 78 78 ->appendChild( 79 79 id(new AphrontFormMarkupControl()) 80 - ->setLabel('Cut point') 80 + ->setLabel(pht('Cut Point')) 81 81 ->setValue($handles[$cut_commit_phid]->renderLink())) 82 82 ->appendChild( 83 83 id(new AphrontFormMarkupControl()) 84 - ->setLabel('Created by') 84 + ->setLabel(pht('Created By')) 85 85 ->setValue($handles[$creator_phid]->renderLink())) 86 86 ->appendChild( 87 87 id(new AphrontFormTextControl) 88 - ->setLabel('Symbolic Name') 88 + ->setLabel(pht('Symbolic Name')) 89 89 ->setName('symbolicName') 90 90 ->setValue($symbolic_name) 91 - ->setCaption('Mutable alternate name, for easy reference, '. 92 - '(e.g. "LATEST")')) 93 - ->appendChild(hsprintf( 94 - '<br>' . 95 - 'In dire situations where the branch name is wrong, ' . 96 - 'you can edit it in the database by changing the field below. ' . 97 - 'If you do this, it is very important that you change your ' . 98 - 'branch\'s name in the VCS to reflect the new name in Releeph, ' . 99 - 'otherwise a catastrophe of previously unheard-of magnitude ' . 100 - 'will befall your project.')) 91 + ->setCaption(pht('Mutable alternate name, for easy reference, '. 92 + '(e.g. "LATEST")'))) 93 + ->appendChild(phutil_tag( 94 + 'p', 95 + array(), 96 + pht('In dire situations where the branch name is wrong, ' . 97 + 'you can edit it in the database by changing the field below. ' . 98 + 'If you do this, it is very important that you change your ' . 99 + 'branch\'s name in the VCS to reflect the new name in Releeph, ' . 100 + 'otherwise a catastrophe of previously unheard-of magnitude ' . 101 + 'will befall your project.'))) 101 102 ->appendChild( 102 103 id(new AphrontFormTextControl) 103 - ->setLabel('New branch name') 104 + ->setLabel(pht('New Branch Name')) 104 105 ->setName('branchName') 105 106 ->setValue($branch_name) 106 107 ->setError($e_existing_with_same_branch_name)) 107 108 ->appendChild( 108 109 id(new AphrontFormSubmitControl()) 109 110 ->addCancelButton($releeph_branch->getURI()) 110 - ->setValue('Save')); 111 + ->setValue(pht('Save'))); 111 112 112 113 $error_view = null; 113 114 if ($errors) { 114 115 $error_view = id(new AphrontErrorView()) 115 116 ->setSeverity(AphrontErrorView::SEVERITY_ERROR) 116 117 ->setErrors($errors) 117 - ->setTitle('Errors'); 118 + ->setTitle(pht('Errors')); 118 119 } 119 120 120 - $title = hsprintf( 121 - 'Edit branch %s', 121 + $title = pht( 122 + 'Edit Branch %s', 122 123 $releeph_branch->getDisplayNameWithDetail()); 123 124 124 125 $panel = id(new AphrontPanelView())
+2 -2
src/applications/releeph/controller/branch/ReleephBranchViewController.php
··· 43 43 44 44 $form->appendChild( 45 45 id(new AphrontFormSubmitControl()) 46 - ->setValue('Filter')); 46 + ->setValue(pht('Filter'))); 47 47 48 48 $list = id(new ReleephRequestHeaderListView()) 49 49 ->setOriginType('branch') ··· 72 72 $crumbs->addAction( 73 73 id(new PhabricatorMenuItemView()) 74 74 ->setHref($create_uri) 75 - ->setName('Request Pick') 75 + ->setName(pht('Request Pick')) 76 76 ->setIcon('create')); 77 77 } 78 78
+21 -14
src/applications/releeph/controller/project/ReleephProjectActionController.php
··· 24 24 25 25 $dialog = id(new AphrontDialogView()) 26 26 ->setUser($request->getUser()) 27 - ->setTitle('Really deactivate Releeph Project?') 28 - ->appendChild(hsprintf( 29 - '<p>Really deactivate the Releeph project <i>%s</i>?', 30 - $rph_project->getName())) 31 - ->appendChild(hsprintf( 32 - '<p style="margin-top:1em">It will still exist, but '. 33 - 'will be hidden from the list of active projects.</p>')) 34 - ->addSubmitButton('Deactivate Releeph Project') 27 + ->setTitle(pht('Really deactivate Releeph Project?')) 28 + ->appendChild(phutil_tag( 29 + 'p', 30 + array(), 31 + pht('Really deactivate the Releeph project: %s?', 32 + $rph_project->getName()))) 33 + ->appendChild(phutil_tag( 34 + 'p', 35 + array(), 36 + pht('It will still exist, but '. 37 + 'will be hidden from the list of active projects.'))) 38 + ->addSubmitButton(pht('Deactivate Releeph Project')) 35 39 ->addCancelButton($request->getRequestURI()); 36 40 37 41 return id(new AphrontDialogResponse())->setDialog($dialog); ··· 49 53 50 54 $dialog = id(new AphrontDialogView()) 51 55 ->setUser($request->getUser()) 52 - ->setTitle('Really delete Releeph Project?') 53 - ->appendChild(hsprintf( 54 - '<p>Really delete the "%s" Releeph project? '. 55 - 'This cannot be undone!</p>', 56 - $rph_project->getName())) 57 - ->addSubmitButton('Delete Releeph Project') 56 + ->setTitle(pht('Really delete Releeph Project?')) 57 + ->appendChild(phutil_tag( 58 + 'p', 59 + array(), 60 + pht('Really delete the Releeph project: %s? '. 61 + 'This cannot be undone!'), 62 + $rph_project->getName())) 63 + ->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED) 64 + ->addSubmitButton(pht('Delete')) 58 65 ->addCancelButton($request->getRequestURI()); 59 66 return id(new AphrontDialogResponse())->setDialog($dialog); 60 67
+18 -18
src/applications/releeph/controller/project/ReleephProjectCreateController.php
··· 24 24 25 25 if ($request->isFormPost()) { 26 26 if (!$name) { 27 - $e_name = 'Required'; 27 + $e_name = pht('Required'); 28 28 $errors[] = 29 - 'Your releeph project should have a simple descriptive name.'; 29 + pht('Your Releeph project should have a simple descriptive name.'); 30 30 } 31 31 32 32 if (!$trunk_branch) { 33 - $e_trunk_branch = 'Required'; 33 + $e_trunk_branch = pht('Required'); 34 34 $errors[] = 35 - 'You must specify which branch you will be picking from.'; 35 + pht('You must specify which branch you will be picking from.'); 36 36 } 37 37 38 38 $all_names = mpull(id(new ReleephProject())->loadAll(), 'getName'); 39 39 40 40 if (in_array($name, $all_names)) { 41 - $errors[] = "Releeph project name {$name} is already taken"; 41 + $errors[] = pht('Releeph project name %s is already taken', $name); 42 42 } 43 43 44 44 $arc_project = $arc_projects[$arc_pr_id]; ··· 63 63 if ($errors) { 64 64 $error_view = new AphrontErrorView(); 65 65 $error_view->setErrors($errors); 66 - $error_view->setTitle('Form Errors'); 66 + $error_view->setTitle(pht('Form Errors')); 67 67 } 68 68 69 69 // Make our own optgroup select control ··· 88 88 } 89 89 90 90 $project_name_input = id(new AphrontFormTextControl()) 91 - ->setLabel('Name') 91 + ->setLabel(pht('Name')) 92 92 ->setDisableAutocomplete(true) 93 93 ->setName('name') 94 94 ->setValue($name) 95 95 ->setError($e_name) 96 - ->setCaption('A name like "Thrift" but not "Thrift releases".'); 96 + ->setCaption(pht('A name like "Thrift" but not "Thrift releases".')); 97 97 98 98 $arc_project_input = id(new AphrontFormSelectControl()) 99 - ->setLabel('Arc Project') 99 + ->setLabel(pht('Arc Project')) 100 100 ->setName('arcPrID') 101 101 ->setValue($arc_pr_id) 102 - ->setCaption(hsprintf( 103 - "If your Arc project isn't listed, associate it with a repository %s", 102 + ->setCaption(pht( 103 + 'If your Arc project isn\'t listed, associate it with a repository %s', 104 104 phutil_tag( 105 105 'a', 106 106 array( ··· 111 111 ->setOptions($arc_project_choices); 112 112 113 113 $branch_name_preview = id(new ReleephBranchPreviewView()) 114 - ->setLabel('Example Branch') 114 + ->setLabel(pht('Example Branch')) 115 115 ->addControl('projectName', $project_name_input) 116 116 ->addControl('arcProjectID', $arc_project_input) 117 117 ->addStatic('template', '') ··· 123 123 ->appendChild($arc_project_input) 124 124 ->appendChild( 125 125 id(new AphrontFormTextControl()) 126 - ->setLabel('Trunk') 126 + ->setLabel(pht('Trunk')) 127 127 ->setName('trunkBranch') 128 128 ->setValue($trunk_branch) 129 129 ->setError($e_trunk_branch) 130 - ->setCaption('The development branch, '. 131 - 'from which requests will be picked.')) 130 + ->setCaption(pht('The development branch, '. 131 + 'from which requests will be picked.'))) 132 132 ->appendChild($branch_name_preview) 133 133 ->appendChild( 134 134 id(new AphrontFormSubmitControl()) 135 135 ->addCancelButton('/releeph/project/') 136 - ->setValue('Create')); 136 + ->setValue(pht('Create'))); 137 137 138 138 $panel = id(new AphrontPanelView()) 139 - ->setHeader('Create Releeph Project') 139 + ->setHeader(pht('Create Releeph Project')) 140 140 ->appendChild($form) 141 141 ->setWidth(AphrontPanelView::WIDTH_FORM); 142 142 143 143 return $this->buildStandardPageResponse( 144 144 array($error_view, $panel), 145 145 array( 146 - 'title' => 'Create new Releeph Project' 146 + 'title' => pht('Create New Releeph Project') 147 147 )); 148 148 } 149 149 }
+50 -48
src/applications/releeph/controller/project/ReleephProjectEditController.php
··· 46 46 $pusher_phids = $request->getArr('pushers'); 47 47 48 48 if (!$project_name) { 49 - $e_name = 'Required'; 49 + $e_name = pht('Required'); 50 50 $errors[] = 51 - 'Your releeph project should have a simple descriptive name'; 51 + pht('Your releeph project should have a simple descriptive name'); 52 52 } 53 53 54 54 if (!$trunk_branch) { 55 - $e_trunk_branch = 'Required'; 55 + $e_trunk_branch = pht('Required'); 56 56 $errors[] = 57 - 'You must specify which branch you will be picking from.'; 57 + pht('You must specify which branch you will be picking from.'); 58 58 } 59 59 60 60 if ($release_counter && !is_int($release_counter)) { 61 - $errors[] = "Release counter must be a positive integer!"; 61 + $errors[] = pht("Release counter must be a positive integer!"); 62 62 } 63 63 64 64 $other_releeph_projects = id(new ReleephProject()) ··· 67 67 'getName', 'getID'); 68 68 69 69 if (in_array($project_name, $other_releeph_project_names)) { 70 - $errors[] = "Releeph project name {$project_name} is already taken"; 70 + $errors[] = pht("Releeph project name %s is already taken", 71 + $project_name); 71 72 } 72 73 73 74 foreach ($test_paths as $test_path) { 74 75 $result = @preg_match($test_path, ''); 75 76 $is_a_valid_regexp = $result !== false; 76 77 if (!$is_a_valid_regexp) { 77 - $errors[] = 'Please provide a valid regular expression: '. 78 - "{$test_path} is not valid"; 78 + $errors[] = pht('Please provide a valid regular expression: '. 79 + '%s is not valid', $test_path); 79 80 } 80 81 } 81 82 ··· 103 104 ->interpolate($branch_template); 104 105 105 106 if ($template_errors) { 106 - $e_branch_template = 'Invalid!'; 107 + $e_branch_template = pht('Whoopsies!'); 107 108 foreach ($template_errors as $template_error) { 108 109 $errors[] = "Template error: {$template_error}"; 109 110 } ··· 122 123 if ($errors) { 123 124 $error_view = new AphrontErrorView(); 124 125 $error_view->setErrors($errors); 125 - $error_view->setTitle('Form Errors'); 126 + $error_view->setTitle(pht('Form Errors')); 126 127 } 127 128 128 129 $projects = mpull( ··· 146 147 } 147 148 148 149 $basic_inset = id(new AphrontFormInsetView()) 149 - ->setTitle('Basics') 150 + ->setTitle(pht('Basics')) 150 151 ->appendChild( 151 152 id(new AphrontFormTextControl()) 152 - ->setLabel('Name') 153 + ->setLabel(pht('Name')) 153 154 ->setName('name') 154 155 ->setValue($project_name) 155 156 ->setError($e_name) 156 - ->setCaption('A name like "Thrift" but not "Thrift releases".')) 157 + ->setCaption(pht('A name like "Thrift" but not "Thrift releases".'))) 157 158 ->appendChild( 158 159 id(new AphrontFormStaticControl()) 159 - ->setLabel('Repository') 160 + ->setLabel(pht('Repository')) 160 161 ->setValue( 161 162 $this 162 163 ->getReleephProject() ··· 164 165 ->getName())) 165 166 ->appendChild( 166 167 id(new AphrontFormStaticControl()) 167 - ->setLabel('Arc Project') 168 + ->setLabel(pht('Arc Project')) 168 169 ->setValue( 169 170 $this->getReleephProject()->loadArcanistProject()->getName())) 170 171 ->appendChild( 171 172 id(new AphrontFormStaticControl()) 172 - ->setLabel('Releeph Project PHID') 173 + ->setLabel(pht('Releeph Project PHID')) 173 174 ->setValue( 174 175 $this->getReleephProject()->getPHID())) 175 176 ->appendChild( 176 177 id(new AphrontFormSelectControl()) 177 - ->setLabel('Phabricator Project') 178 + ->setLabel(pht('Phabricator Project')) 178 179 ->setValue($phabricator_project_id) 179 180 ->setName('projectID') 180 181 ->setOptions($projects)) 181 182 ->appendChild( 182 183 id(new AphrontFormTextControl()) 183 - ->setLabel('Trunk') 184 + ->setLabel(pht('Trunk')) 184 185 ->setValue($trunk_branch) 185 186 ->setName('trunkBranch') 186 187 ->setError($e_trunk_branch)) 187 188 ->appendChild( 188 189 id(new AphrontFormTextControl()) 189 - ->setLabel('Release counter') 190 + ->setLabel(pht('Release counter')) 190 191 ->setValue($release_counter) 191 192 ->setName('releaseCounter') 192 193 ->setCaption( 193 - "Used by the command line branch cutter's %N field")) 194 + pht("Used by the command line branch cutter's %N field"))) 194 195 ->appendChild( 195 196 id(new AphrontFormTextAreaControl()) 196 - ->setLabel('Pick Instructions') 197 + ->setLabel(pht('Pick Instructions')) 197 198 ->setValue($pick_failure_instructions) 198 199 ->setName('pickFailureInstructions') 199 200 ->setCaption( 200 - "Instructions for pick failures, which will be used " . 201 - "in emails generated by failed picks")) 201 + pht("Instructions for pick failures, which will be used " . 202 + "in emails generated by failed picks"))) 202 203 ->appendChild( 203 204 id(new AphrontFormTextAreaControl()) 204 - ->setLabel('Tests paths') 205 + ->setLabel(pht('Tests paths')) 205 206 ->setValue(implode("\n", $test_paths)) 206 207 ->setName('testPaths') 207 208 ->setCaption( 208 - 'List of strings that all test files contain in their path '. 209 + pht('List of strings that all test files contain in their path '. 209 210 'in this project. One string per line. '. 210 - 'Examples: \'__tests__\', \'/javatests/\'...')); 211 + 'Examples: \'__tests__\', \'/javatests/\'...'))); 211 212 212 213 $pushers_inset = id(new AphrontFormInsetView()) 213 - ->setTitle('Pushers') 214 + ->setTitle(pht('Pushers')) 214 215 ->appendChild( 215 - 'Pushers are allowed to approve Releeph requests to be committed. '. 216 + pht('Pushers are allowed to approve Releeph requests to be committed. '. 216 217 'to this project\'s branches. If you leave this blank then anyone '. 217 - 'is allowed to approve requests.') 218 + 'is allowed to approve requests.')) 218 219 ->appendChild( 219 220 id(new AphrontFormTokenizerControl()) 220 - ->setLabel('Pushers') 221 + ->setLabel(pht('Pushers')) 221 222 ->setName('pushers') 222 223 ->setDatasource('/typeahead/common/users/') 223 224 ->setValue($pusher_tokens)); ··· 233 234 $field_selector_options[$selector_name] = $selector_name; 234 235 } 235 236 236 - $field_selector_blurb = hsprintf( 237 + $field_selector_blurb = pht( 237 238 "If you you have additional information to render about Releeph ". 238 239 "requests, or want to re-arrange the UI, implement a ". 239 240 "<tt>ReleephFieldSelector</tt> and select it here."); 240 241 241 242 $fields_inset = id(new AphrontFormInsetView()) 242 - ->setTitle('Fields') 243 + ->setTitle(pht('Fields')) 243 244 ->appendChild($field_selector_blurb) 244 245 ->appendChild( 245 246 id(new AphrontFormSelectControl()) 246 - ->setLabel('Selector') 247 + ->setLabel(pht('Selector')) 247 248 ->setName('fieldSelector') 248 249 ->setValue($field_selector) 249 250 ->setOptions($field_selector_options)); ··· 270 271 ->setLabel('Template') 271 272 ->setError($e_branch_template) 272 273 ->setCaption( 273 - "Leave this blank to use your installation's default."); 274 + pht("Leave this blank to use your installation's default.")); 274 275 275 276 $branch_template_preview = id(new ReleephBranchPreviewView()) 276 - ->setLabel('Preview') 277 + ->setLabel(pht('Preview')) 277 278 ->addControl('template', $branch_template_input) 278 279 ->addStatic('arcProjectID', $arc_project_id) 279 280 ->addStatic('isSymbolic', false) 280 281 ->addStatic('projectName', $this->getReleephProject()->getName()); 281 282 282 283 $template_inset = id(new AphrontFormInsetView()) 283 - ->setTitle('Branch Cutting') 284 + ->setTitle(pht('Branch Cutting')) 284 285 ->appendChild( 285 - 'Provide a pattern for creating new branches.') 286 + pht('Provide a pattern for creating new branches.')) 286 287 ->appendChild($branch_template_input) 287 288 ->appendChild($branch_template_preview) 288 289 ->appendChild($help_markup); ··· 300 301 ->appendChild( 301 302 id(new AphrontFormSubmitControl()) 302 303 ->addCancelButton('/releeph/project/') 303 - ->setValue('Save')); 304 + ->setValue(pht('Save'))); 304 305 305 306 $panel = id(new AphrontPanelView()) 306 - ->setHeader('Edit Releeph Project') 307 + ->setHeader(pht('Edit Releeph Project')) 307 308 ->appendChild($form) 308 309 ->setWidth(AphrontPanelView::WIDTH_FORM); 309 310 310 311 return $this->buildStandardPageResponse( 311 312 array($error_view, $panel), 312 - array('title' => 'Edit Releeph Project')); 313 + array('title' => pht('Edit Releeph Project'))); 313 314 } 314 315 315 316 private function buildCommitAuthorInset($current) { ··· 329 330 330 331 $vcs_name = PhabricatorRepositoryType::getNameForRepositoryType($vcs_type); 331 332 333 + // pht? 332 334 $help_markup = hsprintf(<<<EOTEXT 333 335 When your project's release engineers run <tt>arc releeph</tt>, they will be 334 336 listed as the <strong>committer</strong> of the code committed to release ··· 348 350 $options = array( 349 351 array( 350 352 'value' => ReleephProject::COMMIT_AUTHOR_FROM_DIFF, 351 - 'label' => 'Original Author', 353 + 'label' => pht('Original Author'), 352 354 'caption' => 353 - "The author of the original commit in {$trunk}.", 355 + pht('The author of the original commit in: %s.', $trunk), 354 356 ), 355 357 array( 356 358 'value' => ReleephProject::COMMIT_AUTHOR_REQUESTOR, 357 - 'label' => 'Requestor', 359 + 'label' => pht('Requestor'), 358 360 'caption' => 359 - "The person who requested that this code go into the release.", 361 + pht('The person who requested that this code go into the release.'), 360 362 ), 361 363 array( 362 364 'value' => ReleephProject::COMMIT_AUTHOR_NONE, 363 - 'label' => "None", 365 + 'label' => pht('None'), 364 366 'caption' => 365 - "Only record the default committer information.", 367 + pht('Only record the default committer information.'), 366 368 ), 367 369 ); 368 370 ··· 371 373 } 372 374 373 375 $control = id(new AphrontFormRadioButtonControl()) 374 - ->setLabel('Author') 376 + ->setLabel(pht('Author')) 375 377 ->setName('commitWithAuthor') 376 378 ->setValue($current); 377 379 ··· 380 382 } 381 383 382 384 return id(new AphrontFormInsetView()) 383 - ->setTitle('Authors') 385 + ->setTitle(pht('Authors')) 384 386 ->appendChild($help_markup) 385 387 ->appendChild($control); 386 388 }
+4 -4
src/applications/releeph/controller/project/ReleephProjectListController.php
··· 47 47 array( 48 48 'href' => '/releeph/project/inactive/', 49 49 ), 50 - 'View inactive projects'); 50 + pht('View inactive projects')); 51 51 $panel 52 52 ->setHeader(hsprintf( 53 53 'Active Releeph Projects &middot; %s', $view_inactive_link)) ··· 61 61 array( 62 62 'href' => '/releeph/project/' 63 63 ), 64 - 'View active projects'); 64 + pht('View active projects')); 65 65 $panel 66 66 ->setHeader(hsprintf( 67 67 'Inactive Releeph Projects &middot; %s', $view_active_link)) ··· 78 78 'href' => '/releeph/project/create/', 79 79 'class' => 'green button', 80 80 ), 81 - 'Create New Project'); 81 + pht('Create New Project')); 82 82 $panel->addButton($create_new_project_button); 83 83 } 84 84 ··· 88 88 $pager, 89 89 ), 90 90 array( 91 - 'title' => 'List Releeph Projects', 91 + 'title' => pht('All Releeph Projects'), 92 92 )); 93 93 } 94 94
+2 -2
src/applications/releeph/controller/project/ReleephProjectViewController.php
··· 28 28 $crumbs->addAction( 29 29 id(new PhabricatorMenuItemView()) 30 30 ->setHref($releeph_project->getURI('cutbranch')) 31 - ->setName('Cut New Branch') 31 + ->setName(pht('Cut New Branch')) 32 32 ->setIcon('create')); 33 33 } 34 34 ··· 38 38 $view, 39 39 ), 40 40 array( 41 - 'title' => $releeph_project->getName().' Releeph Project' 41 + 'title' => $releeph_project->getName() 42 42 )); 43 43 } 44 44
+12 -12
src/applications/releeph/controller/request/ReleephRequestCreateController.php
··· 54 54 try { 55 55 $pr_commit = $finder->fromPartial($request_identifier); 56 56 } catch (Exception $e) { 57 - $e_request_identifier = 'Invalid'; 57 + $e_request_identifier = pht('Invalid'); 58 58 $errors[] = 59 - "Request {$request_identifier} is probably not a valid commit"; 59 + pht('Request %s is probably not a valid commit', $request_identifier); 60 60 $errors[] = $e->getMessage(); 61 61 } 62 62 ··· 64 64 if (!$errors) { 65 65 $pr_commit_data = $pr_commit->loadCommitData(); 66 66 if (!$pr_commit_data) { 67 - $e_request_identifier = 'Not parsed yet'; 68 - $errors[] = "The requested commit hasn't been parsed yet."; 67 + $e_request_identifier = pht('Not parsed yet'); 68 + $errors[] = pht('The requested commit hasn\'t been parsed yet.'); 69 69 } 70 70 } 71 71 ··· 93 93 if ($errors) { 94 94 $error_view = new AphrontErrorView(); 95 95 $error_view->setErrors($errors); 96 - $error_view->setTitle('Form Errors'); 96 + $error_view->setTitle(pht('Form Errors')); 97 97 } 98 98 99 99 // For the typeahead ··· 119 119 ->addHiddenInput('requestIdentifierRaw', 'D'.$diff_rev_id) 120 120 ->appendChild( 121 121 id(new AphrontFormStaticControl()) 122 - ->setLabel('Diff') 122 + ->setLabel(pht('Diff')) 123 123 ->setValue($title)); 124 124 } else { 125 125 $origin = $releeph_branch->getURI(); ··· 132 132 ->setError($e_request_identifier) 133 133 ->setStartTime($branch_cut_point->getEpoch()) 134 134 ->setCaption( 135 - 'Start typing to autocomplete on commit title, '. 136 - 'or give a Phabricator commit identifier like rFOO1234')); 135 + pht('Start typing to autocomplete on commit title, '. 136 + 'or give a Phabricator commit identifier like rFOO1234'))); 137 137 } 138 138 139 139 // Fields ··· 148 148 ->appendChild( 149 149 id(new AphrontFormSubmitControl()) 150 150 ->addCancelButton($origin) 151 - ->setValue('Request')); 151 + ->setValue(pht('Request'))); 152 152 153 153 $panel = id(new AphrontPanelView()) 154 154 ->setHeader( 155 - 'Request for '. 156 - $releeph_branch->getDisplayNameWithDetail()) 155 + pht('Request for %s', 156 + $releeph_branch->getDisplayNameWithDetail())) 157 157 ->setWidth(AphrontPanelView::WIDTH_FORM) 158 158 ->appendChild($form); 159 159 160 160 return $this->buildStandardPageResponse( 161 161 array($error_view, $panel), 162 - array('title' => 'Request pick')); 162 + array('title' => pht('Request Pick'))); 163 163 } 164 164 165 165 }
+3 -3
src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php
··· 57 57 require_celerity_resource('releeph-request-differential-create-dialog'); 58 58 $dialog = id(new AphrontDialogView()) 59 59 ->setUser($user) 60 - ->setTitle('Choose Releeph Branch') 60 + ->setTitle(pht('Choose Releeph Branch')) 61 61 ->setClass('releeph-request-differential-create-dialog') 62 62 ->addCancelButton('/D'.$request->getStr('D')); 63 63 64 64 $dialog->appendChild( 65 - "This differential revision changes code that is associated ". 65 + pht("This differential revision changes code that is associated ". 66 66 "with multiple Releeph branches. ". 67 - "Please select the branch where you would like this code to be picked."); 67 + "Please select the branch where you would like this code to be picked.")); 68 68 69 69 foreach ($branch_groups as $project_id => $branches) { 70 70 $project = idx($projects, $project_id);