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

Summary: Fill in missing pht's for Paste

Test Plan: Review Paste in ALLCAPS.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

+17 -16
+5 -4
src/applications/paste/controller/PhabricatorPasteController.php
··· 9 9 $nav->setBaseURI(new PhutilURI($this->getApplicationURI('filter/'))); 10 10 11 11 if ($for_app) { 12 - $nav->addFilter('', 'Create Paste', $this->getApplicationURI('/create/')); 12 + $nav->addFilter('', pht('Create Paste'), 13 + $this->getApplicationURI('/create/')); 13 14 } 14 15 15 - $nav->addLabel('Filters'); 16 - $nav->addFilter('all', 'All Pastes'); 16 + $nav->addLabel(pht('Filters')); 17 + $nav->addFilter('all', pht('All Pastes')); 17 18 if ($user->isLoggedIn()) { 18 - $nav->addFilter('my', 'My Pastes'); 19 + $nav->addFilter('my', pht('My Pastes')); 19 20 } 20 21 21 22 $nav->selectFilter($filter, 'all');
+11 -11
src/applications/paste/controller/PhabricatorPasteEditController.php
··· 64 64 if ($is_create) { 65 65 $text = $request->getStr('text'); 66 66 if (!strlen($text)) { 67 - $e_text = 'Required'; 68 - $errors[] = 'The paste may not be blank.'; 67 + $e_text = pht('Required'); 68 + $errors[] = pht('The paste may not be blank.'); 69 69 } else { 70 70 $e_text = null; 71 71 } ··· 94 94 } 95 95 } else { 96 96 if ($is_create && $parent) { 97 - $paste->setTitle('Fork of '.$parent->getFullName()); 97 + $paste->setTitle(pht('Fork of %s', $parent->getFullName())); 98 98 $paste->setLanguage($parent->getLanguage()); 99 99 $text = $parent->getRawContent(); 100 100 } ··· 103 103 $error_view = null; 104 104 if ($errors) { 105 105 $error_view = id(new AphrontErrorView()) 106 - ->setTitle('A fatal omission!') 106 + ->setTitle(pht('A Fatal Omission!')) 107 107 ->setErrors($errors); 108 108 } 109 109 ··· 111 111 $form->setFlexible(true); 112 112 113 113 $langs = array( 114 - '' => '(Detect From Filename in Title)', 114 + '' => pht('(Detect From Filename in Title)'), 115 115 ) + PhabricatorEnv::getEnvConfig('pygments.dropdown-choices'); 116 116 117 117 $form ··· 119 119 ->addHiddenInput('parent', $parent_id) 120 120 ->appendChild( 121 121 id(new AphrontFormTextControl()) 122 - ->setLabel('Title') 122 + ->setLabel(pht('Title')) 123 123 ->setValue($paste->getTitle()) 124 124 ->setName('title')) 125 125 ->appendChild( 126 126 id(new AphrontFormSelectControl()) 127 - ->setLabel('Language') 127 + ->setLabel(pht('Language')) 128 128 ->setName('language') 129 129 ->setValue($paste->getLanguage()) 130 130 ->setOptions($langs)); ··· 146 146 $form 147 147 ->appendChild( 148 148 id(new AphrontFormTextAreaControl()) 149 - ->setLabel('Text') 149 + ->setLabel(pht('Text')) 150 150 ->setError($e_text) 151 151 ->setValue($text) 152 152 ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) ··· 158 158 array( 159 159 'href' => $this->getApplicationURI('?parent='.$paste->getID()) 160 160 ), 161 - 'Fork' 161 + pht('Fork') 162 162 ); 163 163 $form 164 164 ->appendChild( 165 165 id(new AphrontFormMarkupControl()) 166 - ->setLabel('Text') 167 - ->setValue(hsprintf( 166 + ->setLabel(pht('Text')) 167 + ->setValue(pht( 168 168 'Paste text can not be edited. %s to create a new paste.', 169 169 $fork_link))); 170 170 }
+1 -1
src/applications/paste/storage/PhabricatorPaste.php
··· 50 50 public function getFullName() { 51 51 $title = $this->getTitle(); 52 52 if (!$title) { 53 - $title = '(An Untitled Masterwork)'; 53 + $title = pht('(An Untitled Masterwork)'); 54 54 } 55 55 return 'P'.$this->getID().' '.$title; 56 56 }