From 4ee11a7376f0b129c2929a7a63ff8c9f0bd4dc1d Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Mon, 20 May 2024 23:11:27 +0700 Subject: [PATCH 1/8] fix: translations for tag push event --- lang/de/events/gitlab/tag_push.php | 2 +- lang/en/events/gitlab/tag_push.php | 2 +- lang/ja/events/gitlab/tag_push.php | 2 +- lang/vi/events/gitlab/tag_push.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/de/events/gitlab/tag_push.php b/lang/de/events/gitlab/tag_push.php index f070678..390291d 100644 --- a/lang/de/events/gitlab/tag_push.php +++ b/lang/de/events/gitlab/tag_push.php @@ -2,6 +2,6 @@ return [ 'title' => 'A new tag has been pushed to the project :repo', - 'name' => 'Tag Name: :tag_name', + 'name' => 'Tag Name', 'pusher' => ' Pushed by', ]; diff --git a/lang/en/events/gitlab/tag_push.php b/lang/en/events/gitlab/tag_push.php index f070678..390291d 100644 --- a/lang/en/events/gitlab/tag_push.php +++ b/lang/en/events/gitlab/tag_push.php @@ -2,6 +2,6 @@ return [ 'title' => 'A new tag has been pushed to the project :repo', - 'name' => 'Tag Name: :tag_name', + 'name' => 'Tag Name', 'pusher' => ' Pushed by', ]; diff --git a/lang/ja/events/gitlab/tag_push.php b/lang/ja/events/gitlab/tag_push.php index f070678..390291d 100644 --- a/lang/ja/events/gitlab/tag_push.php +++ b/lang/ja/events/gitlab/tag_push.php @@ -2,6 +2,6 @@ return [ 'title' => 'A new tag has been pushed to the project :repo', - 'name' => 'Tag Name: :tag_name', + 'name' => 'Tag Name', 'pusher' => ' Pushed by', ]; diff --git a/lang/vi/events/gitlab/tag_push.php b/lang/vi/events/gitlab/tag_push.php index f070678..390291d 100644 --- a/lang/vi/events/gitlab/tag_push.php +++ b/lang/vi/events/gitlab/tag_push.php @@ -2,6 +2,6 @@ return [ 'title' => 'A new tag has been pushed to the project :repo', - 'name' => 'Tag Name: :tag_name', + 'name' => 'Tag Name', 'pusher' => ' Pushed by', ]; From f1b6096b5295dfe571209e67a113c6950ed35e4c Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Mon, 20 May 2024 23:56:30 +0700 Subject: [PATCH 2/8] fix: update push event --- lang/de/events/gitlab/push.php | 2 +- lang/en/events/gitlab/push.php | 2 +- lang/ja/events/gitlab/push.php | 2 +- lang/vi/events/gitlab/push.php | 2 +- resources/views/events/gitlab/push/default.blade.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/de/events/gitlab/push.php b/lang/de/events/gitlab/push.php index 77935fe..9e512a5 100644 --- a/lang/de/events/gitlab/push.php +++ b/lang/de/events/gitlab/push.php @@ -2,7 +2,7 @@ return [ 'default' => [ - 'title' => ':count new :noun to :repo::branch', + 'title' => ':count new :noun to :repo::branch', 'commit' => '[:commit] :commit_message - by :commit_by', 'pusher' => '👤 Pushed by : :name', ], diff --git a/lang/en/events/gitlab/push.php b/lang/en/events/gitlab/push.php index 77935fe..9e512a5 100644 --- a/lang/en/events/gitlab/push.php +++ b/lang/en/events/gitlab/push.php @@ -2,7 +2,7 @@ return [ 'default' => [ - 'title' => ':count new :noun to :repo::branch', + 'title' => ':count new :noun to :repo::branch', 'commit' => '[:commit] :commit_message - by :commit_by', 'pusher' => '👤 Pushed by : :name', ], diff --git a/lang/ja/events/gitlab/push.php b/lang/ja/events/gitlab/push.php index 77935fe..9e512a5 100644 --- a/lang/ja/events/gitlab/push.php +++ b/lang/ja/events/gitlab/push.php @@ -2,7 +2,7 @@ return [ 'default' => [ - 'title' => ':count new :noun to :repo::branch', + 'title' => ':count new :noun to :repo::branch', 'commit' => '[:commit] :commit_message - by :commit_by', 'pusher' => '👤 Pushed by : :name', ], diff --git a/lang/vi/events/gitlab/push.php b/lang/vi/events/gitlab/push.php index 9b29cff..8ebfd2b 100644 --- a/lang/vi/events/gitlab/push.php +++ b/lang/vi/events/gitlab/push.php @@ -2,7 +2,7 @@ return [ 'default' => [ - 'title' => ':count mới :noun đến :repo::branch', + 'title' => ':count :noun mới trong :repo::branch', 'commit' => '[:commit] :commit_message - bởi :commit_by', 'pusher' => '👤 Đẩy lên bởi: : :name', ], diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index b5c2b4d..c43b4f6 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -13,7 +13,7 @@ 👷⚙️ {!! __('tg-notifier::events/gitlab/push.default.title', [ 'count' => $count, 'noun' => $noun, - 'repo' => "🦑" . $payload->project->path_with_namespace, + 'repo' => "🦑{$payload->project->path_with_namespace}", 'branch' => $branch, ]) !!} From 6a22e26be8bb5c8f90c4b1e7c4c6327209ec97fa Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 00:23:54 +0700 Subject: [PATCH 3/8] fix: update push event - for create new branch --- lang/de/events/gitlab/push.php | 9 ++++---- lang/en/events/gitlab/push.php | 9 ++++---- lang/ja/events/gitlab/push.php | 9 ++++---- lang/vi/app.php | 8 +++---- lang/vi/events/gitlab/push.php | 9 ++++---- .../events/gitlab/push/default.blade.php | 21 ++++++++++++++----- 6 files changed, 36 insertions(+), 29 deletions(-) diff --git a/lang/de/events/gitlab/push.php b/lang/de/events/gitlab/push.php index 9e512a5..9f66220 100644 --- a/lang/de/events/gitlab/push.php +++ b/lang/de/events/gitlab/push.php @@ -1,9 +1,8 @@ [ - 'title' => ':count new :noun to :repo::branch', - 'commit' => '[:commit] :commit_message - by :commit_by', - 'pusher' => '👤 Pushed by : :name', - ], + 'title' => ':count new :noun to :repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'Pushed by : :name', + 'new_branch_title' => 'A new branch has been pushed to the project :repo', ]; diff --git a/lang/en/events/gitlab/push.php b/lang/en/events/gitlab/push.php index 9e512a5..9f66220 100644 --- a/lang/en/events/gitlab/push.php +++ b/lang/en/events/gitlab/push.php @@ -1,9 +1,8 @@ [ - 'title' => ':count new :noun to :repo::branch', - 'commit' => '[:commit] :commit_message - by :commit_by', - 'pusher' => '👤 Pushed by : :name', - ], + 'title' => ':count new :noun to :repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'Pushed by : :name', + 'new_branch_title' => 'A new branch has been pushed to the project :repo', ]; diff --git a/lang/ja/events/gitlab/push.php b/lang/ja/events/gitlab/push.php index 9e512a5..9f66220 100644 --- a/lang/ja/events/gitlab/push.php +++ b/lang/ja/events/gitlab/push.php @@ -1,9 +1,8 @@ [ - 'title' => ':count new :noun to :repo::branch', - 'commit' => '[:commit] :commit_message - by :commit_by', - 'pusher' => '👤 Pushed by : :name', - ], + 'title' => ':count new :noun to :repo::branch', + 'commit' => '[:commit] :commit_message - by :commit_by', + 'pusher' => 'Pushed by : :name', + 'new_branch_title' => 'A new branch has been pushed to the project :repo', ]; diff --git a/lang/vi/app.php b/lang/vi/app.php index cb3d035..48559dc 100644 --- a/lang/vi/app.php +++ b/lang/vi/app.php @@ -1,8 +1,8 @@ 'by', - 'unknown_callback' => 'Unknown Callback. Something went wrong!', - 'invalid_request' => 'Invalid Request!', - 'branch' => 'Branch', + 'by' => 'bởi', + 'unknown_callback' => 'Không rõ Callback. Đã xảy ra lỗi!', + 'invalid_request' => 'Yêu cầu không hợp lệ!', + 'branch' => 'Tên nhánh', ]; diff --git a/lang/vi/events/gitlab/push.php b/lang/vi/events/gitlab/push.php index 8ebfd2b..6cffcdc 100644 --- a/lang/vi/events/gitlab/push.php +++ b/lang/vi/events/gitlab/push.php @@ -1,9 +1,8 @@ [ - 'title' => ':count :noun mới trong :repo::branch', - 'commit' => '[:commit] :commit_message - bởi :commit_by', - 'pusher' => '👤 Đẩy lên bởi: : :name', - ], + 'title' => ':count :noun mới trong :repo::branch', + 'commit' => '[:commit] :commit_message - bởi :commit_by', + 'pusher' => 'Đẩy lên bởi: : :name', + 'new_branch_title' => 'Một nhánh mới đã được tạo trong dự án :repo', ]; diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index c43b4f6..9298c2b 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -8,24 +8,35 @@ $ref = explode('/', $payload->ref); $branch = implode('/', array_slice($ref, 2)); +$repo = "🦊{$payload->project->path_with_namespace}"; ?> - -👷⚙️ {!! __('tg-notifier::events/gitlab/push.default.title', [ +@if(empty($payload->commits)) {{-- New branch created --}} +🎊 {!! __('tg-notifier::events/gitlab/push.new_branch_title', [ + 'repo' => $repo, +]) !!} +@else +👷⚙️ {!! __('tg-notifier::events/gitlab/push.title', [ 'count' => $count, 'noun' => $noun, - 'repo' => "🦑{$payload->project->path_with_namespace}", + 'repo' => $repo, 'branch' => $branch, ]) !!} @foreach($payload->commits as $commit) @php $commitId = substr($commit->id, -7); + + $commit->message = $commit->message ?? ''; + $commit->message = explode("\n", $commit->message)[0]; @endphp -{!! __('tg-notifier::events/gitlab/push.default.commit', [ +{!! __('tg-notifier::events/gitlab/push.commit', [ 'commit' => "$commitId", 'commit_message' => $commit->message, 'commit_by' => $commit->author->name, ]) !!} + @endforeach +@endif -{!! __('tg-notifier::events/gitlab/push.default.pusher', ['name' => $payload->user_name]) !!} +🌲 {{ __('tg-notifier::app.branch') }}: {{ $branch }} +👤 {!! __('tg-notifier::events/gitlab/push.pusher', ['name' => $payload->user_name]) !!} From b469e8b538a85dcfdc4ebfc6e17bba20af953ce0 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 19:22:58 +0700 Subject: [PATCH 4/8] fix: update push and note translations --- lang/de/app.php | 1 + lang/en/app.php | 1 + lang/ja/app.php | 1 + lang/vi/app.php | 1 + resources/views/events/gitlab/note/commit.blade.php | 6 ++---- resources/views/events/gitlab/push/default.blade.php | 1 - 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lang/de/app.php b/lang/de/app.php index cb3d035..4964571 100644 --- a/lang/de/app.php +++ b/lang/de/app.php @@ -5,4 +5,5 @@ 'unknown_callback' => 'Unknown Callback. Something went wrong!', 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', + 'commit' => 'Commit', ]; diff --git a/lang/en/app.php b/lang/en/app.php index cb3d035..4964571 100644 --- a/lang/en/app.php +++ b/lang/en/app.php @@ -5,4 +5,5 @@ 'unknown_callback' => 'Unknown Callback. Something went wrong!', 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', + 'commit' => 'Commit', ]; diff --git a/lang/ja/app.php b/lang/ja/app.php index cb3d035..4964571 100644 --- a/lang/ja/app.php +++ b/lang/ja/app.php @@ -5,4 +5,5 @@ 'unknown_callback' => 'Unknown Callback. Something went wrong!', 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', + 'commit' => 'Commit', ]; diff --git a/lang/vi/app.php b/lang/vi/app.php index 48559dc..0e34f4f 100644 --- a/lang/vi/app.php +++ b/lang/vi/app.php @@ -5,4 +5,5 @@ 'unknown_callback' => 'Không rõ Callback. Đã xảy ra lỗi!', 'invalid_request' => 'Yêu cầu không hợp lệ!', 'branch' => 'Tên nhánh', + 'commit' => 'Commit', ]; diff --git a/resources/views/events/gitlab/note/commit.blade.php b/resources/views/events/gitlab/note/commit.blade.php index 61ca633..37dfbc9 100644 --- a/resources/views/events/gitlab/note/commit.blade.php +++ b/resources/views/events/gitlab/note/commit.blade.php @@ -7,15 +7,13 @@ ?> 💬 {!! __('tg-notifier::events/gitlab/note.title.commit', [ 'repo' => "🦊{$payload->project->path_with_namespace}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ] ) !!} -⚙️ {{ $payload->commit->message }} - +⚙️ {{ __('tg-notifier::app.commit') }}: {{ $payload->commit->message }} 🔗 {!! __('tg-notifier::events/gitlab/note.view_comment', [ 'link' => "{$payload->commit->id}" ] ) !!} - @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/push/default.blade.php b/resources/views/events/gitlab/push/default.blade.php index 9298c2b..822740c 100644 --- a/resources/views/events/gitlab/push/default.blade.php +++ b/resources/views/events/gitlab/push/default.blade.php @@ -34,7 +34,6 @@ 'commit_message' => $commit->message, 'commit_by' => $commit->author->name, ]) !!} - @endforeach @endif From f3c4938a78fa318e078a836c1d71855b32b210d8 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 19:29:57 +0700 Subject: [PATCH 5/8] fix: update gitlab note translations --- lang/de/app.php | 1 + lang/en/app.php | 1 + lang/ja/app.php | 1 + lang/vi/app.php | 1 + lang/vi/events/gitlab/issues.php | 6 +++--- lang/vi/events/gitlab/note.php | 2 +- resources/views/events/gitlab/note/issue.blade.php | 3 +-- resources/views/events/gitlab/note/merge_request.blade.php | 5 ++--- resources/views/events/gitlab/note/snippet.blade.php | 4 +--- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lang/de/app.php b/lang/de/app.php index 4964571..bdbfe1f 100644 --- a/lang/de/app.php +++ b/lang/de/app.php @@ -6,4 +6,5 @@ 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', 'commit' => 'Commit', + 'title' => 'Title', ]; diff --git a/lang/en/app.php b/lang/en/app.php index 4964571..bdbfe1f 100644 --- a/lang/en/app.php +++ b/lang/en/app.php @@ -6,4 +6,5 @@ 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', 'commit' => 'Commit', + 'title' => 'Title', ]; diff --git a/lang/ja/app.php b/lang/ja/app.php index 4964571..bdbfe1f 100644 --- a/lang/ja/app.php +++ b/lang/ja/app.php @@ -6,4 +6,5 @@ 'invalid_request' => 'Invalid Request!', 'branch' => 'Branch', 'commit' => 'Commit', + 'title' => 'Title', ]; diff --git a/lang/vi/app.php b/lang/vi/app.php index 0e34f4f..3307d01 100644 --- a/lang/vi/app.php +++ b/lang/vi/app.php @@ -6,4 +6,5 @@ 'invalid_request' => 'Yêu cầu không hợp lệ!', 'branch' => 'Tên nhánh', 'commit' => 'Commit', + 'title' => 'Tiêu đề', ]; diff --git a/lang/vi/events/gitlab/issues.php b/lang/vi/events/gitlab/issues.php index 0689355..9cc024a 100644 --- a/lang/vi/events/gitlab/issues.php +++ b/lang/vi/events/gitlab/issues.php @@ -3,10 +3,10 @@ return [ 'issue_title' => '📢', 'closed' => [ - 'title' => 'Vấn đề đã đóng từ :issue bởi :user', + 'title' => 'Vấn đề đã đóng trong :issue bởi :user', ], 'edited' => [ - 'title' => 'Vấn đề đã được chỉnh sửa từ :issue bởi :user', + 'title' => 'Vấn đề đã được chỉnh sửa trong :issue bởi :user', 'changes' => [ 'title' => [ 'name' => 'Tiêu đề đã được thay đổi', @@ -20,7 +20,7 @@ ], ], 'opened' => [ - 'title' => 'Vấn đề mới tới :issue bởi :user', + 'title' => 'Vấn đề mới trong :issue bởi :user', ], 'reopened' => [ 'title' => 'Vấn đề đã được mở lại :issue bởi :user', diff --git a/lang/vi/events/gitlab/note.php b/lang/vi/events/gitlab/note.php index 8d48620..12620fa 100644 --- a/lang/vi/events/gitlab/note.php +++ b/lang/vi/events/gitlab/note.php @@ -5,7 +5,7 @@ 'commit' => 'Bình luận mới về Cam kết - :repo bởi :user', 'issue' => 'Bình luận mới về vấn đề - :repo bởi :user', 'merge_request' => 'Bình luận mới về yêu cầu hợp nhất - :repo bởi :user', - 'snippet' => 'Bình luận mới về Đoạn trích - :repo bởi :user', + 'snippet' => 'Bình luận mới về đoạn trích - :repo bởi :user', ], 'view_comment' => 'Xem bình luận: :link', 'snippet_comment' => 'Xem bình luận về đoạn trích', diff --git a/resources/views/events/gitlab/note/issue.blade.php b/resources/views/events/gitlab/note/issue.blade.php index 85e4847..19775da 100644 --- a/resources/views/events/gitlab/note/issue.blade.php +++ b/resources/views/events/gitlab/note/issue.blade.php @@ -11,6 +11,5 @@ ] ) !!} -📢 {{ $payload->issue->title }} - +📢 {{ $payload->issue->title }} @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/note/merge_request.blade.php b/resources/views/events/gitlab/note/merge_request.blade.php index cfeccfc..2f20866 100644 --- a/resources/views/events/gitlab/note/merge_request.blade.php +++ b/resources/views/events/gitlab/note/merge_request.blade.php @@ -11,7 +11,6 @@ ] ) !!} -🛠 {{ $payload->merge_request->title }} -🌳 {{ $payload->merge_request->source_branch }} -> {{ $payload->merge_request->target_branch }} 🎯 - +🛠 {{ $payload->merge_request->title }} +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->merge_request->source_branch }} -> {{ $payload->merge_request->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/note/snippet.blade.php b/resources/views/events/gitlab/note/snippet.blade.php index acd1c91..f2ec2f2 100644 --- a/resources/views/events/gitlab/note/snippet.blade.php +++ b/resources/views/events/gitlab/note/snippet.blade.php @@ -11,8 +11,6 @@ ] ) !!} -📝 {{ $payload->snippet->title }} - +📝 {{ __('tg-notifier::app.title') }}: {{ $payload->snippet->title }} 🔗 {{ __('tg-notifier::events/gitlab/note.snippet_comment') }} - @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) From 26e8699d061beaf53632180d7ea3d6857f4ba5c1 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 19:39:07 +0700 Subject: [PATCH 6/8] fix: update gitlab issue view templates --- resources/views/events/gitlab/issue/close.blade.php | 3 +-- resources/views/events/gitlab/issue/open.blade.php | 3 +-- resources/views/events/gitlab/issue/reopen.blade.php | 3 +-- resources/views/events/gitlab/issue/update.blade.php | 4 +--- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/resources/views/events/gitlab/issue/close.blade.php b/resources/views/events/gitlab/issue/close.blade.php index 71dfca8..fedd216 100644 --- a/resources/views/events/gitlab/issue/close.blade.php +++ b/resources/views/events/gitlab/issue/close.blade.php @@ -11,7 +11,6 @@ ] ) !!} -📢 {{ $payload->object_attributes->title }} - +📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }} @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/issue/open.blade.php b/resources/views/events/gitlab/issue/open.blade.php index f14c570..b7d7374 100644 --- a/resources/views/events/gitlab/issue/open.blade.php +++ b/resources/views/events/gitlab/issue/open.blade.php @@ -11,7 +11,6 @@ ] ) !!} -📢 {{ $payload->object_attributes->title }} - +📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }} @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/issue/reopen.blade.php b/resources/views/events/gitlab/issue/reopen.blade.php index 8264865..5af5c5c 100644 --- a/resources/views/events/gitlab/issue/reopen.blade.php +++ b/resources/views/events/gitlab/issue/reopen.blade.php @@ -11,7 +11,6 @@ ] ) !!} -📢 {{ $payload->object_attributes->title }} - +📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }} @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/issue/update.blade.php b/resources/views/events/gitlab/issue/update.blade.php index 30a87c7..89852d3 100644 --- a/resources/views/events/gitlab/issue/update.blade.php +++ b/resources/views/events/gitlab/issue/update.blade.php @@ -11,10 +11,8 @@ ] ) !!} -📢 {{ $payload->object_attributes->title }} - +📢 {{ __('tg-notifier::app.title') }}: {{ $payload->object_attributes->title }} @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) - @if(isset($payload->changes->title)) 📖 {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.name') !!} 📝 {!! __('tg-notifier::events/gitlab/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->previous]) !!} From ae32ad99dd9df643b58a37a8a423070ac1f6e5c3 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 19:50:55 +0700 Subject: [PATCH 7/8] fix: update translations for tool --- lang/de/tools/start.php | 2 +- lang/en/tools/start.php | 2 +- lang/ja/tools/start.php | 2 +- lang/vi/tools/start.php | 2 +- resources/views/tools/start.blade.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/de/tools/start.php b/lang/de/tools/start.php index e563178..9804474 100644 --- a/lang/de/tools/start.php +++ b/lang/de/tools/start.php @@ -1,7 +1,7 @@ '🙋🏻 :appName 🤓', + 'title' => ':appName', 'firstName' => 'Hey :firstName,', 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram. Use /menu for more options.', diff --git a/lang/en/tools/start.php b/lang/en/tools/start.php index e563178..9804474 100644 --- a/lang/en/tools/start.php +++ b/lang/en/tools/start.php @@ -1,7 +1,7 @@ '🙋🏻 :appName 🤓', + 'title' => ':appName', 'firstName' => 'Hey :firstName,', 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram. Use /menu for more options.', diff --git a/lang/ja/tools/start.php b/lang/ja/tools/start.php index e563178..9804474 100644 --- a/lang/ja/tools/start.php +++ b/lang/ja/tools/start.php @@ -1,7 +1,7 @@ '🙋🏻 :appName 🤓', + 'title' => ':appName', 'firstName' => 'Hey :firstName,', 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram. Use /menu for more options.', diff --git a/lang/vi/tools/start.php b/lang/vi/tools/start.php index e563178..9804474 100644 --- a/lang/vi/tools/start.php +++ b/lang/vi/tools/start.php @@ -1,7 +1,7 @@ '🙋🏻 :appName 🤓', + 'title' => ':appName', 'firstName' => 'Hey :firstName,', 'notification' => 'I can send you notifications from your 🦑GitHub or 🦊GitLab Repository instantly to your Telegram. Use /menu for more options.', diff --git a/resources/views/tools/start.blade.php b/resources/views/tools/start.blade.php index c533357..c77478f 100644 --- a/resources/views/tools/start.blade.php +++ b/resources/views/tools/start.blade.php @@ -4,7 +4,7 @@ */ ?> -{!! __('tg-notifier::tools/start.title', ['appName' => config('telegram-git-notifier.app.name')]) !!} +🙋🏻 {!! __('tg-notifier::tools/start.title', ['appName' => config('telegram-git-notifier.app.name')]) !!} 🤓 {!! __('tg-notifier::tools/start.firstName', ['firstName' => $first_name]) !!} From 155a2f4fdbd1934b7ce2bfc54eb18b89ebb80611 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Tue, 21 May 2024 20:01:55 +0700 Subject: [PATCH 8/8] fix: update gitlab merge request view templates --- .../views/events/gitlab/merge_request/approval.blade.php | 4 ++-- .../views/events/gitlab/merge_request/approved.blade.php | 4 ++-- resources/views/events/gitlab/merge_request/close.blade.php | 2 +- resources/views/events/gitlab/merge_request/merge.blade.php | 2 +- resources/views/events/gitlab/merge_request/open.blade.php | 2 +- resources/views/events/gitlab/merge_request/reopen.blade.php | 2 +- .../views/events/gitlab/merge_request/unapproval.blade.php | 2 +- .../views/events/gitlab/merge_request/unapproved.blade.php | 2 +- resources/views/events/gitlab/merge_request/update.blade.php | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/views/events/gitlab/merge_request/approval.blade.php b/resources/views/events/gitlab/merge_request/approval.blade.php index ffcff65..f49983e 100644 --- a/resources/views/events/gitlab/merge_request/approval.blade.php +++ b/resources/views/events/gitlab/merge_request/approval.blade.php @@ -7,12 +7,12 @@ ?> 👍 {!! __('tg-notifier::events/gitlab/merge_request.approval.title', [ 'repo' => "✅ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ]) !!} 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/approved.blade.php b/resources/views/events/gitlab/merge_request/approved.blade.php index 4eef6d7..b3e1eb0 100644 --- a/resources/views/events/gitlab/merge_request/approved.blade.php +++ b/resources/views/events/gitlab/merge_request/approved.blade.php @@ -7,12 +7,12 @@ ?> 👍 {!! __('tg-notifier::events/gitlab/merge_request.approved.title', [ 'repo' => "✅ - 🦊{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}", - 'user' => "{$payload->user->name}" + 'user' => "{$payload->user->name}" ]) !!} 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/close.blade.php b/resources/views/events/gitlab/merge_request/close.blade.php index 3bc8ce9..d42814e 100644 --- a/resources/views/events/gitlab/merge_request/close.blade.php +++ b/resources/views/events/gitlab/merge_request/close.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/merge.blade.php b/resources/views/events/gitlab/merge_request/merge.blade.php index 8e5978c..0380d43 100644 --- a/resources/views/events/gitlab/merge_request/merge.blade.php +++ b/resources/views/events/gitlab/merge_request/merge.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/open.blade.php b/resources/views/events/gitlab/merge_request/open.blade.php index 015b736..71fb930 100644 --- a/resources/views/events/gitlab/merge_request/open.blade.php +++ b/resources/views/events/gitlab/merge_request/open.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/reopen.blade.php b/resources/views/events/gitlab/merge_request/reopen.blade.php index c0cefed..a1ad540 100644 --- a/resources/views/events/gitlab/merge_request/reopen.blade.php +++ b/resources/views/events/gitlab/merge_request/reopen.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/unapproval.blade.php b/resources/views/events/gitlab/merge_request/unapproval.blade.php index 66f07c0..d44ded1 100644 --- a/resources/views/events/gitlab/merge_request/unapproval.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproval.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/unapproved.blade.php b/resources/views/events/gitlab/merge_request/unapproved.blade.php index bd5b641..6414df5 100644 --- a/resources/views/events/gitlab/merge_request/unapproved.blade.php +++ b/resources/views/events/gitlab/merge_request/unapproved.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event')) diff --git a/resources/views/events/gitlab/merge_request/update.blade.php b/resources/views/events/gitlab/merge_request/update.blade.php index 473a78d..d736703 100644 --- a/resources/views/events/gitlab/merge_request/update.blade.php +++ b/resources/views/events/gitlab/merge_request/update.blade.php @@ -12,7 +12,7 @@ 🛠 {{ $payload->object_attributes->title }} -🌳 {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 +🌳 {{ __('tg-notifier::app.branch') }}: {{ $payload->object_attributes->source_branch }} -> {{ $payload->object_attributes->target_branch }} 🎯 @include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event')) @include('tg-notifier::events.gitlab.merge_request.partials._reviewers', compact('payload')) @include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))