Skip to content

Commit 2640c3c

Browse files
committed
refact: (LAR-171) refactoring of lang en => fr
1 parent 3305f12 commit 2640c3c

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

app/Filament/Resources/ArticleResource/Widgets/ArticleStatsOverview.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class ArticleStatsOverview extends BaseWidget
1414
{
1515
protected static ?string $pollingInterval = null;
1616

17-
protected ?string $heading = 'Posts';
17+
protected ?string $heading = 'Article';
1818

1919
protected function getColumns(): int
2020
{
@@ -27,7 +27,7 @@ protected function getStats(): array
2727
$currentWeekEnd = now()->endOfWeek();
2828

2929
return [
30-
Stat::make('Total Post', Article::query()->published()->count())
30+
Stat::make('Total Article', Article::query()->published()->count())
3131
->icon('heroicon-o-newspaper')
3232
->chart(
3333
Trend::query(Article::query()->published())
@@ -37,10 +37,10 @@ protected function getStats(): array
3737
)->perDay()
3838
->count()
3939
->map(fn (TrendValue $value) => $value->aggregate)->toArray()
40-
)->description(__('Total Post')),
40+
)->description(__('Total des articles postés')),
4141

4242
Stat::make(
43-
'Recent post',
43+
'Article récent publié',
4444
Article::query()
4545
->recent()
4646
->whereBetween('created_at', [
@@ -60,7 +60,7 @@ protected function getStats(): array
6060
->toArray()
6161
)->icon('heroicon-o-newspaper')
6262
->color('primary')
63-
->description('Total Posts of the week'),
63+
->description('Total des articles Postés de la semaine'),
6464
];
6565
}
6666
}

app/Filament/Resources/ArticleResource/Widgets/MostLikedPostsChart.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,24 @@
1010

1111
final class MostLikedPostsChart extends ChartWidget
1212
{
13-
protected static ?string $heading = 'Most Liked Posts';
13+
protected static ?string $heading = 'Article le plus aimé';
1414

1515
protected static ?string $maxHeight = '200px';
1616

1717
protected int|string|array $columnSpan = 'full';
1818

19-
protected int $titleLength = 10;
19+
protected int $titleLength = 30;
2020

2121
protected function getData(): array
2222
{
2323
$articles = Article::published()
2424
->popular()
25-
->limit(10)
2625
->get();
2726

2827
return [
2928
'datasets' => [
3029
[
31-
'label' => 'Total Liked',
30+
'label' => 'Total aimé',
3231
'data' => $articles->pluck('reactions_count')->toArray(),
3332
],
3433
],

app/Filament/Resources/ArticleResource/Widgets/MostViewedPostsChart.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
final class MostViewedPostsChart extends ChartWidget
1313
{
14-
protected static ?string $heading = 'Most Viewed Posts';
14+
protected static ?string $heading = 'Article le plus vu cette semaine';
1515

1616
protected static ?string $maxHeight = '200px';
1717

@@ -25,13 +25,12 @@ protected function getData(): array
2525
->published()
2626
->orderByDesc('views_count')
2727
->orderByDesc('published_at')
28-
->limit(10)
2928
->get();
3029

3130
return [
3231
'datasets' => [
3332
[
34-
'label' => 'Most viewed post',
33+
'label' => 'Article le plus vu',
3534
'data' => $articles->pluck('views_count')->toArray(),
3635
],
3736
],

app/Filament/Resources/UserResource/Widgets/UserActivityWidget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
final class UserActivityWidget extends ChartWidget
1212
{
13-
protected static ?string $heading = 'Most active users this week';
13+
protected static ?string $heading = 'Les utilisateurs les plus actifs cette semaine';
1414

1515
protected int|string|array $columnSpan = 'full';
1616

@@ -32,7 +32,7 @@ protected function getData(): array
3232
return [
3333
'datasets' => [
3434
[
35-
'label' => 'Total Activities',
35+
'label' => 'Total des activités',
3636
'data' => $users->pluck('activities_count')->toArray(),
3737
],
3838
],

app/Filament/Resources/UserResource/Widgets/UserChartWidget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
final class UserChartWidget extends ChartWidget
1313
{
14-
protected static ?string $heading = 'Account Creation';
14+
protected static ?string $heading = 'Création de compte';
1515

1616
protected int|string|array $columnSpan = 'full';
1717

@@ -64,7 +64,7 @@ protected function getData(): array
6464
return [
6565
'datasets' => [
6666
[
67-
'label' => 'Account created',
67+
'label' => 'Compte créé',
6868
'data' => $data->map(fn (TrendValue $value) => $value->aggregate), // @phpstan-ignore-line
6969
],
7070
],

app/Filament/Resources/UserResource/Widgets/UserStatsOverview.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
final class UserStatsOverview extends BaseWidget
1414
{
15-
protected ?string $heading = 'Account';
15+
protected ?string $heading = 'Compte';
1616

1717
protected function getColumns(): int
1818
{
@@ -22,7 +22,7 @@ protected function getColumns(): int
2222
protected function getStats(): array
2323
{
2424
return [
25-
Stat::make('Total Users', User::query()->count())
25+
Stat::make('Total des utilisateurs', User::query()->count())
2626
->chart(
2727
Trend::query(User::query())
2828
->between(
@@ -34,11 +34,11 @@ protected function getStats(): array
3434
->map(fn (TrendValue $value) => $value->aggregate)
3535
->toArray()
3636
)
37-
->description('Total number of accounts')
37+
->description('Nombre total de comptes')
3838
->icon('heroicon-o-user')
3939
->color('primary'),
4040

41-
Stat::make('Account created this week', User::query()
41+
Stat::make('Compte créé cette semaine', User::query()
4242
->whereBetween('created_at', [now()->startOfWeek(), now()->endOfWeek()])
4343
->count())
4444
->chart(
@@ -52,11 +52,11 @@ protected function getStats(): array
5252
->map(fn (TrendValue $value) => $value->aggregate)
5353
->toArray()
5454
)
55-
->description('Total number of accounts created this week')
55+
->description('Nombre de comptes créés cette semaine')
5656
->icon('heroicon-o-user')
5757
->color('primary'),
5858

59-
Stat::make('Verified Users', User::VerifiedUsers()->count())
59+
Stat::make('Utilisateurs vérifiés', User::VerifiedUsers()->count())
6060
->chart(
6161
Trend::query(User::VerifiedUsers())
6262
->between(
@@ -68,11 +68,11 @@ protected function getStats(): array
6868
->map(fn (TrendValue $value) => $value->aggregate)
6969
->toArray()
7070
)
71-
->description('Total number of accounts verified')
71+
->description('Nombre total de comptes vérifiés')
7272
->icon('heroicon-o-check-badge')
7373
->color('primary'),
7474

75-
Stat::make('Unverified Users', User::UnVerifiedUsers()->count())
75+
Stat::make('Utilisateurs non vérifiés', User::UnVerifiedUsers()->count())
7676
->chart(
7777
Trend::query(User::UnVerifiedUsers())
7878
->between(
@@ -84,7 +84,7 @@ protected function getStats(): array
8484
->map(fn (TrendValue $value) => $value->aggregate)
8585
->toArray()
8686
)
87-
->description('Total number of accounts unverified')
87+
->description('Nombre de comptes non vérifiés')
8888
->icon('heroicon-o-x-mark')
8989
->color('warning'),
9090
];

0 commit comments

Comments
 (0)