From fccbbeba36f038bc9c2cbb987be0d959d9c850eb Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Mon, 20 May 2024 20:29:25 +0700 Subject: [PATCH 1/2] fix: update menu translations --- lang/de/tools/menu.php | 5 +++-- lang/en/tools/menu.php | 5 +++-- lang/ja/tools/menu.php | 5 +++-- lang/vi/tools/menu.php | 5 +++-- src/Services/CommandService.php | 4 ++++ src/Traits/Markup.php | 4 ++-- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lang/de/tools/menu.php b/lang/de/tools/menu.php index fa225a2..0869d81 100644 --- a/lang/de/tools/menu.php +++ b/lang/de/tools/menu.php @@ -10,8 +10,9 @@ 'usage' => 'Show step by step usage', 'server' => 'To get Server Information', 'settings' => 'Go to settings of the bot', + 'set_menu' => 'Set the menu of the bot', 'back' => 'Back', - 'discussion' => '🗨 Discussion', - 'source_code' => '💠 Source Code', + 'discussion' => 'Discussion', + 'source_code' => 'Source Code', ]; diff --git a/lang/en/tools/menu.php b/lang/en/tools/menu.php index fa225a2..0869d81 100644 --- a/lang/en/tools/menu.php +++ b/lang/en/tools/menu.php @@ -10,8 +10,9 @@ 'usage' => 'Show step by step usage', 'server' => 'To get Server Information', 'settings' => 'Go to settings of the bot', + 'set_menu' => 'Set the menu of the bot', 'back' => 'Back', - 'discussion' => '🗨 Discussion', - 'source_code' => '💠 Source Code', + 'discussion' => 'Discussion', + 'source_code' => 'Source Code', ]; diff --git a/lang/ja/tools/menu.php b/lang/ja/tools/menu.php index fa225a2..0869d81 100644 --- a/lang/ja/tools/menu.php +++ b/lang/ja/tools/menu.php @@ -10,8 +10,9 @@ 'usage' => 'Show step by step usage', 'server' => 'To get Server Information', 'settings' => 'Go to settings of the bot', + 'set_menu' => 'Set the menu of the bot', 'back' => 'Back', - 'discussion' => '🗨 Discussion', - 'source_code' => '💠 Source Code', + 'discussion' => 'Discussion', + 'source_code' => 'Source Code', ]; diff --git a/lang/vi/tools/menu.php b/lang/vi/tools/menu.php index fa225a2..0869d81 100644 --- a/lang/vi/tools/menu.php +++ b/lang/vi/tools/menu.php @@ -10,8 +10,9 @@ 'usage' => 'Show step by step usage', 'server' => 'To get Server Information', 'settings' => 'Go to settings of the bot', + 'set_menu' => 'Set the menu of the bot', 'back' => 'Back', - 'discussion' => '🗨 Discussion', - 'source_code' => '💠 Source Code', + 'discussion' => 'Discussion', + 'source_code' => 'Source Code', ]; diff --git a/src/Services/CommandService.php b/src/Services/CommandService.php index 69fb414..e811649 100644 --- a/src/Services/CommandService.php +++ b/src/Services/CommandService.php @@ -23,6 +23,7 @@ public function __construct(Bot $bot) /** * @param Bot $bot + * * @return void * * @throws EntryNotFoundException @@ -108,6 +109,9 @@ public static function menuCommands(): array ], [ 'command' => '/settings', 'description' => __('tg-notifier::tools/menu.settings'), + ], [ + 'command' => '/set_menu', + 'description' => __('tg-notifier::tools/menu.set_menu'), ], ]; } diff --git a/src/Traits/Markup.php b/src/Traits/Markup.php index 0cd09d1..e7e40d0 100644 --- a/src/Traits/Markup.php +++ b/src/Traits/Markup.php @@ -15,9 +15,9 @@ public function menuMarkup(Telegram $telegram): array { return [ [ - $telegram->buildInlineKeyBoardButton(__('tg-notifier::tools/menu.discussion'), config('telegram-git-notifier.author.discussion')), + $telegram->buildInlineKeyBoardButton('🗨 '.__('tg-notifier::tools/menu.discussion'), config('telegram-git-notifier.author.discussion')), ], [ - $telegram->buildInlineKeyBoardButton(__('tg-notifier::tools/menu.source_code'), config('telegram-git-notifier.author.source_code')), + $telegram->buildInlineKeyBoardButton('💠 '.__('tg-notifier::tools/menu.source_code'), config('telegram-git-notifier.author.source_code')), ], ]; } From de1b0ef3e0b1a1f13bd51d5ad9e6fe348fc679dc Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Mon, 20 May 2024 21:42:15 +0700 Subject: [PATCH 2/2] fix: style code --- src/Services/CommandService.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Services/CommandService.php b/src/Services/CommandService.php index e811649..efaa7ae 100644 --- a/src/Services/CommandService.php +++ b/src/Services/CommandService.php @@ -23,7 +23,6 @@ public function __construct(Bot $bot) /** * @param Bot $bot - * * @return void * * @throws EntryNotFoundException