From b7725afb23bbf130f21fa48c7dd4541f965fde8e Mon Sep 17 00:00:00 2001 From: Visman Date: Sun, 28 May 2023 21:17:27 +0700 Subject: [PATCH] OAuth: Diversify the description of actions --- app/Models/Pages/RegLogTrait.php | 17 ++++++++++++++++- app/lang/en/admin_providers.po | 6 ++++++ app/lang/ru/admin_providers.po | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/Models/Pages/RegLogTrait.php b/app/Models/Pages/RegLogTrait.php index 714ac3e1..be9f2572 100644 --- a/app/Models/Pages/RegLogTrait.php +++ b/app/Models/Pages/RegLogTrait.php @@ -26,12 +26,27 @@ trait RegLogTrait $this->c->Lang->load('admin_providers'); + switch ($type) { + case 'reg': + $message = 'Sign up with %s'; + + break; + case 'add': + $message = 'From %s'; + + break; + default: + $message = 'Sign in with %s'; + + break; + } + $btns = []; foreach ($list as $name) { $btns[$name] = [ 'type' => 'submit', - 'value' => __(['Sign in with %s', __($name)]), + 'value' => __([$message, __($name)]), ]; } diff --git a/app/lang/en/admin_providers.po b/app/lang/en/admin_providers.po index b7a9b858..fe90a841 100644 --- a/app/lang/en/admin_providers.po +++ b/app/lang/en/admin_providers.po @@ -66,6 +66,12 @@ msgstr "Enable this checkbox if you want to change the data" msgid "Sign in with %s" msgstr "Sign in with %s" +msgid "Sign up with %s" +msgstr "Sign up with %s" + +msgid "From %s" +msgstr "%s" + msgid "Provider response error: %s" msgstr "Failed.
Provider response: %s." diff --git a/app/lang/ru/admin_providers.po b/app/lang/ru/admin_providers.po index 26e958da..3a06ea31 100644 --- a/app/lang/ru/admin_providers.po +++ b/app/lang/ru/admin_providers.po @@ -66,6 +66,12 @@ msgstr "Установите флажок, если хотите изменит msgid "Sign in with %s" msgstr "Войти с помощью %s" +msgid "Sign up with %s" +msgstr "Регистрация через %s" + +msgid "From %s" +msgstr "%s" + msgid "Provider response error: %s" msgstr "Ошибка.
Ответ провайдера: %s."