diff --git a/src/applications/phriction/application/PhabricatorApplicationPhriction.php b/src/applications/phriction/application/PhabricatorApplicationPhriction.php index f6119bff57..212b984ca5 100644 --- a/src/applications/phriction/application/PhabricatorApplicationPhriction.php +++ b/src/applications/phriction/application/PhabricatorApplicationPhriction.php @@ -3,7 +3,7 @@ final class PhabricatorApplicationPhriction extends PhabricatorApplication { public function getShortDescription() { - return 'Wiki'; + return pht('Wiki'); } public function getBaseURI() { diff --git a/src/applications/phriction/controller/PhrictionController.php b/src/applications/phriction/controller/PhrictionController.php index 0b7fa32ede..c242c4f64f 100644 --- a/src/applications/phriction/controller/PhrictionController.php +++ b/src/applications/phriction/controller/PhrictionController.php @@ -9,7 +9,7 @@ abstract class PhrictionController extends PhabricatorController { $page = $this->buildStandardPageView(); - $page->setApplicationName('Phriction'); + $page->setApplicationName(pht('Phriction')); $page->setBaseURI('/w/'); $page->setTitle(idx($data, 'title')); $page->setGlyph("\xE2\x9A\xA1"); @@ -32,7 +32,7 @@ abstract class PhrictionController extends PhabricatorController { $nav->addFilter('', pht('Create Document'), '/phriction/new'); } - $nav->addLabel('Filters'); + $nav->addLabel(pht('Filters')); $nav->addFilter('active', pht('Active Documents')); $nav->addFilter('all', pht('All Documents')); $nav->addFilter('updates', pht('Recently Updated')); diff --git a/src/applications/phriction/controller/PhrictionDeleteController.php b/src/applications/phriction/controller/PhrictionDeleteController.php index 13d43d25b8..16cb4a9edc 100644 --- a/src/applications/phriction/controller/PhrictionDeleteController.php +++ b/src/applications/phriction/controller/PhrictionDeleteController.php @@ -32,11 +32,11 @@ final class PhrictionDeleteController extends PhrictionController { $dialog = id(new AphrontDialogView()) ->setUser($user) - ->setTitle('Delete document?') + ->setTitle(pht('Delete document?')) ->appendChild( - 'Really delete this document? You can recover it later by reverting '. - 'to a previous version.') - ->addSubmitButton('Delete') + pht('Really delete this document? You can recover it later by '. + 'reverting to a previous version.')) + ->addSubmitButton(pht('Delete')) ->addCancelButton($document_uri); return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index ee03806fac..3701b7810f 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -138,9 +138,9 @@ final class PhrictionDiffController array( 'href' => $uri->alter('l', $l - 1)->alter('r', $r - 1), ), - "\xC2\xAB Previous Change"); + pht("\xC2\xAB Previous Change")); } else { - $link_l = 'Original Change'; + $link_l = pht('Original Change'); } $link_r = null; @@ -150,9 +150,9 @@ final class PhrictionDiffController array( 'href' => $uri->alter('l', $l + 1)->alter('r', $r + 1), ), - "Next Change \xC2\xBB"); + pht("Next Change \xC2\xBB")); } else { - $link_r = 'Most Recent Change'; + $link_r = pht('Most Recent Change'); } $navigation_table = @@ -184,7 +184,7 @@ final class PhrictionDiffController $output, ), array( - 'title' => 'Document History', + 'title' => pht('Document History'), )); } @@ -208,7 +208,7 @@ final class PhrictionDiffController 'href' => '/phriction/edit/'.$document_id.'/', 'class' => 'button', ), - 'Edit Current Version'); + pht('Edit Current Version')); } @@ -218,7 +218,7 @@ final class PhrictionDiffController 'href' => '/phriction/edit/'.$document_id.'/?revert='.$version, 'class' => 'button', ), - 'Revert to Version '.phutil_escape_html($version).'...'); + pht('Revert to Version %s...', phutil_escape_html($version))); } private function renderComparisonTable(array $content) { @@ -244,11 +244,11 @@ final class PhrictionDiffController $table = new AphrontTableView($rows); $table->setHeaders( array( - 'Date', - 'Time', - 'Version', - 'Author', - 'Description', + pht('Date'), + pht('Time'), + pht('Version'), + pht('Author'), + pht('Description'), )); $table->setColumnClasses( array( diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index 97b328bd67..64f51f9845 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -60,15 +60,15 @@ final class PhrictionDocumentController 'href' => $create_uri, 'class' => 'green button', ), - 'Create Page'); + pht('Create Page')); $page_content = '
You did not make any changes to the document.
'); + ''.pht('You did not make any changes to the document.').'
'); $dialog->addCancelButton($request->getRequestURI()); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -121,9 +121,9 @@ final class PhrictionEditController $dialog = new AphrontDialogView(); $dialog->setUser($user); - $dialog->setTitle('Empty Page'); + $dialog->setTitle(pht('Empty Page')); $dialog->appendChild( - 'You can not create an empty document.
'); + ''.pht('You can not create an empty document.').'
'); $dialog->addCancelButton($request->getRequestURI()); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -150,16 +150,16 @@ final class PhrictionEditController $error_view = null; if ($errors) { $error_view = id(new AphrontErrorView()) - ->setTitle('Form Errors') + ->setTitle(pht('Form Errors')) ->setErrors($errors); } if ($document->getID()) { - $panel_header = 'Edit Phriction Document'; - $submit_button = 'Save Changes'; + $panel_header = pht('Edit Phriction Document'); + $submit_button = pht('Save Changes'); } else { - $panel_header = 'Create New Phriction Document'; - $submit_button = 'Create Document'; + $panel_header = pht('Create New Phriction Document'); + $submit_button = pht('Create Document'); } $uri = $document->getSlug(); @@ -178,13 +178,14 @@ final class PhrictionEditController array( 'href' => $request->getRequestURI()->alter('nodraft', true), ), - 'discard this draft'); + pht('discard this draft')); $draft_note = new AphrontErrorView(); $draft_note->setSeverity(AphrontErrorView::SEVERITY_NOTICE); $draft_note->setTitle('Recovered Draft'); $draft_note->appendChild( - 'Showing a saved draft of your edits, you can '.$discard.'.
'); + ''.pht('Showing a saved draft of your edits, you can %s.', + $discard).'
'); } else { $content_text = $content->getContent(); $draft_note = null; @@ -198,17 +199,17 @@ final class PhrictionEditController ->addHiddenInput('nodraft', $request->getBool('nodraft')) ->appendChild( id(new AphrontFormTextControl()) - ->setLabel('Title') + ->setLabel(pht('Title')) ->setValue($content->getTitle()) ->setError($e_title) ->setName('title')) ->appendChild( id(new AphrontFormStaticControl()) - ->setLabel('URI') + ->setLabel(pht('URI')) ->setValue($uri)) ->appendChild( id(new PhabricatorRemarkupControl()) - ->setLabel('Content') + ->setLabel(pht('Content')) ->setValue($content_text) ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) ->setName('content') @@ -216,7 +217,7 @@ final class PhrictionEditController ->setUser($user)) ->appendChild( id(new AphrontFormTextControl()) - ->setLabel('Edit Notes') + ->setLabel(pht('Edit Notes')) ->setValue($notes) ->setError(null) ->setName('description')) @@ -233,11 +234,11 @@ final class PhrictionEditController $preview_panel = '