@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() AphrontNoteView

Summary: Add `pht()` calls throughout `AphrontNoteView` to allow translation of this example.

Test Plan: /uiexample/view/PhabricatorNoteExample/

Reviewers: chad

Reviewed By: chad

CC: aran, epriestley

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

+10 -21
+10 -21
src/applications/uiexample/examples/PhabricatorNoteExample.php
··· 7 7 } 8 8 9 9 public function getDescription() { 10 - return 'Show little scrollable boxes of text.'; 10 + return pht('Bounded boxes of text.'); 11 11 } 12 12 13 13 public function renderExample() { 14 14 $short_note = id(new AphrontNoteView()) 15 - ->setTitle('Short note') 16 - ->appendChild('This is a short note'); 15 + ->setTitle(pht('Short note')) 16 + ->appendChild('xxxx xx x xxxxx xxxx'); 17 17 18 18 $longer_note = id(new AphrontNoteView()) 19 - ->setTitle('Longer note') 19 + ->setTitle(pht('Longer note')) 20 20 ->appendChild($this->buildParagraphs(2)); 21 21 22 22 $wide_url = 'protocol://www.'.str_repeat('x', 100).'.com/'; 23 23 24 24 $oversize_note = id(new AphrontNoteView()) 25 - ->setTitle('Oversize note') 25 + ->setTitle(pht('Oversize note')) 26 26 ->appendChild( 27 27 $this->buildParagraphs(2). 28 28 $wide_url."\n\n". 29 - $this->buildParagraphs(5)); 29 + $this->buildParagraphs(15)); 30 30 31 31 $out = array(); 32 32 33 33 $out[] = id(new AphrontPanelView()) 34 - ->setHeader('Unbounded Oversize Note') 35 - ->setCaption( 36 - 'The rest of these examples are contrained by a table, but this one '. 37 - 'is left free (it still constrains its max height though).') 34 + ->setHeader(pht('Unbounded Oversize Note')) 38 35 ->appendChild($oversize_note); 39 36 40 37 $out[] = id(new AphrontPanelView()) 41 - ->setHeader("Short notes") 42 - ->setCaption( 43 - 'Two notes of equal size, spacing out an 80% wide table.') 38 + ->setHeader(pht('Short notes')) 44 39 ->appendChild( 45 40 $this->renderTable( 46 41 array(array($short_note, $short_note)))); 47 42 48 43 $out[] = id(new AphrontPanelView()) 49 - ->setHeader("Mixed notes") 50 - ->setCaption( 51 - 'Two rows of notes with unequal height, spacing out their '. 52 - 'rows vertically.') 44 + ->setHeader(pht('Mixed notes')) 53 45 ->appendChild( 54 46 $this->renderTable( 55 47 array( ··· 58 50 ))); 59 51 60 52 $out[] = id(new AphrontPanelView()) 61 - ->setHeader("Oversize notes") 62 - ->setCaption( 63 - 'Two rows each with a very large note, '. 64 - 'showing scrolling behavior.') 53 + ->setHeader(pht('Oversize notes')) 65 54 ->appendChild( 66 55 $this->renderTable( 67 56 array(