From 9758134d1afb44be2376efb8a560d3ce02d89fd3 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 5 Jun 2011 11:06:08 +0200 Subject: [PATCH] Update translator documentation. Update whitespace. L10n/i18n updates. --- plugins/EmailRegistration/emailregister.php | 22 +++++++----- plugins/QnA/QnAPlugin.php | 39 ++++++++++++--------- plugins/QnA/actions/qnaclosequestion.php | 7 ++-- plugins/QnA/actions/qnanewanswer.php | 10 +++--- plugins/QnA/actions/qnanewquestion.php | 5 ++- plugins/QnA/actions/qnareviseanswer.php | 7 ++-- plugins/QnA/actions/qnashowanswer.php | 6 +++- plugins/QnA/actions/qnashowquestion.php | 5 ++- plugins/QnA/actions/qnavote.php | 6 ++-- plugins/QnA/classes/QnA_Answer.php | 24 ++++++++----- plugins/QnA/classes/QnA_Question.php | 11 +++--- plugins/QnA/lib/qnanewanswerform.php | 1 - plugins/QnA/lib/qnanewquestionform.php | 12 ++++--- plugins/QnA/lib/qnareviseanswerform.php | 2 +- plugins/QnA/lib/qnashowanswerform.php | 14 ++++---- plugins/QnA/lib/qnashowquestionform.php | 10 +++--- plugins/QnA/lib/qnavoteform.php | 1 - 17 files changed, 103 insertions(+), 79 deletions(-) diff --git a/plugins/EmailRegistration/emailregister.php b/plugins/EmailRegistration/emailregister.php index 1b0902587f..e5c7d8a56c 100644 --- a/plugins/EmailRegistration/emailregister.php +++ b/plugins/EmailRegistration/emailregister.php @@ -80,7 +80,8 @@ class EmailregisterAction extends Action parent::prepare($argarray); if (common_config('site', 'closed')) { - throw new ClientException(_('Registration not allowed.'), 403); + // TRANS: Client exception trown when registration by e-mail is not allowed. + throw new ClientException(_m('Registration not allowed.'), 403); } if ($this->isPost()) { @@ -91,7 +92,8 @@ class EmailregisterAction extends Action if (!empty($this->email)) { if (common_config('site', 'inviteonly')) { - throw new ClientException(_('Sorry, only invited people can register.'), 403); + // TRANS: Client exception trown when trying to register without an invitation. + throw new ClientException(_m('Sorry, only invited people can register.'), 403); } $this->email = common_canonical_email($this->email); $this->state = self::NEWEMAIL; @@ -109,6 +111,7 @@ class EmailregisterAction extends Action if (!empty($this->invitation)) { if (!empty($this->invitation->registered_user_id)) { + // TRANS: Client exception trown when using an invitation multiple times. throw new ClientException(_m('Invitation already used.'), 403); } } else { @@ -131,13 +134,15 @@ class EmailregisterAction extends Action if (empty($this->code)) { if (common_config('site', 'inviteonly')) { - throw new ClientException(_('Sorry, only invited people can register.'), 403); + // TRANS: Client exception trown when trying to register without an invitation. + throw new ClientException(_m('Sorry, only invited people can register.'), 403); } $this->state = self::NEWREGISTER; } else { $this->invitation = Invitation::staticGet('code', $this->code); if (!empty($this->invitation)) { if (!empty($this->invitation->registered_user_id)) { + // TRANS: Client exception trown when using an invitation multiple times. throw new ClientException(_m('Invitation already used.'), 403); } $this->state = self::CONFIRMINVITE; @@ -180,7 +185,6 @@ class EmailregisterAction extends Action * * @return void */ - function handle($argarray=null) { $cur = common_current_user(); @@ -263,7 +267,8 @@ class EmailregisterAction extends Action } else if (!empty($this->confirmation)) { $email = trim($this->confirmation->address); } else { - throw new Exception('No confirmation thing.'); + // TRANS: Client exception trown when trying to set password with an invalid confirmation code. + throw new Exception(_m('No confirmation thing.')); } if (!$this->tos) { @@ -308,7 +313,8 @@ class EmailregisterAction extends Action } if (empty($this->user)) { - throw new Exception('Failed to register user.'); + // TRANS: Exception trown when using an invitation multiple times. + throw new Exception(_m('Failed to register user.')); } common_set_user($this->user); @@ -346,8 +352,8 @@ class EmailregisterAction extends Action $confirmUrl = common_local_url('register', array('code' => $confirm->code)); - // TRANS: Body for confirmation e-mail. - // TRANS: %1$s is the StatusNet sitename, %2$s is the confirmation URL. + // TRANS: Body for confirmation e-mail. + // TRANS: %1$s is the StatusNet sitename, %2$s is the confirmation URL. $body = sprintf(_m('Someone (probably you) has requested an account on %1$s using this email address.'. "\n". 'To confirm the address, click the following URL or copy it into the address bar of your browser.'. diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index f638179270..4908e93dd0 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -175,7 +175,7 @@ class QnAPlugin extends MicroAppPlugin function appTitle() { // TRANS: Application title. - return _m('Question'); + return _m('TITLE','Question'); } function tag() { @@ -202,12 +202,14 @@ class QnAPlugin extends MicroAppPlugin function saveNoticeFromActivity($activity, $actor, $options=array()) { if (count($activity->objects) != 1) { + // TRANS: Exception thrown when there are too many activity objects. throw new Exception(_m('Too many activity objects.')); } $questionObj = $activity->objects[0]; if ($questionObj->type != QnA_Question::OBJECT_TYPE) { + // TRANS: Exception thrown when an incorrect object type is encountered. throw new Exception(_m('Wrong type for object.')); } @@ -226,12 +228,14 @@ class QnAPlugin extends MicroAppPlugin $question = QnA_Question::staticGet('uri', $questionObj->id); if (empty($question)) { // FIXME: save the question + // TRANS: Exception thrown when answering a non-existing question. throw new Exception(_m('Answer to unknown question.')); } $notice = QnA_Answer::saveNew($actor, $question, $options); break; default: - throw new Exception(_m('Unknown object type received by QnA Plugin.')); + // TRANS: Exception thrown when an object type is encountered that cannot be handled. + throw new Exception(_m('Unknown object type.')); } return $notice; @@ -260,12 +264,14 @@ class QnAPlugin extends MicroAppPlugin } if (empty($question)) { + // TRANS: Exception thrown when an object type is encountered that cannot be handled. throw new Exception(_m('Unknown object type.')); } $notice = $question->getNotice(); if (empty($notice)) { + // TRANS: Exception thrown when requesting a non-existing question notice. throw new Exception(_m('Unknown question notice.')); } @@ -387,6 +393,7 @@ class QnAPlugin extends MicroAppPlugin $form->show(); } else { + // TRANS: Error message displayed when question data is not present. $out->text(_m('Question data is missing.')); } $out->elementEnd('div'); @@ -395,7 +402,6 @@ class QnAPlugin extends MicroAppPlugin $out->elementStart('div', array('class' => 'entry-content')); } - /** * Output the HTML for this kind of object in a list * @@ -403,7 +409,7 @@ class QnAPlugin extends MicroAppPlugin * * @return boolean hook value * - * @fixme WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation + * @todo FIXME: WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation */ function onStartShowNoticeItem($nli) { @@ -427,12 +433,10 @@ class QnAPlugin extends MicroAppPlugin $nli->showNoticeOptions(); if ($notice->object_type == QnA_Question::OBJECT_TYPE) { - $user = common_current_user(); $question = QnA_Question::getByNotice($notice); if (!empty($user)) { - $profile = $user->getProfile(); $answer = $question->getAnswer($profile); @@ -447,6 +451,8 @@ class QnAPlugin extends MicroAppPlugin 'input', array( 'class' => 'placeholder', + // TRANS: Placeholder value for a possible answer to a question + // TRANS: by the logged in user. 'value' => _m('Your answer...') ) ); @@ -459,7 +465,6 @@ class QnAPlugin extends MicroAppPlugin return false; } - function showNoticeAnswer($notice, $out) { $user = common_current_user(); @@ -476,12 +481,13 @@ class QnAPlugin extends MicroAppPlugin $form = new QnashowanswerForm($out, $answer); $form->show(); } else { + // TRANS: Error message displayed when answer data is not present. $out->text(_m('Answer data is missing.')); } $out->elementEnd('div'); - // @fixme + // @todo FIXME $out->elementStart('div', array('class' => 'entry-content')); } @@ -492,14 +498,15 @@ class QnAPlugin extends MicroAppPlugin if (Notice::contentTooLong($content)) { common_debug("content too long"); $max = Notice::maxContent(); + // TRANS: Link description for link to full notice text if it is longer than + // TRANS: what will be dispplayed. + $ellipsis = _m('…'); $short = mb_substr($content, 0, $max - 1); - $short .= sprintf( - // TRANS: Link to full notice text if it is longer than what will be dispplayed. - // TRANS: %s a notice URI. - _m(''), - $notice->uri, - _m('more...') - ); + $short .= sprintf('%3$s', + $notice->uri, + // TRANS: Title for link that is an ellipsis in English. + _m('more...'), + $ellipsis); } else { $short = $content; } @@ -513,7 +520,6 @@ class QnAPlugin extends MicroAppPlugin * @param HTMLOutputter $out * @return Widget */ - function entryForm($out) { return new QnanewquestionForm($out); @@ -524,7 +530,6 @@ class QnAPlugin extends MicroAppPlugin * * @param Notice $notice */ - function deleteRelated($notice) { switch ($notice->object_type) { diff --git a/plugins/QnA/actions/qnaclosequestion.php b/plugins/QnA/actions/qnaclosequestion.php index a8607faa9f..1ef5063a02 100644 --- a/plugins/QnA/actions/qnaclosequestion.php +++ b/plugins/QnA/actions/qnaclosequestion.php @@ -80,8 +80,8 @@ class QnaclosequestionAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to close a question when not logged in throw new ClientException( + // TRANS: Client exception thrown trying to close a question when not logged in _m("You must be logged in to close a question."), 403 ); @@ -128,13 +128,12 @@ class QnaclosequestionAction extends Action */ function closeQuestion() { - $user = common_current_user(); try { - if ($user->id != $this->question->profile_id) { - throw new Exception(_m('You didn\'t ask this question.')); + // TRANS: Exception thrown trying to close another user's question. + throw new Exception(_m('You did not ask this question.')); } $orig = clone($this->question); diff --git a/plugins/QnA/actions/qnanewanswer.php b/plugins/QnA/actions/qnanewanswer.php index dbab6c5eef..e565b3e93a 100644 --- a/plugins/QnA/actions/qnanewanswer.php +++ b/plugins/QnA/actions/qnanewanswer.php @@ -80,8 +80,8 @@ class QnanewanswerAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to answer a question while not logged in. throw new ClientException( + // TRANS: Client exception thrown trying to answer a question while not logged in. _m("You must be logged in to answer to a question."), 403 ); @@ -96,8 +96,8 @@ class QnanewanswerAction extends Action $this->question = QnA_Question::staticGet('id', $id); if (empty($this->question)) { - // TRANS: Client exception thrown trying to respond to a non-existing question. throw new ClientException( + // TRANS: Client exception thrown trying to respond to a non-existing question. _m('Invalid or missing question.'), 404 ); @@ -162,7 +162,6 @@ class QnanewanswerAction extends Action $this->elementStart('body'); - $nli = new NoticeAnswerListItem($notice, $this, $this->question, $answer); $nli->show(); @@ -278,7 +277,6 @@ class QnanewanswerAction extends Action $this->msg = $msg; $this->showPage(); } - } class NoticeAnswerListItem extends NoticeListItem @@ -344,10 +342,10 @@ class NoticeAnswerListItem extends NoticeListItem $form = new QnashowanswerForm($this->out, $this->answer); $form->show(); } else { + // TRANS: Error message displayed when an answer has no content. $out->text(_m('Answer data is missing.')); } $this->out->elementEnd('p'); } - -} \ No newline at end of file +} diff --git a/plugins/QnA/actions/qnanewquestion.php b/plugins/QnA/actions/qnanewquestion.php index 48542ab06e..d6584b8f44 100644 --- a/plugins/QnA/actions/qnanewquestion.php +++ b/plugins/QnA/actions/qnanewquestion.php @@ -76,8 +76,8 @@ class QnanewquestionAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to create a Question while not logged in. throw new ClientException( + // TRANS: Client exception thrown trying to create a Question while not logged in. _m('You must be logged in to post a question.'), 403 ); @@ -240,5 +240,4 @@ class NoticeQuestionListItem extends NoticeListItem $this->out->element('ul', 'notices threaded-replies xoxo'); parent::showEnd(); } - -} \ No newline at end of file +} diff --git a/plugins/QnA/actions/qnareviseanswer.php b/plugins/QnA/actions/qnareviseanswer.php index 993543c995..ce4bdea56a 100644 --- a/plugins/QnA/actions/qnareviseanswer.php +++ b/plugins/QnA/actions/qnareviseanswer.php @@ -79,8 +79,8 @@ class QnareviseanswerAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to answer a question while not logged in. throw new ClientException( + // TRANS: Client exception thrown trying to answer a question while not logged in. _m("You must be logged in to answer to a question."), 403 ); @@ -92,8 +92,8 @@ class QnareviseanswerAction extends Action $this->question = $this->answer->getQuestion(); if (empty($this->answer) || empty($this->question)) { - // TRANS: Client exception thrown trying to respond to a non-existing question. throw new ClientException( + // TRANS: Client exception thrown trying to respond to a non-existing question. _m('Invalid or missing answer.'), 404 ); @@ -243,7 +243,8 @@ class QnareviseanswerAction extends Action $this->xw->startDocument('1.0', 'UTF-8'); $this->elementStart('html'); $this->elementStart('head'); - $this->element('title', null, _m('Answer')); + // TRANS: Form title for sending an answer. + $this->element('title', null, _m('TITLE','Answer')); $this->elementEnd('head'); $this->elementStart('body'); $form = new QnareviseanswerForm($this->answer, $this); diff --git a/plugins/QnA/actions/qnashowanswer.php b/plugins/QnA/actions/qnashowanswer.php index 24296a5af6..30ce406739 100644 --- a/plugins/QnA/actions/qnashowanswer.php +++ b/plugins/QnA/actions/qnashowanswer.php @@ -64,31 +64,35 @@ class QnashowanswerAction extends ShownoticeAction $this->answer = QnA_Answer::staticGet('id', $this->id); if (empty($this->answer)) { + // TRANS: Client exception thrown when requesting a non-existing answer. throw new ClientException(_m('No such answer.'), 404); } $this->question = $this->answer->getQuestion(); if (empty($this->question)) { + // TRANS: Client exception thrown when requesting an answer that has no connected question. throw new ClientException(_m('No question for this answer.'), 404); } $this->notice = Notice::staticGet('uri', $this->answer->uri); if (empty($this->notice)) { - // Did we used to have it, and it got deleted? + // TRANS: Did we used to have it, and it got deleted? throw new ClientException(_m('No such answer.'), 404); } $this->user = User::staticGet('id', $this->answer->profile_id); if (empty($this->user)) { + // TRANS: Client exception thrown when requesting answer data for a non-existing user. throw new ClientException(_m('No such user.'), 404); } $this->profile = $this->user->getProfile(); if (empty($this->profile)) { + // TRANS: Client exception thrown when requesting answer data for a user without a profile. throw new ServerException(_m('User without a profile.')); } diff --git a/plugins/QnA/actions/qnashowquestion.php b/plugins/QnA/actions/qnashowquestion.php index c30464bbf6..14be3a6443 100644 --- a/plugins/QnA/actions/qnashowquestion.php +++ b/plugins/QnA/actions/qnashowquestion.php @@ -151,9 +151,9 @@ class QnashowquestionAction extends ShownoticeAction */ function title() { - // TRANS: Page title for a question. - // TRANS: %1$s is the nickname of the user who asked the question, %2$s is the question. return sprintf( + // TRANS: Page title for a question. + // TRANS: %1$s is the nickname of the user who asked the question, %2$s is the question. _m('%1$s\'s question: %2$s'), $this->user->nickname, $this->question->title @@ -168,7 +168,6 @@ class QnashowquestionAction extends ShownoticeAction return Action::lastModified(); } - /** * @fixme combine the notice time with question update time */ diff --git a/plugins/QnA/actions/qnavote.php b/plugins/QnA/actions/qnavote.php index 8098cb87d0..715f81e831 100644 --- a/plugins/QnA/actions/qnavote.php +++ b/plugins/QnA/actions/qnavote.php @@ -3,7 +3,7 @@ * StatusNet - the distributed open-source microblogging tool * Copyright (C) 2011, StatusNet, Inc. * - * Vote on a questino or answer + * Vote on a question or answer * * PHP version 5 * @@ -81,7 +81,7 @@ class Qnavote extends Action if (empty($this->user)) { // TRANS: Client exception thrown trying to answer a question while not logged in. - throw new ClientException(_m("You must be logged in to answer to a question."), + throw new ClientException(_m('You must be logged in to answer to a question.'), 403); } @@ -146,7 +146,7 @@ class Qnavote extends Action $this->xw->startDocument('1.0', 'UTF-8'); $this->elementStart('html'); $this->elementStart('head'); - // TRANS: Page title after sending an answer. + // TRANS: Page title after sending in a vote for a question or answer. $this->element('title', null, _m('Answers')); $this->elementEnd('head'); $this->elementStart('body'); diff --git a/plugins/QnA/classes/QnA_Answer.php b/plugins/QnA/classes/QnA_Answer.php index 1a415f4af4..7f92e47c61 100644 --- a/plugins/QnA/classes/QnA_Answer.php +++ b/plugins/QnA/classes/QnA_Answer.php @@ -174,7 +174,9 @@ class QnA_Answer extends Managed_DataObject { $question = QnA_Question::staticGet('id', $this->question_id); if (empty($question)) { - throw new Exception("No question with ID {$this->question_id}"); + // TRANS: Exception thown when getting a question with a non-existing ID. + // TRANS: %s is the non-existing question ID. + throw new Exception(sprintf(_m('No question with ID %s'),$this->question_id)); } return $question; } @@ -183,7 +185,9 @@ class QnA_Answer extends Managed_DataObject { $profile = Profile::staticGet('id', $this->profile_id); if (empty($profile)) { - throw new Exception("No profile with ID {$this->profile_id}"); + // TRANS: Exception thown when getting a profile with a non-existing ID. + // TRANS: %s is the non-existing profile ID. + throw new Exception(sprintf(_m('No profile with ID %s'),$this->profile_id)); } return $profile; } @@ -226,7 +230,9 @@ class QnA_Answer extends Managed_DataObject $out->elementstart('span', 'answer-revisions'); $out->text( htmlspecialchars( - sprintf(_m('%s revisions'), $answer->revisions) + // Notification of how often an answer was revised. + // TRANS: %s is the number of answer revisions. + sprintf(_m('%s revision','%s revisions',$answer->revisions), $answer->revisions) ) ); $out->elementEnd('span'); @@ -239,14 +245,14 @@ class QnA_Answer extends Managed_DataObject static function toString($profile, $question, $answer) { + // @todo FIXME: unused variable? $notice = $question->getNotice(); - $fmt = _m( - '%1$s answered the question "%2$s": %3$s' - ); - return sprintf( - $fmt, + // TRANS: Text for a question that was answered. + // TRANS: %1$s is the user that answered, %2$s is the question title, + // TRANS: %2$s is the answer content. + _m('%1$s answered the question "%2$s": %3$s'), htmlspecialchars($profile->getBestName()), htmlspecialchars($question->title), htmlspecialchars($answer->content) @@ -285,6 +291,8 @@ class QnA_Answer extends Managed_DataObject $answer->insert(); $content = sprintf( + // TRANS: Text for a question that was answered. + // TRANS: %s is the question title. _m('answered "%s"'), $question->title ); diff --git a/plugins/QnA/classes/QnA_Question.php b/plugins/QnA/classes/QnA_Question.php index e2430087c0..6498df2fc1 100644 --- a/plugins/QnA/classes/QnA_Question.php +++ b/plugins/QnA/classes/QnA_Question.php @@ -42,7 +42,6 @@ if (!defined('STATUSNET')) { * * @see DB_DataObject */ - class QnA_Question extends Managed_DataObject { const OBJECT_TYPE = 'http://activityschema.org/object/question'; @@ -150,7 +149,9 @@ class QnA_Question extends Managed_DataObject { $profile = Profile::staticGet('id', $this->profile_id); if (empty($profile)) { - throw new Exception("No profile with ID {$this->profile_id}"); + // TRANS: Exception trown when getting a profile for a non-existing ID. + // TRANS: %s is the provided profile ID. + throw new Exception(sprintf(_m('No profile with ID %s'),$this->profile_id)); } return $profile; } @@ -235,12 +236,15 @@ class QnA_Question extends Managed_DataObject if (!empty($cnt)) { $out->elementStart('span', 'answer-count'); - $out->text(sprintf(_m('%s answers'), $cnt)); + // TRANS: Number of given answers to a question. + // TRANS: %d is the number of given answers. + $out->text(sprintf(_m('%s answer','%s answers'), $cnt)); $out->elementEnd('span'); } if (!empty($question->closed)) { $out->elementStart('span', 'question-closed'); + // TRANS: Notification that a question cannot be answered anymore because it is closed. $out->text(_m('This question is closed.')); $out->elementEnd('span'); } @@ -298,7 +302,6 @@ class QnA_Question extends Managed_DataObject $uriLen = mb_strlen($q->uri); $targetLen = $max - ($uriLen + 15); $title = mb_substr($q->title, 0, $targetLen) . '…'; - } $content = $title . ' ' . $q->uri; diff --git a/plugins/QnA/lib/qnanewanswerform.php b/plugins/QnA/lib/qnanewanswerform.php index 97c1fca5e3..e3ef9ba42c 100644 --- a/plugins/QnA/lib/qnanewanswerform.php +++ b/plugins/QnA/lib/qnanewanswerform.php @@ -124,4 +124,3 @@ class QnanewanswerForm extends Form $this->out->submit('qna-answer-submit', _m('BUTTON', 'Answer'), 'submit', 'submit'); } } - diff --git a/plugins/QnA/lib/qnanewquestionform.php b/plugins/QnA/lib/qnanewquestionform.php index cbd4e1bc68..a1a2a94483 100644 --- a/plugins/QnA/lib/qnanewquestionform.php +++ b/plugins/QnA/lib/qnanewquestionform.php @@ -106,18 +106,22 @@ class QnanewquestionForm extends Form $this->li(); $this->out->input( 'qna-question-title', - _m('Title'), + // TRANS: Field label for a new question. + _m('LABEL','Title'), $this->title, - _m('Title of your question'), + // TRANS: Field title for a new question. + _m('The title of your question.'), 'title' ); $this->unli(); $this->li(); $this->out->textarea( 'qna-question-description', - _m('Description'), + // TRANS: Field label for question details. + _m('LABEL','Description'), $this->description, - _m('Your question in detail'), + // TRANS: Field title for question details. + _m('Your question in detail.'), 'description' ); $this->unli(); diff --git a/plugins/QnA/lib/qnareviseanswerform.php b/plugins/QnA/lib/qnareviseanswerform.php index 280dd74cd9..bf20895e7f 100644 --- a/plugins/QnA/lib/qnareviseanswerform.php +++ b/plugins/QnA/lib/qnareviseanswerform.php @@ -115,7 +115,7 @@ class QnareviseanswerForm extends Form */ function formActions() { - // TRANS: Button text for submitting a poll response. + // TRANS: Button text for submitting a revised answer. $this->out->submit('submit', _m('BUTTON', 'Submit')); } } diff --git a/plugins/QnA/lib/qnashowanswerform.php b/plugins/QnA/lib/qnashowanswerform.php index fcefb5d0ed..8ca573c1c1 100644 --- a/plugins/QnA/lib/qnashowanswerform.php +++ b/plugins/QnA/lib/qnashowanswerform.php @@ -146,19 +146,19 @@ class QnashowanswerForm extends Form if (empty($this->answer->best)) { $this->out->submit( 'qna-best-answer', - // TRANS: Button text for marking an answer as "best" + // TRANS: Button text for marking an answer as "best". _m('BUTTON', 'Best'), 'submit', 'best', - // TRANS: Title for button text marking an answer as "best" - _m('Mark as best answer') + // TRANS: Title for button text marking an answer as "best". + _m('Mark this answer as the best answer.') ); } } /* - * @fixme: Revise is disabled until we figure out the + * @todo FIXME: Revise is disabled until we figure out the * Ostatus bits This comment is just a reminder * that the UI for this works. */ @@ -166,12 +166,12 @@ class QnashowanswerForm extends Form if ($user->id == $this->answer->profile_id) { $this->out->submit( 'revise', - // TRANS: Button text for revising an answer + // TRANS: Button text for revising an answer. _m('BUTTON', 'Revise'), 'submit', null, - // TRANS: Title for button text for revising an answer - _m('Revise your answer') + // TRANS: Title for button text for revising an answer. + _m('Revise your answer.') ); } */ diff --git a/plugins/QnA/lib/qnashowquestionform.php b/plugins/QnA/lib/qnashowquestionform.php index 07fd5a68db..0ac1c82377 100644 --- a/plugins/QnA/lib/qnashowquestionform.php +++ b/plugins/QnA/lib/qnashowquestionform.php @@ -103,7 +103,7 @@ class QnashowquestionForm extends Form function formLegend() { // TRANS: Form legend for revising the answer. - $this->out->element('legend', null, _m('Question')); + $this->out->element('legend', null, _m('LEGEND','Question')); } /** @@ -114,7 +114,7 @@ class QnashowquestionForm extends Form function formData() { $this->out->hidden( - 'qna-quesiton-id', + 'qna-question-id', 'question-' . $this->question->id, 'id' ); @@ -147,12 +147,12 @@ class QnashowquestionForm extends Form if ($user->id == $this->question->profile_id) { $this->out->submit( 'qna-question-close', - // TRANS: Button text for closing a question + // TRANS: Button text for closing a question. _m('BUTTON', 'Close'), 'submit', 'submit', - // TRANS: Title for button text for closing a question - _m('Close the question') + // TRANS: Title for button text for closing a question. + _m('Close the question to no one can answer it anymore.') ); } } diff --git a/plugins/QnA/lib/qnavoteform.php b/plugins/QnA/lib/qnavoteform.php index f6976c8834..ac13ea4805 100644 --- a/plugins/QnA/lib/qnavoteform.php +++ b/plugins/QnA/lib/qnavoteform.php @@ -118,4 +118,3 @@ class QnavoteForm extends Form $this->out->submit('submit', _m('BUTTON', 'Submit')); } } -