Browse Source

Update moderation page

Visman 3 years ago
parent
commit
057bc94388
4 changed files with 110 additions and 112 deletions
  1. 13 19
      app/Models/Pages/Moderate.php
  2. 3 3
      app/Models/Pages/Topic.php
  3. 43 45
      app/lang/en/misc.po
  4. 51 45
      app/lang/ru/misc.po

+ 13 - 19
app/Models/Pages/Moderate.php

@@ -389,8 +389,8 @@ class Moderate extends Page
     {
         switch ($v->step) {
             case 1:
-                $this->formTitle   = __('Move topics');
-                $this->buttonValue = 'Move';
+                $this->formTitle   = __(['Move topic title', $this->numObj]);
+                $this->buttonValue = ['Move topic btn', $this->numObj];
                 $this->crumbs      = $this->crumbs($this->formTitle, __('Moderate'), $v->topic ? $this->curTopic : $this->curForum);
                 $this->chkRedirect = true;
                 $this->form        = $this->formConfirm($topics, $v);
@@ -401,9 +401,7 @@ class Moderate extends Page
                     $forum = $this->c->forums->get($v->destination);
                     $this->c->topics->move(1 === $v->redirect, $forum, ...$topics);
 
-                    $message = $this->single ? 'Move topic redirect' : 'Move topics redirect';
-
-                    return $this->c->Redirect->url($this->curForum->link)->message($message);
+                    return $this->c->Redirect->url($this->curForum->link)->message(['Move topic redirect', $this->numObj]);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -428,8 +426,8 @@ class Moderate extends Page
 
         switch ($v->step) {
             case 1:
-                $this->formTitle   = __('Merge topics');
-                $this->buttonValue = 'Merge';
+                $this->formTitle   = __('Merge topics title');
+                $this->buttonValue = 'Merge btn';
                 $this->crumbs      = $this->crumbs($this->formTitle, __('Moderate'), $this->curForum);
                 $this->chkRedirect = true;
                 $this->form        = $this->formConfirm($topics, $v);
@@ -452,8 +450,8 @@ class Moderate extends Page
     {
         switch ($v->step) {
             case 1:
-                $this->formTitle   = __('Unstick topics');
-                $this->buttonValue = 'Unstick';
+                $this->formTitle   = __(['Unstick topic title', $this->numObj]);
+                $this->buttonValue = ['Unstick btn', $this->numObj];
                 $this->crumbs      = $this->crumbs($this->formTitle, __('Moderate'), $v->topic ? $this->curTopic : $this->curForum);
                 $this->form        = $this->formConfirm($topics, $v);
 
@@ -465,9 +463,7 @@ class Moderate extends Page
                         $this->c->topics->update($topic);
                     }
 
-                    $message = $this->single ? 'Unstick topic redirect' : 'Unstick topics redirect';
-
-                    return $this->c->Redirect->url($this->backLink)->message($message);
+                    return $this->c->Redirect->url($this->backLink)->message(['Unstick topic redirect', $this->numObj]);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -480,8 +476,8 @@ class Moderate extends Page
     {
         switch ($v->step) {
             case 1:
-                $this->formTitle   = __('Stick topics');
-                $this->buttonValue = 'Stick';
+                $this->formTitle   = __(['Stick topic title', $this->numObj]);
+                $this->buttonValue = ['Stick btn', $this->numObj];
                 $this->crumbs      = $this->crumbs($this->formTitle, __('Moderate'), $v->topic ? $this->curTopic : $this->curForum);
                 $this->form        = $this->formConfirm($topics, $v);
 
@@ -493,9 +489,7 @@ class Moderate extends Page
                         $this->c->topics->update($topic);
                     }
 
-                    $message = $this->single ? 'Stick topic redirect' : 'Stick topics redirect';
-
-                    return $this->c->Redirect->url($this->backLink)->message($message);
+                    return $this->c->Redirect->url($this->backLink)->message(['Stick topic redirect', $this->numObj]);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -508,8 +502,8 @@ class Moderate extends Page
     {
         switch ($v->step) {
             case 1:
-                $this->formTitle   = __('Split posts');
-                $this->buttonValue = 'Split';
+                $this->formTitle   = __('Split posts title');
+                $this->buttonValue = 'Split btn';
                 $this->needSubject = true;
                 $this->crumbs      = $this->crumbs($this->formTitle, __('Moderate'), $this->curTopic);
                 $this->form        = $this->formConfirm($posts, $v);

+ 3 - 3
app/Models/Pages/Topic.php

@@ -225,13 +225,13 @@ class Topic extends Page
             $form['btns']['unstick'] = [
                 'class'     => ['origin'],
                 'type'      => 'submit',
-                'value'     => __('Unstick topic'),
+                'value'     => __(['Unstick btn', 1]),
             ];
         } else {
             $form['btns']['stick'] = [
                 'class'     => ['origin'],
                 'type'      => 'submit',
-                'value'     => __('Stick topic'),
+                'value'     => __(['Stick btn', 1]),
             ];
         }
 
@@ -239,7 +239,7 @@ class Topic extends Page
             'move' => [
                 'class'     => ['origin'],
                 'type'      => 'submit',
-                'value'     => __('Move topic'),
+                'value'     => __(['Move topic btn', 1]),
             ],
             'delete' => [
                 'class'     => ['origin'],

+ 43 - 45
app/lang/en/misc.po

@@ -111,11 +111,10 @@ msgstr "Open"
 msgid "Close"
 msgstr "Close"
 
-msgid "Move topic"
-msgstr "Move topic"
-
-msgid "Move topics"
-msgstr "Move topics"
+msgid "Move topic title"
+msgid_plural "Move topics title"
+msgstr[0] "Move topic"
+msgstr[1] "Move topics"
 
 msgid "Invalid destination"
 msgstr "Invalid destination."
@@ -130,13 +129,9 @@ msgid "Leave redirect"
 msgstr "Leave redirect topic(s)"
 
 msgid "Move topic redirect"
-msgstr "Topic moved."
-
-msgid "Move topics redirect"
-msgstr "Topics moved."
-
-msgid "Confirm delete legend"
-msgstr "Please confirm deletion"
+msgid_plural "Move topics redirect"
+msgstr[0] "Topic moved."
+msgstr[1] "Topics moved."
 
 msgid "Delete topic title"
 msgid_plural "Delete topics title"
@@ -161,44 +156,43 @@ msgstr[1] "Topics closed."
 msgid "Not enough topics selected"
 msgstr "You must select at least two topics for merge."
 
+msgid "Stick topic title"
+msgid_plural "Stick topics title"
+msgstr[0] "Stick topic"
+msgstr[1] "Stick topics"
+
 msgid "Stick topic redirect"
-msgstr "Topic sticked."
+msgid_plural "Stick topics redirect"
+msgstr[0] "Topic sticked."
+msgstr[1] "Topics sticked."
 
-msgid "Stick topics redirect"
-msgstr "Topics sticked."
+msgid "Unstick topic title"
+msgid_plural "Unstick topics title"
+msgstr[0] "Unstick topic"
+msgstr[1] "Unstick topics"
 
 msgid "Unstick topic redirect"
-msgstr "Topic unsticked."
-
-msgid "Unstick topics redirect"
-msgstr "Topics unsticked."
+msgid_plural "Unstick topics redirect"
+msgstr[0] "Topic unsticked."
+msgstr[1] "Topics unsticked."
 
-msgid "Merge topics"
+msgid "Merge topics title"
 msgstr "Merge topics"
 
 msgid "Merge topics redirect"
 msgstr "Topics merged."
 
-msgid "Confirm merge legend"
-msgstr "Please confirm merge"
-
 msgid "New subject"
 msgstr "New subject"
 
 msgid "No subject"
 msgstr "No subject for new topic."
 
-msgid "Confirm split legend"
-msgstr "Please confirm split of selected posts and select destination of move."
-
-msgid "Split posts"
-msgstr "Split posts"
-
-msgid "Split posts comply"
-msgstr "Are you sure you want to split the selected posts?"
+msgid "Split posts title"
+msgstr "Split topic"
 
 msgid "Split posts redirect"
-msgstr "Posts have been split."
+msgstr "Topic is split."
 
 msgid "Delete post title"
 msgid_plural "Delete posts title"
@@ -287,8 +281,11 @@ msgid_plural "Delete posts btn"
 msgstr[0] "Delete post"
 msgstr[1] "Delete posts"
 
-msgid "Move topic"
-msgstr "Move topic"
+msgid "Move topic btn"
+msgid_plural "Move topics btn"
+msgstr[0] "Move topic"
+msgstr[1] "Move topics"
+msgstr[2] "Move topics"
 
 msgid "Open topic btn"
 msgid_plural "Open topics btn"
@@ -300,20 +297,21 @@ msgid_plural "Close topics btn"
 msgstr[0] "Close topic"
 msgstr[1] "Close topics"
 
-msgid "Unstick topic"
-msgstr "Unstick topic"
-
-msgid "Unstick topics"
-msgstr "Unstick topics"
+msgid "Merge btn"
+msgstr "Merge topics"
 
-msgid "Unstick"
-msgstr "Unstick"
+msgid "Unstick btn"
+msgid_plural "Unstick btn"
+msgstr[0] "Unstick topic"
+msgstr[1] "Unstick topics"
 
-msgid "Stick topics"
-msgstr "Stick topics"
+msgid "Stick btn"
+msgid_plural "Stick btn"
+msgstr[0] "Stick topic"
+msgstr[1] "Stick topics"
 
-msgid "Stick"
-msgstr "Stick"
+msgid "Split btn"
+msgstr "Split topic"
 
 msgid "Moderate forum"
 msgstr "Moderate forum"

+ 51 - 45
app/lang/ru/misc.po

@@ -111,11 +111,11 @@ msgstr "Открыть"
 msgid "Close"
 msgstr "Закрыть"
 
-msgid "Move topic"
-msgstr "Перенос темы"
-
-msgid "Move topics"
-msgstr "Перенос тем"
+msgid "Move topic title"
+msgid_plural "Move topics title"
+msgstr[0] "Перенос темы"
+msgstr[1] "Перенос тем"
+msgstr[2] "Перенос тем"
 
 msgid "Invalid destination"
 msgstr "Неверная цель переноса."
@@ -130,13 +130,10 @@ msgid "Leave redirect"
 msgstr "Оставить тему(ы) переадресации"
 
 msgid "Move topic redirect"
-msgstr "Тема перенесена."
-
-msgid "Move topics redirect"
-msgstr "Темы перенесены."
-
-msgid "Confirm delete legend"
-msgstr "Пожалуйста, подтвердите удаление"
+msgid_plural "Move topics redirect"
+msgstr[0] "Тема перенесена."
+msgstr[1] "Темы перенесены."
+msgstr[2] "Темы перенесены."
 
 msgid "Delete topic title"
 msgid_plural "Delete topics title"
@@ -165,44 +162,47 @@ msgstr[2] "Темы закрыты."
 msgid "Not enough topics selected"
 msgstr "Вы должны выбрать хотя бы две темы для объединения."
 
+msgid "Stick topic title"
+msgid_plural "Stick topics title"
+msgstr[0] "Выделение темы"
+msgstr[1] "Выделение тем"
+msgstr[2] "Выделение тем"
+
 msgid "Stick topic redirect"
-msgstr "Тема выделена."
+msgid_plural "Stick topics redirect"
+msgstr[0] "Тема выделена."
+msgstr[1] "Темы выделены."
+msgstr[2] "Темы выделены."
 
-msgid "Stick topics redirect"
-msgstr "Темы выделены."
+msgid "Unstick topic title"
+msgid_plural "Unstick topics title"
+msgstr[0] "Снятие выделения темы"
+msgstr[1] "Снятие выделения тем"
+msgstr[2] "Снятие выделения тем"
 
 msgid "Unstick topic redirect"
-msgstr "Выделение темы снято."
-
-msgid "Unstick topics redirect"
-msgstr "Выделение тем снято."
+msgid_plural "Unstick topics redirect"
+msgstr[0] "Выделение темы снято."
+msgstr[1] "Выделение тем снято."
+msgstr[2] "Выделение тем снято."
 
-msgid "Merge topics"
+msgid "Merge topics title"
 msgstr "Объединение тем"
 
 msgid "Merge topics redirect"
 msgstr "Темы объединены."
 
-msgid "Confirm merge legend"
-msgstr "Пожалуйста, подтвердите объединение"
-
 msgid "New subject"
 msgstr "Название новой темы"
 
 msgid "No subject"
 msgstr "Не задан заголовок для новой темы."
 
-msgid "Confirm split legend"
-msgstr "Пожалуйста, подтвердите разделение выбранных сообщений и укажите место переноса."
-
-msgid "Split posts"
-msgstr "Разделение сообщений"
-
-msgid "Split posts comply"
-msgstr "Вы уверены, что хотите разделить выбранные сообщения?"
+msgid "Split posts title"
+msgstr "Разделение темы"
 
 msgid "Split posts redirect"
-msgstr "Сообщения разделены."
+msgstr "Тема разделена."
 
 msgid "Delete post title"
 msgid_plural "Delete posts title"
@@ -297,8 +297,11 @@ msgstr[0] "Удалить сообщение"
 msgstr[1] "Удалить сообщения"
 msgstr[2] "Удалить сообщения"
 
-msgid "Move topic"
-msgstr "Перенести тему"
+msgid "Move topic btn"
+msgid_plural "Move topics btn"
+msgstr[0] "Перенести тему"
+msgstr[1] "Перенести темы"
+msgstr[2] "Перенести темы"
 
 msgid "Open topic btn"
 msgid_plural "Open topics btn"
@@ -312,20 +315,23 @@ msgstr[0] "Закрыть тему"
 msgstr[1] "Закрыть темы"
 msgstr[2] "Закрыть темы"
 
-msgid "Unstick topic"
-msgstr "Снять выделение темы"
-
-msgid "Unstick topics"
-msgstr "Снятие выделение тем"
+msgid "Merge btn"
+msgstr "Объединить темы"
 
-msgid "Unstick"
-msgstr "Снять выделение"
+msgid "Unstick btn"
+msgid_plural "Unstick btn"
+msgstr[0] "Снять выделение темы"
+msgstr[1] "Снять выделение тем"
+msgstr[2] "Снять выделение тем"
 
-msgid "Stick topics"
-msgstr "Выделение тем"
+msgid "Stick btn"
+msgid_plural "Stick btn"
+msgstr[0] "Выделить тему"
+msgstr[1] "Выделить темы"
+msgstr[2] "Выделить темы"
 
-msgid "Stick"
-msgstr "Выделить"
+msgid "Split btn"
+msgstr "Разделить тему"
 
 msgid "Moderate forum"
 msgstr "Модерирование раздела"