Skip to content

Commit

Permalink
Merge pull request #1560 from voltan/develop
Browse files Browse the repository at this point in the history
Work on #1465
  • Loading branch information
voltan authored Sep 6, 2017
2 parents 5e04f67 + 35d35ce commit c64db37
Show file tree
Hide file tree
Showing 24 changed files with 119 additions and 83 deletions.
12 changes: 8 additions & 4 deletions lib/Pi/Application/Bootstrap/Resource/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ public function checkAction(MvcEvent $e)
if (!isset($this->options['check_close'])
|| false !== $this->options['check_close']
) {
if (Pi::config('site_close')) {
$this->denyAccess($e);
if (Pi::config('site_close')
&& !Pi::service('permission')->isAdmin()
) {
$message = __('The website is in maintenance - we are back in a couple of minutes !');
$this->denyAccess($e, $message);
return;
}
}
Expand Down Expand Up @@ -159,13 +162,14 @@ public function checkModule(MvcEvent $e)
* Set denied error
*
* @param MvcEvent $e
* @param $message
* @return void
*/
protected function denyAccess(MvcEvent $e)
protected function denyAccess(MvcEvent $e, $message = true)
{
$statusCode = Pi::service('user')->getUser()->isGuest()
? 401 : 403;
$e->getResponse()->setStatusCode($statusCode);
$e->setError(true);
$e->setError($message);
}
}
Binary file modified usr/locale/en/country.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions usr/locale/en/country.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Timezone\n"
"POT-Creation-Date: 2017-04-18 20:19+0430\n"
"PO-Revision-Date: 2017-04-18 20:19+0430\n"
"POT-Creation-Date: 2017-09-06 15:22+0430\n"
"PO-Revision-Date: 2017-09-06 15:22+0430\n"
"Last-Translator: Taiwen Jiang <[email protected]>\n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _\n"
"X-Poedit-Basepath: ../_source/country\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
Binary file modified usr/locale/fa/default.mo
Binary file not shown.
38 changes: 21 additions & 17 deletions usr/locale/fa/default.po
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-Engine\n"
"POT-Creation-Date: 2017-04-18 20:20+0430\n"
"PO-Revision-Date: 2017-04-18 20:22+0430\n"
"POT-Creation-Date: 2017-09-06 15:19+0430\n"
"PO-Revision-Date: 2017-09-06 15:20+0430\n"
"Last-Translator: \n"
"Language-Team: Pi Engine\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: __;_t;_e\n"
"X-Poedit-Basepath: ../../..\n"
"X-Poedit-SearchPath-0: usr/editor\n"
"X-Poedit-SearchPath-1: lib/Pi\n"

#: lib/Pi/Application/Bootstrap/Resource/Permission.php:64
msgid "The website is in maintenance - we are back in a couple of minutes !"
msgstr "وب سایت برای به روز رسانی فنی بسته است - لطفا بعدا مراجعه فرمایید !"

#: lib/Pi/Application/Installer/Theme.php:348
msgid "Theme updated successfully."
msgstr "به روز رسانی قالب موفقیت آمیز بود"
msgstr "به روز رسانی قالب موفقیت آمیز بود."

#: lib/Pi/Application/Installer/Theme.php:355
msgid "Theme failed to update."
msgstr "خطا در به روز رسانی قالب"
msgstr "خطا در به روز رسانی قالب."

#: lib/Pi/Application/Installer/Theme.php:357
msgid "Theme upgraded successfully."
msgstr "به روز رسانی قابل موفقیت آمیز بود"
msgstr "به روز رسانی قابل موفقیت آمیز بود."

#: lib/Pi/Application/Installer/Theme.php:362
msgid "Theme asset publish failed."
msgstr "خطا در انتشار asset قالب"
msgstr "خطا در انتشار asset قالب."

#: lib/Pi/Application/Service/Comment.php:552
msgid "Posted a new comment."
msgstr "ارسال نظر جدید"
msgstr "ارسال نظر جدید."

#: lib/Pi/Application/Service/Editor.php:83
msgid "Pi Default Editor"
Expand Down Expand Up @@ -103,7 +107,7 @@ msgstr ""

#: lib/Pi/Authentication/Adapter/DbTable/AbstractAdapter.php:198
msgid "A record with the supplied identity could not be found."
msgstr "هیچ رکوردی برای هویت انتخاب شده یافت نشد"
msgstr "هیچ رکوردی برای هویت انتخاب شده یافت نشد."

#: lib/Pi/Authentication/Adapter/DbTable/AbstractAdapter.php:206
msgid "More than one record matches the supplied identity."
Expand All @@ -115,7 +119,7 @@ msgstr "اعتبار عرضه شده نامعتبر است."

#: lib/Pi/Authentication/Adapter/DbTable/CallbackAdapter.php:90
msgid "Authentication successful."
msgstr "تایید سندیت موفقیت آمیز بود"
msgstr "تایید سندیت موفقیت آمیز بود."

#: lib/Pi/Feed/Model.php:200
#, php-format
Expand Down Expand Up @@ -294,11 +298,11 @@ msgstr "برای تغییر تصویر کلیک کنید"
msgid "Required"
msgstr "ضروری"

#: lib/Pi/Form/View/Helper/Form.php:483
#: lib/Pi/Form/View/Helper/Form.php:485
msgid "Close"
msgstr "بستن"

#: lib/Pi/Form/View/Helper/Form.php:484
#: lib/Pi/Form/View/Helper/Form.php:486
msgid "Form"
msgstr "فرم"

Expand All @@ -316,7 +320,7 @@ msgstr "ماه"

#: lib/Pi/Mvc/Controller/ActionController.php:98
msgid "The requested action was not found."
msgstr "اکشن مورد نظر یافت نشد"
msgstr "اکشن مورد نظر یافت نشد."

#: lib/Pi/Mvc/Controller/Plugin/Terminate.php:39
msgid "Login"
Expand All @@ -333,7 +337,7 @@ msgstr "مهمان"

#: lib/Pi/View/Helper/Conditions.php:39
msgid "New terms and conditions are available. Please accept them."
msgstr "شرایط و مقررات جدید به روز شد ، لطفا آن را مطالعه و تایید فرمایید"
msgstr "شرایط و مقررات جدید به روز شد ، لطفا آن را مطالعه و تایید فرمایید."

#: lib/Pi/View/Helper/Conditions.php:40
msgid "I agree"
Expand All @@ -343,11 +347,11 @@ msgstr "موافق ام"
msgid "Read Term and conditions"
msgstr "مطالعه شرایط و مقررات"

#: lib/Pi/View/Helper/GoogleMap.php:208
#: lib/Pi/View/Helper/GoogleMap.php:228
msgid "Choose a location"
msgstr "انتخاب مکان"

#: lib/Pi/View/Helper/GoogleMap.php:209
#: lib/Pi/View/Helper/GoogleMap.php:229
msgid "View all"
msgstr "نمایش همه"

Expand All @@ -358,7 +362,7 @@ msgstr "صفحه"

#: lib/Pi/View/Helper/Tag.php:92
msgid "Tags: "
msgstr "برچسب ها :"
msgstr "برچسب ها : "

#~ msgid "Manager"
#~ msgstr "مدیریت"
Expand Down
Binary file modified usr/locale/fa/validator.mo
Binary file not shown.
14 changes: 11 additions & 3 deletions usr/locale/fa/validator.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-Engine\n"
"POT-Creation-Date: 2017-04-18 20:22+0430\n"
"PO-Revision-Date: 2017-04-18 20:24+0430\n"
"POT-Creation-Date: 2017-09-06 15:20+0430\n"
"PO-Revision-Date: 2017-09-06 15:22+0430\n"
"Last-Translator: \n"
"Language-Team: Pi Engine\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _\n"
"X-Poedit-Basepath: ../_source/Validator\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down Expand Up @@ -250,24 +250,32 @@ msgid ""
"Maximum allowed width for image should be '%maxwidth%' px but '%width%' px "
"detected"
msgstr ""
"حداکثر عرض تصویر باید '%maxwidth%' پیکسل باشد اما عرض تصویر انتخابی شما "
"'%width%' است"

#: File/ImageSize.php:11
msgid ""
"Minimum expected width for image should be '%minwidth%' px but '%width%' px "
"detected"
msgstr ""
"حداقل عرض تصویر باید '%minwidth%' پیکسل باشد اما عرض تصویر انتخابی شما "
"'%width%' است"

#: File/ImageSize.php:12
msgid ""
"Maximum allowed height for image should be '%maxheight%' px but '%height%' "
"px detected"
msgstr ""
"حداکثر ارتفاع تصویر باید '%maxheight%' پیکسل باشد اما ارتفاع تصویر انتخابی "
"شما '%height%' است"

#: File/ImageSize.php:13
msgid ""
"Minimum expected height for image should be '%minheight%' px but '%height%' "
"px detected"
msgstr ""
"حداقل ارتفاع تصویر باید '%minheight%' پیکسل باشد اما ارتفاع تصویر انتخابی "
"شما '%height%' است"

#: File/ImageSize.php:14
msgid "The size of image could not be detected"
Expand Down
Binary file modified usr/module/system/locale/fa/admin.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions usr/module/system/locale/fa/admin.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-admin\n"
"POT-Creation-Date: 2017-04-19 10:20+0430\n"
"PO-Revision-Date: 2017-04-19 10:23+0430\n"
"POT-Creation-Date: 2017-09-06 15:24+0430\n"
"PO-Revision-Date: 2017-09-06 15:24+0430\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _a;_t\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
Binary file modified usr/module/system/locale/fa/block.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions usr/module/system/locale/fa/block.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-block\n"
"POT-Creation-Date: 2017-04-19 10:13+0430\n"
"PO-Revision-Date: 2017-04-19 10:15+0430\n"
"POT-Creation-Date: 2017-09-06 15:24+0430\n"
"PO-Revision-Date: 2017-09-06 15:24+0430\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _b\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
Binary file modified usr/module/system/locale/fa/default.mo
Binary file not shown.
20 changes: 11 additions & 9 deletions usr/module/system/locale/fa/default.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-system\n"
"POT-Creation-Date: 2017-04-19 10:13+0430\n"
"PO-Revision-Date: 2017-04-19 10:14+0430\n"
"POT-Creation-Date: 2017-09-06 15:24+0430\n"
"PO-Revision-Date: 2017-09-06 15:24+0430\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down Expand Up @@ -110,8 +110,9 @@ msgstr "ورود کاربر"

#: src/Controller/Front/LoginController.php:93 src/Form/LoginForm.php:119
#: template/block/partial/login-register-modal.phtml:52
#: template/block/partial/login-register-modal.phtml:90
#: template/block/partial/login-register-modal.phtml:91
#: template/block/partial/login-register-modal.phtml:64
#: template/block/partial/login-register-modal.phtml:92
#: template/block/partial/login-register-modal.phtml:93
#: template/front/login-logout.phtml:13 template/front/register.phtml:6
msgid "Login"
msgstr "ورود"
Expand Down Expand Up @@ -159,7 +160,7 @@ msgstr ""
#: src/Controller/Front/PasswordController.php:127
#: src/Controller/Front/PasswordController.php:128
#: src/Form/FindPasswordForm.php:49
#: template/block/partial/login-register-modal.phtml:66
#: template/block/partial/login-register-modal.phtml:67
#: template/front/login.phtml:17 template/front/password-find.phtml:2
#: template/front/register.phtml:5
msgid "Find password"
Expand Down Expand Up @@ -222,8 +223,9 @@ msgstr "ایجاد حساب کاربری"
#: src/Controller/Front/RegisterController.php:52
#: src/Controller/Front/RegisterController.php:113
#: template/block/partial/login-register-modal.phtml:53
#: template/block/partial/login-register-modal.phtml:71
#: template/block/partial/login-register-modal.phtml:72
#: template/block/partial/login-register-modal.phtml:73
#: template/block/partial/login-register-modal.phtml:86
#: template/front/login-logout.phtml:14 template/front/login.phtml:20
msgid "Register"
msgstr "ثبت نام"
Expand Down Expand Up @@ -590,11 +592,11 @@ msgstr "دوباره سازی"
msgid "Customize"
msgstr "شخصی سازی"

#: template/block/partial/login-register-modal.phtml:69
#: template/block/partial/login-register-modal.phtml:70
msgid "Not already registered ?"
msgstr "تا کنون ثبت نام نکرده اید؟"

#: template/block/partial/login-register-modal.phtml:88
#: template/block/partial/login-register-modal.phtml:90
msgid "Already registered ?"
msgstr "قبلا ثبت نام کرده اید؟"

Expand Down
Binary file modified usr/module/user/locale/fa/admin.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions usr/module/user/locale/fa/admin.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-user\n"
"POT-Creation-Date: 2017-04-19 10:24+0430\n"
"PO-Revision-Date: 2017-04-19 10:24+0430\n"
"POT-Creation-Date: 2017-09-06 15:24+0430\n"
"PO-Revision-Date: 2017-09-06 15:24+0430\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _a;_t\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
Binary file modified usr/module/user/locale/fa/block.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions usr/module/user/locale/fa/block.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Pi-user\n"
"POT-Creation-Date: 2017-04-19 10:12+0430\n"
"PO-Revision-Date: 2017-04-19 10:12+0430\n"
"POT-Creation-Date: 2017-09-06 15:24+0430\n"
"PO-Revision-Date: 2017-09-06 15:24+0430\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.3\n"
"X-Poedit-KeywordsList: _b\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
Binary file modified usr/module/user/locale/fa/default.mo
Binary file not shown.
Loading

0 comments on commit c64db37

Please sign in to comment.