Skip to content

Commit

Permalink
Merge pull request #80 from tanhongit/update-event-template
Browse files Browse the repository at this point in the history
Update gitlab and tool template and translations
  • Loading branch information
tanhongit authored May 21, 2024
2 parents 83980a1 + 155a2f4 commit a067dac
Show file tree
Hide file tree
Showing 37 changed files with 78 additions and 75 deletions.
2 changes: 2 additions & 0 deletions lang/de/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
'unknown_callback' => 'Unknown Callback. Something went wrong!',
'invalid_request' => 'Invalid Request!',
'branch' => 'Branch',
'commit' => 'Commit',
'title' => 'Title',
];
9 changes: 4 additions & 5 deletions lang/de/events/gitlab/push.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

return [
'default' => [
'title' => '<b>:count</b> new :noun to :repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => '👤 Pushed by : <b>:name</b>',
],
'title' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => 'Pushed by : <b>:name</b>',
'new_branch_title' => '<b>A new branch has been pushed to the project</b> :repo',
];
2 changes: 1 addition & 1 deletion lang/de/events/gitlab/tag_push.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [
'title' => '<b>A new tag has been pushed to the project</b> :repo',
'name' => '<b>Tag Name</b>: :tag_name',
'name' => 'Tag Name',
'pusher' => ' Pushed by',
];
2 changes: 1 addition & 1 deletion lang/de/tools/start.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'title' => '<b>🙋🏻 :appName 🤓</b>',
'title' => '<b>:appName</b>',
'firstName' => 'Hey <b>:firstName</b>,',
'notification' => 'I can send you notifications from your 🦑<b>GitHub</b> or 🦊<b>GitLab</b> Repository instantly to your Telegram.
Use /menu for more options.',
Expand Down
2 changes: 2 additions & 0 deletions lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
'unknown_callback' => 'Unknown Callback. Something went wrong!',
'invalid_request' => 'Invalid Request!',
'branch' => 'Branch',
'commit' => 'Commit',
'title' => 'Title',
];
9 changes: 4 additions & 5 deletions lang/en/events/gitlab/push.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

return [
'default' => [
'title' => '<b>:count</b> new :noun to :repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => '👤 Pushed by : <b>:name</b>',
],
'title' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => 'Pushed by : <b>:name</b>',
'new_branch_title' => '<b>A new branch has been pushed to the project</b> :repo',
];
2 changes: 1 addition & 1 deletion lang/en/events/gitlab/tag_push.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [
'title' => '<b>A new tag has been pushed to the project</b> :repo',
'name' => '<b>Tag Name</b>: :tag_name',
'name' => 'Tag Name',
'pusher' => ' Pushed by',
];
2 changes: 1 addition & 1 deletion lang/en/tools/start.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'title' => '<b>🙋🏻 :appName 🤓</b>',
'title' => '<b>:appName</b>',
'firstName' => 'Hey <b>:firstName</b>,',
'notification' => 'I can send you notifications from your 🦑<b>GitHub</b> or 🦊<b>GitLab</b> Repository instantly to your Telegram.
Use /menu for more options.',
Expand Down
2 changes: 2 additions & 0 deletions lang/ja/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
'unknown_callback' => 'Unknown Callback. Something went wrong!',
'invalid_request' => 'Invalid Request!',
'branch' => 'Branch',
'commit' => 'Commit',
'title' => 'Title',
];
9 changes: 4 additions & 5 deletions lang/ja/events/gitlab/push.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

return [
'default' => [
'title' => '<b>:count</b> new :noun to :repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => '👤 Pushed by : <b>:name</b>',
],
'title' => '<b>:count</b> new :noun to <b>:repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - by <i>:commit_by</i>',
'pusher' => 'Pushed by : <b>:name</b>',
'new_branch_title' => '<b>A new branch has been pushed to the project</b> :repo',
];
2 changes: 1 addition & 1 deletion lang/ja/events/gitlab/tag_push.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [
'title' => '<b>A new tag has been pushed to the project</b> :repo',
'name' => '<b>Tag Name</b>: :tag_name',
'name' => 'Tag Name',
'pusher' => ' Pushed by',
];
2 changes: 1 addition & 1 deletion lang/ja/tools/start.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'title' => '<b>🙋🏻 :appName 🤓</b>',
'title' => '<b>:appName</b>',
'firstName' => 'Hey <b>:firstName</b>,',
'notification' => 'I can send you notifications from your 🦑<b>GitHub</b> or 🦊<b>GitLab</b> Repository instantly to your Telegram.
Use /menu for more options.',
Expand Down
10 changes: 6 additions & 4 deletions lang/vi/app.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

return [
'by' => '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',
'commit' => 'Commit',
'title' => 'Tiêu đề',
];
6 changes: 3 additions & 3 deletions lang/vi/events/gitlab/issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
return [
'issue_title' => '📢',
'closed' => [
'title' => '<b>Vấn đề đã đóng </b> từ :issue bởi :user',
'title' => '<b>Vấn đề đã đóng </b> trong :issue bởi :user',
],
'edited' => [
'title' => '<b>Vấn đề đã được chỉnh sửa</b> từ :issue bởi :user',
'title' => '<b>Vấn đề đã được chỉnh sửa</b> trong :issue bởi :user',
'changes' => [
'title' => [
'name' => '<b>Tiêu đề</b> đã được thay đổi',
Expand All @@ -20,7 +20,7 @@
],
],
'opened' => [
'title' => '<b>Vấn đề mới</b> tới :issue bởi :user',
'title' => '<b>Vấn đề mới</b> trong :issue bởi :user',
],
'reopened' => [
'title' => '<b>Vấn đề đã được mở lại</b> :issue bởi :user',
Expand Down
2 changes: 1 addition & 1 deletion lang/vi/events/gitlab/note.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'commit' => '<b>Bình luận mới về Cam kết</b> - :repo bởi :user',
'issue' => '<b>Bình luận mới về vấn đề</b> - :repo bởi :user',
'merge_request' => '<b>Bình luận mới về yêu cầu hợp nhất</b> - :repo bởi :user',
'snippet' => '<b>Bình luận mới về Đoạn trích</b> - :repo bởi :user',
'snippet' => '<b>Bình luận mới về đoạn trích</b> - :repo bởi :user',
],
'view_comment' => 'Xem bình luận: :link',
'snippet_comment' => 'Xem bình luận về đoạn trích',
Expand Down
9 changes: 4 additions & 5 deletions lang/vi/events/gitlab/push.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

return [
'default' => [
'title' => '<b>:count</b> mới :noun đến :repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - bởi <i>:commit_by</i>',
'pusher' => '👤 Đẩy lên bởi: : <b>:name</b>',
],
'title' => '<b>:count</b> :noun mới trong <b>:repo:<code>:branch</code></b>',
'commit' => '[:commit] :commit_message - bởi <i>:commit_by</i>',
'pusher' => 'Đẩy lên bởi: : <b>:name</b>',
'new_branch_title' => '<b>Một nhánh mới đã được tạo trong dự án</b> :repo',
];
4 changes: 2 additions & 2 deletions lang/vi/events/gitlab/tag_push.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [
'title' => '<b>Một thẻ mới đã được đẩy vào dự án</b> :repo',
'name' => '<b>Tên thẻ</b>: :tag_name',
'pusher' => 'Được đẩy bởi:',
'name' => 'Tên thẻ',
'pusher' => 'Được đẩy bởi',
];
2 changes: 1 addition & 1 deletion lang/vi/tools/start.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'title' => '<b>🙋🏻 :appName 🤓</b>',
'title' => '<b>:appName</b>',
'firstName' => 'Hey <b>:firstName</b>,',
'notification' => 'I can send you notifications from your 🦑<b>GitHub</b> or 🦊<b>GitLab</b> Repository instantly to your Telegram.
Use /menu for more options.',
Expand Down
3 changes: 1 addition & 2 deletions resources/views/events/gitlab/issue/close.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
]
) !!}

📢 <b>{{ $payload->object_attributes->title }}</b>

📢 {{ __('tg-notifier::app.title') }}: <code>{{ $payload->object_attributes->title }}</code>
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
3 changes: 1 addition & 2 deletions resources/views/events/gitlab/issue/open.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
]
) !!}

📢 <b>{{ $payload->object_attributes->title }}</b>

📢 {{ __('tg-notifier::app.title') }}: <code>{{ $payload->object_attributes->title }}</code>
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
3 changes: 1 addition & 2 deletions resources/views/events/gitlab/issue/reopen.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
]
) !!}

📢 <b>{{ $payload->object_attributes->title }}</b>

📢 {{ __('tg-notifier::app.title') }}: <code>{{ $payload->object_attributes->title }}</code>
@include('tg-notifier::events.shared.partials.gitlab._assignees', compact('payload', 'event'))
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
4 changes: 1 addition & 3 deletions resources/views/events/gitlab/issue/update.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
]
) !!}

📢 <b>{{ $payload->object_attributes->title }}</b>

📢 {{ __('tg-notifier::app.title') }}: <code>{{ $payload->object_attributes->title }}</code>
@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]) !!}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
?>
👍 {!! __('tg-notifier::events/gitlab/merge_request.approval.title', [
'repo' => "✅ - 🦊<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>",
'user' => "<b>{$payload->user->name}</b>"
'user' => "<code>{$payload->user->name}</code>"
]) !!}

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
?>
👍 {!! __('tg-notifier::events/gitlab/merge_request.approved.title', [
'repo' => "✅ - 🦊<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}#{$payload->object_attributes->iid}</a>",
'user' => "<b>{$payload->user->name}</b>"
'user' => "<code>{$payload->user->name}</code>"
]) !!}

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
2 changes: 1 addition & 1 deletion resources/views/events/gitlab/merge_request/open.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

🛠 <b>{{ $payload->object_attributes->title }}</b>

🌳 {{ $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'))
6 changes: 2 additions & 4 deletions resources/views/events/gitlab/note/commit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
?>
💬 {!! __('tg-notifier::events/gitlab/note.title.commit', [
'repo' => "🦊<a href='{$payload->object_attributes->url}'>{$payload->project->path_with_namespace}</a>",
'user' => "<b>{$payload->user->name}</b>"
'user' => "<code>{$payload->user->name}</code>"
]
) !!}

⚙️ <b>{{ $payload->commit->message }}</b>

⚙️ {{ __('tg-notifier::app.commit') }}: <code>{{ $payload->commit->message }}</code>
🔗 {!! __('tg-notifier::events/gitlab/note.view_comment', [
'link' => "<a href='{$payload->object_attributes->url}'>{$payload->commit->id}</a>"
]
) !!}

@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
3 changes: 1 addition & 2 deletions resources/views/events/gitlab/note/issue.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
]
) !!}

📢 <b>{{ $payload->issue->title }}</b>

📢 <code>{{ $payload->issue->title }}</code>
@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
5 changes: 2 additions & 3 deletions resources/views/events/gitlab/note/merge_request.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
]
) !!}

🛠 <b>{{ $payload->merge_request->title }}</b>
🌳 {{ $payload->merge_request->source_branch }} -> {{ $payload->merge_request->target_branch }} 🎯

🛠 <code>{{ $payload->merge_request->title }}</code>
🌳 {{ __('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'))
4 changes: 1 addition & 3 deletions resources/views/events/gitlab/note/snippet.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
]
) !!}

📝 <b>{{ $payload->snippet->title }}</b>

📝 {{ __('tg-notifier::app.title') }}: <code>{{ $payload->snippet->title }}</code>
🔗 <a href="{{ $payload->object_attributes->url }}">{{ __('tg-notifier::events/gitlab/note.snippet_comment') }}</a>

@include('tg-notifier::events.shared.partials.gitlab._body', compact('payload', 'event'))
Loading

0 comments on commit a067dac

Please sign in to comment.