Skip to content

Commit 7ca3732

Browse files
authored
Merge pull request #59 from silviugd/main
Added translatable support for subscriptions and Romanian translations
2 parents 608eb3c + f1f3369 commit 7ca3732

File tree

3 files changed

+42
-7
lines changed

3 files changed

+42
-7
lines changed

resources/lang/en/comments.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818
'save' => 'Save',
1919
'comment' => 'Comment',
2020
'add_reaction' => 'Add Reaction',
21+
22+
'notifications' => 'Notifications',
23+
'unsubscribe' => 'Unsubscribe',
24+
'subscribe' => 'Subscribe',
25+
'subscribers' => 'Subscribers',
26+
'more' => 'more',
2127
];

resources/lang/ro/comments.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
return [
4+
'label' => 'Comentarii',
5+
'no_comments_yet' => 'Niciun comentariu încă.',
6+
7+
'user_avatar_alt' => 'Avatar',
8+
9+
'commented_at' => 'Adăugat la :datetime',
10+
'edited_at' => 'Editat la :datetime',
11+
'edited' => 'editat',
12+
13+
'delete_comment_heading' => 'Șterge comentariu',
14+
'delete_comment_body' => 'Sigur vrei să ștergi acest comentariu? Această acțiune nu poate fi anulată.',
15+
16+
'cancel' => 'Anulare',
17+
'delete' => 'Șterge',
18+
'save' => 'Salvare',
19+
'comment' => 'Comentariu',
20+
'add_reaction' => 'Adaugă reacție',
21+
22+
23+
'notifications' => 'Notificări',
24+
'unsubscribe' => 'Dezabonare',
25+
'subscribe' => 'Abonare',
26+
'subscribers' => 'Abonați',
27+
'more' => 'mai mulţi',
28+
29+
];

resources/views/subscription-sidebar.blade.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class="comm:w-4 comm:h-4 comm:text-gray-700 comm:dark:text-gray-300"
88
/>
99
<h3 class="comm:text-sm comm:font-bold comm:text-gray-900 comm:dark:text-gray-100">
10-
Notifications
10+
{{ __('commentions::comments.notifications') }}
1111
</h3>
1212
</div>
1313

@@ -25,7 +25,7 @@ class="comm:w-full comm:mb-2 comm:inline-flex comm:items-center comm:whitespace-
2525
icon="heroicon-s-bell-slash"
2626
class="comm:w-3 comm:h-3 comm:flex-shrink-0"
2727
/>
28-
<span>Unsubscribe</span>
28+
<span>{{ __('commentions::comments.unsubscribe') }}</span>
2929
</span>
3030
</x-filament::button>
3131
@else
@@ -42,7 +42,7 @@ class="comm:w-full comm:mb-2 comm:inline-flex comm:items-center comm:whitespace-
4242
icon="heroicon-o-bell"
4343
class="comm:w-3 comm:h-3 comm:flex-shrink-0"
4444
/>
45-
<span>Subscribe</span>
45+
<span>{{ __('commentions::comments.subscribe') }}</span>
4646
</span>
4747
</x-filament::button>
4848
@endif
@@ -56,15 +56,15 @@ class="comm:w-3 comm:h-3 comm:flex-shrink-0"
5656
class="comm:w-4 comm:h-4 comm:text-gray-700 comm:dark:text-gray-300"
5757
/>
5858
<span class="comm:text-sm comm:font-bold comm:text-gray-900 comm:dark:text-gray-100">
59-
Subscribers ({{ $this->subscribers->count() }})
59+
{{ __('commentions::comments.subscribers') }} ({{ $this->subscribers->count() }})
6060
</span>
6161
</div>
6262
<div class="comm:space-y-1">
6363
@foreach ($this->subscribers->take(5) as $subscriber)
6464
<div class="comm:flex comm:items-center comm:gap-2">
6565
@if ($subscriber instanceof \Filament\Models\Contracts\HasAvatar && $subscriber->getFilamentAvatarUrl())
66-
<img
67-
src="{{ $subscriber->getFilamentAvatarUrl() }}"
66+
<img
67+
src="{{ $subscriber->getFilamentAvatarUrl() }}"
6868
alt="{{ $subscriber->name }}"
6969
class="comm:w-4 comm:h-4 comm:rounded-full comm:object-cover comm:flex-shrink-0"
7070
/>
@@ -82,7 +82,7 @@ class="comm:w-4 comm:h-4 comm:rounded-full comm:object-cover comm:flex-shrink-0"
8282
@endforeach
8383
@if ($this->subscribers->count() > 5)
8484
<div class="comm:text-xs comm:text-gray-500 comm:dark:text-gray-400 comm:pl-6">
85-
+{{ $this->subscribers->count() - 5 }} more
85+
+{{ $this->subscribers->count() - 5 }} {{ __('commentions::comments.more') }}
8686
</div>
8787
@endif
8888
</div>

0 commit comments

Comments
 (0)