Browse Source

Move polling lang to a separate file

Visman 4 years ago
parent
commit
fe112ac1f6

+ 4 - 0
app/Models/Pages/Edit.php

@@ -35,6 +35,10 @@ class Edit extends Page
 
         $this->c->Lang->load('post');
 
+        if ('1' == $this->c->config->b_poll_enabled) {
+            $this->c->Lang->load('poll');
+        }
+
         if ('POST' === $method) {
             $v = $this->messageValidator($post, 'EditPost', $args, true, $editSubject);
 

+ 4 - 0
app/Models/Pages/Post.php

@@ -32,6 +32,10 @@ class Post extends Page
 
         $this->c->Lang->load('post');
 
+        if ('1' == $this->c->config->b_poll_enabled) {
+            $this->c->Lang->load('poll');
+        }
+
         $this->onlinePos = 'forum-' . $forum->id;
 
         if ('POST' === $method) {

+ 2 - 0
app/Models/Pages/Topic.php

@@ -171,6 +171,8 @@ class Topic extends Page
             $topic->poll_type > 0
             && '1' == $this->c->config->b_poll_enabled
         ) {
+            $this->c->Lang->load('poll');
+
             $this->poll = $topic->poll;
         }
 

+ 0 - 9
app/lang/en/common.po

@@ -550,12 +550,3 @@ msgstr "Unsubscribe"
 
 msgid "Subscribe"
 msgstr "Subscribe"
-
-msgid "Question %s legend"
-msgstr "Question %s"
-
-msgid "You can choose up to %s answers"
-msgstr "You can choose up to %s answers."
-
-msgid "In total voted: %s"
-msgstr "In total voted: %s"

+ 64 - 0
app/lang/en/poll.po

@@ -0,0 +1,64 @@
+#
+msgid ""
+msgstr ""
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Project-Id-Version: ForkBB\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: \n"
+"Language-Team: ForkBB <mio.visman@yandex.ru>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+
+msgid "Poll legend"
+msgstr "Poll"
+
+msgid "Include poll"
+msgstr "Include poll"
+
+msgid "Hide poll results up to %s voters"
+msgstr "Hide poll results up to %s voters"
+
+msgid "Question text label"
+msgstr "Текст вопроса"
+
+msgid "Answer type label"
+msgstr "Number of answer"
+
+msgid "Answer type help"
+msgstr "The maximum number of answers for voting."
+
+msgid "Answer %s label"
+msgstr "Answer %s"
+
+msgid "Question number %s is preceded by an empty question"
+msgstr "Question number %s is preceded by an empty question."
+
+msgid "For question number %s, the structure of answers is broken"
+msgstr "For question number %s, the structure of answers is broken."
+
+msgid "Answer number %1$s is preceded by an empty answer (question number %2$s)"
+msgstr "Answer number %1$s is preceded by an empty answer (question number %2$s)."
+
+msgid "For question number %s, there is no value for the maximum number of answers for voting"
+msgstr "For question number %s, there is no value for the maximum number of answers for voting."
+
+msgid "For question number %s, the maximum number of answers for voting more answers"
+msgstr "For question number %s, the maximum number of answers for voting more answers."
+
+msgid "Requires at least two answers per question (%s)"
+msgstr "Requires at least two answers per question (%s)."
+
+msgid "The poll structure is broken"
+msgstr "The poll structure is broken"
+
+msgid "Question %s legend"
+msgstr "Question %s"
+
+msgid "You can choose up to %s answers"
+msgstr "You can choose up to %s answers."
+
+msgid "In total voted: %s"
+msgstr "In total voted: %s"

+ 0 - 42
app/lang/en/post.po

@@ -101,45 +101,3 @@ msgstr "Merge with previous if it yours"
 
 msgid "Edit redirect"
 msgstr "Post updated."
-
-msgid "Poll legend"
-msgstr "Poll"
-
-msgid "Include poll"
-msgstr "Include poll"
-
-msgid "Hide poll results up to %s voters"
-msgstr "Hide poll results up to %s voters"
-
-msgid "Question text label"
-msgstr "Текст вопроса"
-
-msgid "Answer type label"
-msgstr "Number of answer"
-
-msgid "Answer type help"
-msgstr "The maximum number of answers for voting."
-
-msgid "Answer %s label"
-msgstr "Answer %s"
-
-msgid "Question number %s is preceded by an empty question"
-msgstr "Question number %s is preceded by an empty question."
-
-msgid "For question number %s, the structure of answers is broken"
-msgstr "For question number %s, the structure of answers is broken."
-
-msgid "Answer number %1$s is preceded by an empty answer (question number %2$s)"
-msgstr "Answer number %1$s is preceded by an empty answer (question number %2$s)."
-
-msgid "For question number %s, there is no value for the maximum number of answers for voting"
-msgstr "For question number %s, there is no value for the maximum number of answers for voting."
-
-msgid "For question number %s, the maximum number of answers for voting more answers"
-msgstr "For question number %s, the maximum number of answers for voting more answers."
-
-msgid "Requires at least two answers per question (%s)"
-msgstr "Requires at least two answers per question (%s)."
-
-msgid "The poll structure is broken"
-msgstr "The poll structure is broken"

+ 0 - 9
app/lang/ru/common.po

@@ -552,12 +552,3 @@ msgstr "Отписаться"
 
 msgid "Subscribe"
 msgstr "Подписаться"
-
-msgid "Question %s legend"
-msgstr "Вопрос %s"
-
-msgid "You can choose up to %s answers"
-msgstr "Можете выбрать до %s ответов."
-
-msgid "In total voted: %s"
-msgstr "Проголосовало: %s"

+ 64 - 0
app/lang/ru/poll.po

@@ -0,0 +1,64 @@
+#
+msgid ""
+msgstr ""
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Project-Id-Version: ForkBB\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: \n"
+"Language-Team: ForkBB <mio.visman@yandex.ru>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ru\n"
+
+msgid "Poll legend"
+msgstr "Опрос"
+
+msgid "Include poll"
+msgstr "Включить опрос"
+
+msgid "Hide poll results up to %s voters"
+msgstr "Скрывать результаты опроса до %s проголосовавших"
+
+msgid "Question text label"
+msgstr "Текст вопроса"
+
+msgid "Answer type label"
+msgstr "Варианты выбора"
+
+msgid "Answer type help"
+msgstr "Максимальное количество вариантов выбора ответа при голосовании."
+
+msgid "Answer %s label"
+msgstr "Ответ %s"
+
+msgid "Question number %s is preceded by an empty question"
+msgstr "Вопросу номер %s предшествует пустой вопрос."
+
+msgid "For question number %s, the structure of answers is broken"
+msgstr "Для вопроса номер %s нарушена структура ответов."
+
+msgid "Answer number %1$s is preceded by an empty answer (question number %2$s)"
+msgstr "Ответу номер %1$s предшествует пустой ответ (вопрос номер %2$s)."
+
+msgid "For question number %s, there is no value for the maximum number of answers for voting"
+msgstr "Для вопроса номер %s отсутствует значение максимального количества вариантов выбора ответа при голосовании."
+
+msgid "For question number %s, the maximum number of answers for voting more answers"
+msgstr "Для вопроса номер %s максимальное количество вариантов выбора ответа при голосовании больше количества ответов."
+
+msgid "Requires at least two answers per question (%s)"
+msgstr "Нужно задать минимум два ответа на вопрос (%s)."
+
+msgid "The poll structure is broken"
+msgstr "Структура опроса нарушена"
+
+msgid "Question %s legend"
+msgstr "Вопрос %s"
+
+msgid "You can choose up to %s answers"
+msgstr "Можете выбрать до %s ответов."
+
+msgid "In total voted: %s"
+msgstr "Проголосовало: %s"

+ 0 - 42
app/lang/ru/post.po

@@ -101,45 +101,3 @@ msgstr "Соединить с предыдущим сообщением, есл
 
 msgid "Edit redirect"
 msgstr "Сообщение обновлено."
-
-msgid "Poll legend"
-msgstr "Опрос"
-
-msgid "Include poll"
-msgstr "Включить опрос"
-
-msgid "Hide poll results up to %s voters"
-msgstr "Скрывать результаты опроса до %s проголосовавших"
-
-msgid "Question text label"
-msgstr "Текст вопроса"
-
-msgid "Answer type label"
-msgstr "Варианты выбора"
-
-msgid "Answer type help"
-msgstr "Максимальное количество вариантов выбора ответа при голосовании."
-
-msgid "Answer %s label"
-msgstr "Ответ %s"
-
-msgid "Question number %s is preceded by an empty question"
-msgstr "Вопросу номер %s предшествует пустой вопрос."
-
-msgid "For question number %s, the structure of answers is broken"
-msgstr "Для вопроса номер %s нарушена структура ответов."
-
-msgid "Answer number %1$s is preceded by an empty answer (question number %2$s)"
-msgstr "Ответу номер %1$s предшествует пустой ответ (вопрос номер %2$s)."
-
-msgid "For question number %s, there is no value for the maximum number of answers for voting"
-msgstr "Для вопроса номер %s отсутствует значение максимального количества вариантов выбора ответа при голосовании."
-
-msgid "For question number %s, the maximum number of answers for voting more answers"
-msgstr "Для вопроса номер %s максимальное количество вариантов выбора ответа при голосовании больше количества ответов."
-
-msgid "Requires at least two answers per question (%s)"
-msgstr "Нужно задать минимум два ответа на вопрос (%s)."
-
-msgid "The poll structure is broken"
-msgstr "Структура опроса нарушена"