diff --git a/Web/Presenters/AdminPresenter.php b/Web/Presenters/AdminPresenter.php index 39845ae4..65c93598 100644 --- a/Web/Presenters/AdminPresenter.php +++ b/Web/Presenters/AdminPresenter.php @@ -23,7 +23,7 @@ final class AdminPresenter extends OpenVKPresenter private function warnIfNoCommerce(): void { if(!OPENVK_ROOT_CONF["openvk"]["preferences"]["commerce"]) - $this->flash("warn", "Коммерция отключена системным администратором", "Настройки ваучеров и подарков будут сохранены, но не будут оказывать никакого влияния."); + $this->flash("warn", tr("admin_commerce_disabled"), tr("admin_commerce_disabled_desc")); } private function searchResults(object $repo, &$count) diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index c00df970..1869c038 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -173,7 +173,7 @@ {var $canAccessHelpdesk = $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)} {var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')} - Админ-панель + {_admin} Helpdesk {if $helpdeskTicketNotAnsweredCount > 0} ({$helpdeskTicketNotAnsweredCount}) diff --git a/Web/Presenters/templates/Admin/@layout.xml b/Web/Presenters/templates/Admin/@layout.xml index 5213802c..92de0cc0 100644 --- a/Web/Presenters/templates/Admin/@layout.xml +++ b/Web/Presenters/templates/Admin/@layout.xml @@ -1,3 +1,4 @@ +{var $instance_name = OPENVK_ROOT_CONF['openvk']['appearance']['name']} @@ -6,7 +7,7 @@ {var $css = file_get_contents(OPENVK_ROOT . "/Web/static/js/node_modules/@atlassian/aui/dist/aui/aui-prototyping.css")} {str_replace("fonts/", "/assets/packages/static/openvk/js/node_modules/@atlassian/aui/dist/aui/fonts/", $css)|noescape} - {include title} - Админ-панель {=OPENVK_ROOT_CONF['openvk']['appearance']['name']} + {include title} - {_admin} {$instance_name}
@@ -16,23 +17,15 @@

- {=OPENVK_ROOT_CONF['openvk']['appearance']['name']} + {$instance_name}

@@ -46,83 +39,64 @@
@@ -139,11 +113,11 @@

{$flashMessage->msg|noescape}

{/ifset} - + {ifset preHeader} {include preHeader} {/ifset} - +
@@ -167,11 +141,11 @@
- + {script "js/node_modules/jquery/dist/jquery.min.js"} {script "js/node_modules/@atlassian/aui/dist/aui/aui-prototyping.js"} - + {ifset scripts} {include scripts} {/ifset} diff --git a/Web/Presenters/templates/Admin/Club.xml b/Web/Presenters/templates/Admin/Club.xml index 91d7c6c6..a8f3ad50 100644 --- a/Web/Presenters/templates/Admin/Club.xml +++ b/Web/Presenters/templates/Admin/Club.xml @@ -1,191 +1,157 @@ {extends "@layout.xml"} {block title} - Редактировать {$club->getCanonicalName()} + {_edit} {$club->getCanonicalName()} {/block} {block heading} {$club->getCanonicalName()} {/block} - {block content} -{var $isMain = $mode === 'main'} -{var $isBan = $mode === 'ban'} -{var $isFollowers = $mode === 'followers'} + {var $isMain = $mode === 'main'} + {var $isBan = $mode === 'ban'} + {var $isFollowers = $mode === 'followers'} -{if $isMain} - - - -
- -
-
- - - - - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- isVerified()} checked {/if} /> - -
-
- isHideFromGlobalFeedEnabled()} checked {/if} /> - -
-
-
-
- - -
-
-
-
-{/if} - -{if $isBan} - - - -
- -
-
- - -
-
-
-
- - -
-
-
-
-{/if} - -{if $isFollowers} - - - -{var $followers = iterator_to_array($followers)} - -
- - - - - - - - - - - - -
{$follower->getId()} - + {if $isMain} +
+ +
+
+ + - {$follower->getCanonicalName()} + - - {$follower->getCanonicalName()} - - - заблокирован - -
{$follower->isFemale() ? "Женский" : "Мужской"}{$follower->getShortCode() ?? "(отсутствует)"}{$follower->getRegistrationTime()} - - Редактировать - -
-
- {var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count} - - - ⭁ туда - - - ⭇ сюда - -
-
-{/if} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ isVerified()} checked {/if} /> + +
+
+ isHideFromGlobalFeedEnabled()} checked {/if} /> + +
+
+
+
+ + +
+
+ +
+ {/if} + + {if $isBan} +
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ {/if} + + {if $isFollowers} + {var $followers = iterator_to_array($followers)} + +
+ + + + + + + + + + + + +
{$follower->getId()} + + + {$follower->getCanonicalName()} + + + + {$follower->getCanonicalName()} + + {_admin_banned} + {$follower->isFemale() ? tr("female") : tr("male")}{$follower->getShortCode() ?? "(" . tr("none") . ")"}{$follower->getRegistrationTime()} + + {_edit} + +
+
+ {var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count} + + « + » +
+
+ {/if} {/block} diff --git a/Web/Presenters/templates/Admin/Clubs.xml b/Web/Presenters/templates/Admin/Clubs.xml index cbe5d80b..d240768b 100644 --- a/Web/Presenters/templates/Admin/Clubs.xml +++ b/Web/Presenters/templates/Admin/Clubs.xml @@ -2,14 +2,16 @@ {var $search = true} {block title} - Группы + {_admin_club_search} {/block} {block heading} - Бутылки + {_groups} {/block} -{block searchTitle}Поиск бутылок{/block} +{block searchTitle} + {include title} +{/block} {block content} {var $clubs = iterator_to_array($clubs)} @@ -18,12 +20,12 @@ - - - - - - + + + + + + @@ -49,11 +51,11 @@ {$user->getCanonicalName()} - + @@ -63,11 +65,7 @@
{var $isLast = ((10 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count} - - ⭁ туда - - - ⭇ сюда - + « + »
{/block} diff --git a/Web/Presenters/templates/Admin/Gift.xml b/Web/Presenters/templates/Admin/Gift.xml index fd05037c..8a20c538 100644 --- a/Web/Presenters/templates/Admin/Gift.xml +++ b/Web/Presenters/templates/Admin/Gift.xml @@ -2,9 +2,9 @@ {block title} {if $form->id === 0} - Новый подарок + {_admin_newgift} {else} - Подарок "{$form->name}" + {_gift} "{$form->name}" {/if} {/block} @@ -16,7 +16,7 @@
{if $form->id === 0} @@ -29,43 +29,39 @@
- Заменить изображение? + {_admin_image_replace}
{/if}
- +
- +
- - + +
- Обнулить? + {_admin_uses_reset}
@@ -75,13 +71,13 @@
- - + +
- + - +
@@ -94,12 +90,12 @@ {block scripts} diff --git a/Web/Presenters/templates/Admin/GiftCategories.xml b/Web/Presenters/templates/Admin/GiftCategories.xml index 113d45b6..d0fe0f30 100644 --- a/Web/Presenters/templates/Admin/GiftCategories.xml +++ b/Web/Presenters/templates/Admin/GiftCategories.xml @@ -1,7 +1,7 @@ {extends "@layout.xml"} {block title} - Наборы подарков + {_admin_giftsets} {/block} {block headingWrap} @@ -9,7 +9,7 @@ {_create} -

Наборы подарков

+

{_admin_giftsets}

{/block} {block content} @@ -27,12 +27,11 @@
@@ -40,17 +39,13 @@
#ИмяАвторОписаниеКороткий адресДействияID{_admin_title}{_admin_author}{_admin_description}{_admin_shortcode}{_admin_actions}
{$club->getDescription() ?? "(не указано)"}{$club->getDescription() ?? "(" . tr("none") . ")"} {$club->getShortCode()} - Редактировать + {_edit}
- Редактировать + {_edit} - Открыть - Открыть + {_admin_open}
{else}
-

Наборов подарков нету. Чтобы создать подарок, создайте набор.

+

{_admin_giftsets_none}

{/if}
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + sizeof($categories)) < $count} - - ⭁ туда - - - ⭇ сюда - + « + »
{/block} diff --git a/Web/Presenters/templates/Admin/GiftCategory.xml b/Web/Presenters/templates/Admin/GiftCategory.xml index 936a823f..15494b41 100644 --- a/Web/Presenters/templates/Admin/GiftCategory.xml +++ b/Web/Presenters/templates/Admin/GiftCategory.xml @@ -2,7 +2,7 @@ {block title} {if $form->id === 0} - Создать набор подарков + {_admin_giftsets_create} {else} {$form->languages["master"]->name} {/if} @@ -14,7 +14,7 @@ {block content} -

Общие настройки

+

{_admin_commonsettings}

-
Внутреннее название набора, которое будет использоваться, если не удаётся найти название на языке пользователя.
+
{_admin_giftsets_title}
-
Внутреннее описание набора, которое будет использоваться, если не удаётся найти название на языке пользователя.
+
{_admin_giftsets_description}
-

Языко-зависимые настройки

+

{_admin_langsettings}

{foreach $form->languages as $locale => $data} {continueIf $locale === "master"}
diff --git a/Web/Presenters/templates/Admin/Gifts.xml b/Web/Presenters/templates/Admin/Gifts.xml index b1c9cf90..64cde8f7 100644 --- a/Web/Presenters/templates/Admin/Gifts.xml +++ b/Web/Presenters/templates/Admin/Gifts.xml @@ -9,7 +9,7 @@ {_create} -

Набор "{$cat->getName()}"

+

{_admin_giftset} "{$cat->getName()}"

{/block} {block content} @@ -32,11 +32,11 @@ {$gift->getName()} - бесплатный + {_admin_price_free} - {$gift->getPrice()} голосов + {tr("points_amount", $gift->getPrice())} {$gift->getUsages()} раз @@ -72,11 +72,8 @@
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + sizeof($gifts)) < $count} - - ⭁ туда - - - ⭇ сюда - + + « + »
{/block} diff --git a/Web/Presenters/templates/Admin/Index.xml b/Web/Presenters/templates/Admin/Index.xml index f860f86f..62019de9 100644 --- a/Web/Presenters/templates/Admin/Index.xml +++ b/Web/Presenters/templates/Admin/Index.xml @@ -1,13 +1,13 @@ {extends "@layout.xml"} {block title} - Сводка + {_admin_overview_summary} {/block} {block heading} - Сводка + {_admin_overview_summary} {/block} {block content} - Да! + ┬─┬︵/(.□.)╯ {/block} diff --git a/Web/Presenters/templates/Admin/User.xml b/Web/Presenters/templates/Admin/User.xml index 205add63..e0f4d905 100644 --- a/Web/Presenters/templates/Admin/User.xml +++ b/Web/Presenters/templates/Admin/User.xml @@ -1,7 +1,7 @@ {extends "@layout.xml"} {block title} - Редактировать {$user->getCanonicalName()} + {_edit} {$user->getCanonicalName()} {/block} {block heading} @@ -10,95 +10,70 @@ {block content}
- -
- - - - + +
+ + + + + - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - isVerified()} checked {/if} /> -
-
- - -
-
-
- -
-
- - +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + isVerified()} checked {/if} /> +
+
+ + +
+
+
+ + +
+
+
{/block} diff --git a/Web/Presenters/templates/Admin/Users.xml b/Web/Presenters/templates/Admin/Users.xml index 51a3ea15..f538d7ad 100644 --- a/Web/Presenters/templates/Admin/Users.xml +++ b/Web/Presenters/templates/Admin/Users.xml @@ -2,14 +2,16 @@ {var $search = true} {block title} - Пользователи + {_admin_user_search} {/block} {block heading} - Пиздюки + {_users} {/block} -{block searchTitle}Поиск пиздюков{/block} +{block searchTitle} + {include title} +{/block} {block content} {var $users = iterator_to_array($users)} @@ -18,12 +20,12 @@ - - - - - - + + + + + + @@ -35,23 +37,21 @@ {$user->getCanonicalName()} - + {$user->getCanonicalName()} - - - заблокирован - + + {_admin_banned} - - + + @@ -61,12 +61,8 @@
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count} - - - ⭁ туда - - - ⭇ сюда - + + « + »
{/block} diff --git a/Web/Presenters/templates/Admin/Voucher.xml b/Web/Presenters/templates/Admin/Voucher.xml index 1de53fe0..712fb7e9 100644 --- a/Web/Presenters/templates/Admin/Voucher.xml +++ b/Web/Presenters/templates/Admin/Voucher.xml @@ -5,45 +5,36 @@ {/block} {block heading} - {_edit} №{$form->token ?? "undefined"} + {_edit} #{$form->token ?? "undefined"} {/block} {block content}
-
- +
- + -
Номер состоит из 24 символов, если формат неправильный или поле не заполнено, будет назначен автоматически.
+
{_admin_voucher_serial_desc}
- +
- +
@@ -55,9 +46,9 @@ {/if} -
Количество аккаунтов, которые могут использовать ваучер. Если написать -1, будет Infinity.
+
{_admin_voucher_usages_desc}
- +
@@ -66,7 +57,6 @@
-
#ИмяПолКороткий адресДата регистрацииДействияID{_admin_name}{_gender}{_admin_shortcode}{_registration_date}{_admin_actions}
{$user->isFemale() ? "Женский" : "Мужской"}{$user->getShortCode() ?? "(отсутствует)"}{$user->isFemale() ? tr("female") : tr("male")}{$user->getShortCode() ?? "(" . tr("none") . ")"} {$user->getRegistrationTime()} - Редактировать + {_edit} {if $thisUser->getChandlerUser()->can("substitute")->model('openvk\Web\Models\Entities\User')->whichBelongsTo(0)} - + {/if}
@@ -77,12 +67,10 @@ {$user->getCanonicalName()} - + {$user->getCanonicalName()} - - - заблокирован - + + {_admin_banned} diff --git a/Web/Presenters/templates/Admin/Vouchers.xml b/Web/Presenters/templates/Admin/Vouchers.xml index 319b8de7..331e0429 100644 --- a/Web/Presenters/templates/Admin/Vouchers.xml +++ b/Web/Presenters/templates/Admin/Vouchers.xml @@ -8,7 +8,7 @@ {_create} - +

{_vouchers}

{/block} @@ -16,13 +16,13 @@
- - - - - - - + + + + + + + @@ -34,28 +34,25 @@
#Серийный номерГолосаРейгтингОсталось использованийСостояниеДействияID{_admin_voucher_serial}{_coins}{_admin_voucher_rating}{_usages_left}{_admin_voucher_status}{_admin_actions}
{$voucher->getRemainingUsages() === INF ? "∞" : $voucher->getRemainingUsages()} {if $voucher->isExpired()} - закончился + {_admin_voucher_status_closed} {else} - активен + {_admin_voucher_status_opened} {/if} - Редактировать + {_edit}

- +
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + sizeof($vouchers)) < $count} - - ⭁ туда - - - ⭇ сюда - + + « + »
{/block} diff --git a/locales/en.strings b/locales/en.strings index 26588d08..63fc7cce 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -842,6 +842,84 @@ "ban_in_support_user_action" = "Ban in support"; "unban_in_support_user_action" = "Unban in support"; +/* Admin panel */ + +"admin" = "Admin panel"; + +"admin_ownerid" = "Owner ID"; +"admin_author" = "Author"; +"admin_name" = "Name"; +"admin_title" = "Title"; +"admin_description" = "Description"; +"admin_first_known_ip" = "First known IP"; +"admin_shortcode" = "Short code"; +"admin_verification" = "Verification"; +"admin_banreason" = "Ban reason"; +"admin_banned" = "banned"; +"admin_gender" = "Gender"; +"admin_registrationdate" = "Registration date"; +"admin_actions" = "Actions"; +"admin_image" = "Image"; +"admin_image_replace" = "Replace the image?"; +"admin_uses" = "Uses"; +"admin_uses_reset" = "Reset the number of uses?"; +"admin_limits" = "Limits"; +"admin_limits_reset" = "Reset the number of limits"; +"admin_open" = "Open"; +"admin_loginas" = "Login as..."; +"admin_commonsettings" = "Common settings"; +"admin_langsettings" = "Language-dependent settings"; + +"admin_tab_main" = "General"; +"admin_tab_ban" = "Ban"; +"admin_tab_followers" = "Followers"; + +"admin_overview" = "Overview"; +"admin_overview_summary" = "Summary"; + +"admin_content" = "User-generated content"; +"admin_user_search" = "Search for users"; +"admin_user_online" = "Online status"; +"admin_user_online_default" = "Default"; +"admin_user_online_incognito" = "Incognito"; +"admin_user_online_deceased" = "Deceased"; +"admin_club_search" = "Search for groups"; +"admin_club_excludeglobalfeed" = "Do not display posts in the global feed"; + +"admin_services" = "Paid services"; +"admin_newgift" = "New gift"; +"admin_price" = "Price"; +"admin_giftset" = "Gift set"; +"admin_giftsets" = "Gift sets"; +"admin_giftsets_none" = "There are no gift sets. Create a set to create a gift."; +"admin_giftsets_create" = "Create a gift set"; +"admin_giftsets_title" = "The internal name of the set, which will be used if no name can be found in the user's language."; +"admin_giftsets_description" = "The internal description of the set, which will be used if no name can be found in the user's language."; +"admin_price_free" = "free"; +"admin_voucher_rating" = "Rating"; +"admin_voucher_serial" = "Serial number"; +"admin_voucher_serial_desc" = "The number consists of 24 characters. If the format is incorrect or the field is not filled in, it will be assigned automatically."; +"admin_voucher_coins" = "Number of votes"; +"admin_voucher_rating" = "Number of rating"; +"admin_voucher_usages_desc" = "The number of accounts that can use the voucher. If you type -1, it will be infinity."; +"admin_voucher_status" = "Status"; +"admin_voucher_status_opened" = "active"; +"admin_voucher_status_closed" = "closed"; + +"admin_settings" = "Settings"; +"admin_settings_tuning" = "General"; +"admin_settings_appearance" = "Appearance"; +"admin_settings_security" = "Security"; +"admin_settings_integrations" = "Integrations"; +"admin_settings_system" = "System"; + +"admin_about" = "About OpenVK"; +"admin_about_version" = "Version"; +"admin_about_instance" = "Instance"; + +"admin_commerce_disabled" = "Commerce has been disabled by the system administrator"; +"admin_commerce_disabled_desc" = "The voucher and gift settings will be saved, but will have no effect."; + /* Paginator (deprecated) */ "paginator_back" = "Back"; diff --git a/locales/ru.strings b/locales/ru.strings index 04d4cda4..f5fc8414 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -885,6 +885,82 @@ "ban_in_support_user_action" = "Заблокировать в поддержке"; "unban_in_support_user_action" = "Разблокировать в поддержке"; +/* Admin panel */ + +"admin" = "Админ-панель"; + +"admin_ownerid" = "ID владельца"; +"admin_author" = "Автор"; +"admin_name" = "Имя"; +"admin_title" = "Название"; +"admin_description" = "Описание"; +"admin_first_known_ip" = "Первый IP"; +"admin_shortcode" = "Короткий адрес"; +"admin_verification" = "Верификация"; +"admin_banreason" = "Причина блокировки"; +"admin_banned" = "заблокирован"; +"admin_actions" = "Действия"; +"admin_image" = "Изображение"; +"admin_image_replace" = "Заменить изображение?"; +"admin_uses" = "Использований"; +"admin_uses_reset" = "Сбросить количество использований?"; +"admin_limits" = "Ограничения"; +"admin_limits_reset" = "Сбросить количество ограничений"; +"admin_open" = "Открыть"; +"admin_loginas" = "Войти как..."; +"admin_commonsettings" = "Общие настройки"; +"admin_langsettings" = "Языко-зависимые настройки"; + +"admin_tab_main" = "Главное"; +"admin_tab_ban" = "Блокировка"; +"admin_tab_followers" = "Участники"; + +"admin_overview" = "Обзор"; +"admin_overview_summary" = "Сводка"; + +"admin_content" = "Пользовательский контент"; +"admin_user_search" = "Поиск пользователей"; +"admin_user_online" = "Онлайн статус"; +"admin_user_online_default" = "По-умолчанию"; +"admin_user_online_incognito" = "Инкогнито"; +"admin_user_online_deceased" = "Покойник"; +"admin_club_search" = "Поиск групп"; +"admin_club_excludeglobalfeed" = "Не отображать записи в глобальной ленте"; + +"admin_services" = "Платные услуги"; +"admin_newgift" = "Новый подарок"; +"admin_price" = "Цена"; +"admin_giftset" = "Набор подарков"; +"admin_giftsets" = "Наборы подарков"; +"admin_giftsets_none" = "Нет наборов подарков. Создайте набор, чтобы создать подарок."; +"admin_giftsets_create" = "Создать набор подарков"; +"admin_giftsets_title" = "Внутреннее название набора, которое будет использоваться, если не удаётся найти название на языке пользователя."; +"admin_giftsets_description" = "Внутреннее описание набора, которое будет использоваться, если не удаётся найти название на языке пользователя."; +"admin_price_free" = "бесплатный"; +"admin_voucher_rating" = "Рейтинг"; +"admin_voucher_serial" = "Серийный номер"; +"admin_voucher_serial_desc" = "Номер состоит из 24 символов. Если формат неправильный или поле не заполнено, будет назначен автоматически."; +"admin_voucher_coins" = "Количество голосов"; +"admin_voucher_rating" = "Количество рейтинга"; +"admin_voucher_usages_desc" = "Количество аккаунтов, которые могут использовать ваучер. Если написать -1, будет бесконечность."; +"admin_voucher_status" = "Состояние"; +"admin_voucher_status_opened" = "активен"; +"admin_voucher_status_closed" = "закончился"; + +"admin_settings" = "Настройки"; +"admin_settings_tuning" = "Общее"; +"admin_settings_appearance" = "Внешний вид"; +"admin_settings_security" = "Безопасность"; +"admin_settings_integrations" = "Интеграции"; +"admin_settings_system" = "Система"; + +"admin_about" = "Об OpenVK"; +"admin_about_version" = "Версия"; +"admin_about_instance" = "Инстанция"; + +"admin_commerce_disabled" = "Коммерция отключена системным администратором"; +"admin_commerce_disabled_desc" = "Настройки ваучеров и подарков будут сохранены, но не будут оказывать никакого влияния."; + /* Paginator (deprecated) */ "paginator_back" = "Назад";