Skip to content

Commit

Permalink
fix: update to the translation for edited
Browse files Browse the repository at this point in the history
  • Loading branch information
pxthinh committed Nov 17, 2023
1 parent 133da27 commit 5c21ad8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions lang/en/events/github/issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
'title' => '⚠️ <b>Issue has been edited</b> to 🦑 :issue by :user',
'changes' => [
'title' => [
'title' => '📖 <b>Title</b> has been changed',
'from' => ' 📝 <b>From:</b> :title_from',
'to' => ' 🏷 <b>To:</b> :title_to',
'name' => '📖 <b>Title</b> has been changed',
'from' => '📝 <b>From:</b> :title_from',
'to' => '🏷 <b>To:</b> :title_to',
],
'body' => [
'title' => '📖 <b>Body</b> has been changed',
'body' => 'Please check the issue for more details',
]
]
'message' => 'Please check the issue for more details',
],
],
],
'locked' => [
'title' => '🔒 <b>Issue Locked</b> form 🦑 :issue by :user',
Expand Down
3 changes: 3 additions & 0 deletions lang/en/events/shared/github.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
'_body' => [
'title' => '📖 <b>Content:</b>',
],
'_assignee' => [
'title' => '🙋 Assignee: ',
],
];
7 changes: 3 additions & 4 deletions resources/views/events/github/issues/edited.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
{!! __('tg-notifier::events/github/issues.issue_title') !!} <b><?= $issue->title; ?></b>

@include('tg-notifier::events.shared.partials.github._assignees', compact('payload', 'event'))

@if(isset($payload->changes->title))
{!! __('tg-notifier::events/github/issues.edited.changes.title.title') !!}
{!! __('tg-notifier::events/github/issues.edited.changes.title.name') !!}
{!! __('tg-notifier::events/github/issues.edited.changes.title.from', ['title_from' => $payload->changes->title->from]) !!}
{!! __('tg-notifier::events/github/issues.edited.changes.title.to', ['title_to' => $payload->issue->title]) !!}
@elseif(isset($payload->changes->body))
{!! __('tg-notifier::events/github/issues.edited.changes.body.title')!!}
{!! __('tg-notifier::events/github/issues.edited.changes.body.body')!!}
{!! __('tg-notifier::events/github/issues.edited.changes.body.title') !!}
{!! __('tg-notifier::events/github/issues.edited.changes.body.message') !!}
@endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
if (isset($event) && isset($payload) && !empty($payload->{$event}->assignees)) {
$assigneeText = "🙋 Assignee: ";
$assigneeText = __('tg-notifier::events/shared/github._assignee.title');
$assigneeArray = [];
foreach ($payload->{$event}->assignees as $assignee) {
$assigneeArray[] = "<a href=\"{$assignee->html_url}\">@{$assignee->login}</a> ";
Expand Down

0 comments on commit 5c21ad8

Please sign in to comment.