Commit a1b59e33 authored by webchick's avatar webchick

Issue #2004246 by chrishks, hass, larowlan, nyirocsaba: Standardize...

Issue #2004246 by chrishks, hass, larowlan, nyirocsaba: Standardize capitalization on actions for comment operations: 'edit', 'translations', 'delete', 'reply', 'approve'.
parent 4cb66856
......@@ -154,14 +154,14 @@ function comment_admin_overview($form, &$form_state, $arg) {
);
$links = array();
$links['edit'] = array(
'title' => t('edit'),
'title' => t('Edit'),
'route_name' => 'comment.edit_page',
'route_parameters' => array('comment' => $comment->id()),
'query' => $destination,
);
if (module_invoke('content_translation', 'translate_access', $comment)) {
$links['translate'] = array(
'title' => t('translate'),
'title' => t('Translate'),
'route_name' => 'content_translation.translation_overview_comment',
'route_parameters' => array('comment' => $comment->id()),
'query' => $destination,
......
......@@ -163,7 +163,7 @@ protected function buildLinks(CommentInterface $entity, EntityInterface $comment
if ($status == COMMENT_OPEN) {
if ($entity->access('delete')) {
$links['comment-delete'] = array(
'title' => t('delete'),
'title' => t('Delete'),
'href' => "comment/{$entity->id()}/delete",
'html' => TRUE,
);
......@@ -171,21 +171,21 @@ protected function buildLinks(CommentInterface $entity, EntityInterface $comment
if ($entity->access('update')) {
$links['comment-edit'] = array(
'title' => t('edit'),
'title' => t('Edit'),
'href' => "comment/{$entity->id()}/edit",
'html' => TRUE,
);
}
if ($entity->access('create')) {
$links['comment-reply'] = array(
'title' => t('reply'),
'title' => t('Reply'),
'href' => "comment/reply/{$entity->entity_type->value}/{$entity->entity_id->value}/{$entity->field_name->value}/{$entity->id()}",
'html' => TRUE,
);
}
if ($entity->status->value == COMMENT_NOT_PUBLISHED && $entity->access('approve')) {
$links['comment-approve'] = array(
'title' => t('approve'),
'title' => t('Approve'),
'href' => "comment/{$entity->id()}/approve",
'html' => TRUE,
'query' => array('token' => $this->csrfToken->get("comment/{$entity->id()}/approve")),
......@@ -205,7 +205,7 @@ protected function buildLinks(CommentInterface $entity, EntityInterface $comment
// Add translations link for translation-enabled comment bundles.
if ($this->moduleHandler->moduleExists('content_translation') && content_translation_translate_access($entity)) {
$links['comment-translations'] = array(
'title' => t('translate'),
'title' => t('Translate'),
'href' => 'comment/' . $entity->id() . '/translations',
'html' => TRUE,
);
......
......@@ -43,7 +43,7 @@ protected function renderLink($data, ResultRow $values) {
return;
}
$text = !empty($this->options['text']) ? $this->options['text'] : t('approve');
$text = !empty($this->options['text']) ? $this->options['text'] : t('Approve');
$comment = $this->get_entity($values);
$this->options['alter']['make_link'] = TRUE;
......
......@@ -36,7 +36,7 @@ public function access() {
* Returns a string for the link text.
*/
protected function renderLink($data, ResultRow $values) {
$text = !empty($this->options['text']) ? $this->options['text'] : t('delete');
$text = !empty($this->options['text']) ? $this->options['text'] : t('Delete');
$comment = $this->getEntity($values);
$this->options['alter']['make_link'] = TRUE;
......
......@@ -56,7 +56,7 @@ protected function renderLink($data, ResultRow $values) {
return;
}
$text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
$text = !empty($this->options['text']) ? $this->options['text'] : t('Edit');
unset($this->options['alter']['fragment']);
if (!empty($this->options['destination'])) {
......
......@@ -36,7 +36,7 @@ public function access() {
* Returns a string for the link text.
*/
protected function renderLink($data, ResultRow $values) {
$text = !empty($this->options['text']) ? $this->options['text'] : t('reply');
$text = !empty($this->options['text']) ? $this->options['text'] : t('Reply');
$comment = $this->getEntity($values);
$this->options['alter']['make_link'] = TRUE;
......
......@@ -137,7 +137,7 @@ function testApprovalNodeInterface() {
$this->drupalGet('comment/1/approve', array('query' => array('token' => 'forged')));
$this->assertResponse(403, 'Forged comment approval was denied.');
$this->drupalGet('node/' . $this->node->id());
$this->clickLink(t('approve'));
$this->clickLink(t('Approve'));
$this->drupalLogout();
$this->drupalGet('node/' . $this->node->id());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment