From 96446d897337a05ce0ab8e49727f2dffbb0a0775 Mon Sep 17 00:00:00 2001 From: pxthinh Date: Sun, 26 Nov 2023 00:11:10 +0700 Subject: [PATCH] feat: update view template for access denied and custom event --- lang/en/globals/access_denied.php | 7 +++++++ lang/en/tools/custom_event.php | 7 +++++++ lang/en/tools/custom_event_action.php | 6 ++++++ resources/views/globals/access_denied.blade.php | 12 ++++-------- resources/views/tools/custom_event.blade.php | 6 +++--- resources/views/tools/custom_event_action.blade.php | 4 ++-- 6 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 lang/en/globals/access_denied.php create mode 100644 lang/en/tools/custom_event.php create mode 100644 lang/en/tools/custom_event_action.php diff --git a/lang/en/globals/access_denied.php b/lang/en/globals/access_denied.php new file mode 100644 index 0000000..8069db6 --- /dev/null +++ b/lang/en/globals/access_denied.php @@ -0,0 +1,7 @@ + 'šŸ”’ Access Denied to Bot šŸš«', + 'chat_id' => 'šŸ›‘ Chat ID: :chatId ', + 'message' => 'Please contact the administrator for further information, Thank You..', +]; diff --git a/lang/en/tools/custom_event.php b/lang/en/tools/custom_event.php new file mode 100644 index 0000000..3976095 --- /dev/null +++ b/lang/en/tools/custom_event.php @@ -0,0 +1,7 @@ + 'Go to check the :link for more information about events.', + 'instruction' => 'Click and configure child events if the option has the āš™ icon.', + 'eventSelection' => 'And select an event to enable or disable notifications:', +]; diff --git a/lang/en/tools/custom_event_action.php b/lang/en/tools/custom_event_action.php new file mode 100644 index 0000000..939c992 --- /dev/null +++ b/lang/en/tools/custom_event_action.php @@ -0,0 +1,6 @@ + 'Setting actions for the :event event :platformIcon.', + 'actionPrompt' => 'Please select an action of this event to enable or disable notifications:', +]; diff --git a/resources/views/globals/access_denied.blade.php b/resources/views/globals/access_denied.blade.php index 0d77683..31db40c 100644 --- a/resources/views/globals/access_denied.blade.php +++ b/resources/views/globals/access_denied.blade.php @@ -3,12 +3,8 @@ * @var $chatId string */ -$message = 'šŸ”’ Access Denied to Bot šŸš«'; +?> +{!! __('tg-notifier::globals/access_denied.title') !!} -if (!empty($chatId)) { - $message .= "\n\nšŸ›‘ Chat ID: {$chatId} \n"; -} - -$message .= 'Please contact the administrator for further information, Thank You..'; - -echo $message; +{!! __('tg-notifier::globals/access_denied.chat_id', ['chatId' => $chatId]) !!} +{!! __('tg-notifier::globals/access_denied.message') !!} diff --git a/resources/views/tools/custom_event.blade.php b/resources/views/tools/custom_event.blade.php index a40ce49..9c23c6e 100644 --- a/resources/views/tools/custom_event.blade.php +++ b/resources/views/tools/custom_event.blade.php @@ -8,7 +8,7 @@ $docsUrl = 'https://docs.gitlab.com/ee/user/project/integrations/webhooks.html'; } ?> -Go to check the documentation for more information about events. +{!! __('tg-notifier::tools/custom_event.title', ['link' => "$platform documentation"]) !!} --- -Click and configure child events if the option has the āš™ icon. -And select an event to enable or disable notifications: +{!! __('tg-notifier::tools/custom_event.instruction') !!} +{!! __('tg-notifier::tools/custom_event.eventSelection') !!} diff --git a/resources/views/tools/custom_event_action.blade.php b/resources/views/tools/custom_event_action.blade.php index 297aff0..8211a78 100644 --- a/resources/views/tools/custom_event_action.blade.php +++ b/resources/views/tools/custom_event_action.blade.php @@ -9,5 +9,5 @@ $platformIcon = 'šŸ¦Š'; } ?> -Setting actions for the event . -Please select an action of this event to enable or disable notifications: +{!! __('tg-notifier::tools/custom_event_action.title', ['event' => $event, 'platformIcon' => $platformIcon]) !!} +{!! __('tg-notifier::tools/custom_event_action.actionPrompt') !!}