Skip to content

Commit

Permalink
📙 Added translations (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored Apr 7, 2021
1 parent 704b026 commit 814985c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/Http/Controllers/SpotifyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,17 @@ public function renderExplore(): Renderable {

}
if($trackToExplore !== null) {
$trackReason = 'Dein Freund "' . $friend->username . '" hat diesen Track in den letzten Wochen gelegentlich gehört.';
$trackReason = strtr(__('spotify.explore.reason.friend'), [
':friend' => $friend->username
]);
} else {
//Use a popular song from trends
$trackToExplore = SpotifyTrack::whereNotIn('track_id', $tracks)
->whereNotIn('track_id', $alreadyRated)
->where('preview_url', '<>', null)
->orderByDesc('popularity')
->first();
$trackReason = 'Dieser Track ist in den Trends weit oben.';
$trackReason = __('spotify.explore.reason.trend');
}


Expand Down
8 changes: 7 additions & 1 deletion resources/lang/de/spotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,11 @@
'last_years' => 'Die letzten Jahre',
'last_months' => 'letzte 6 Monate',
'last_weeks' => 'letzten 4 Wochen',
'time_period' => 'Zeitraum'
'time_period' => 'Zeitraum',
'explore' => [
'reason' => [
'trend' => 'Dieser Track ist in den Trends weit oben.',
'friend' => 'Dein Freund ":friend" hat diesen Track in den letzten Wochen gelegentlich gehört.',
]
],
];
8 changes: 7 additions & 1 deletion resources/lang/en/spotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@
'last_years' => 'Last years',
'last_months' => 'last 6 months',
'last_weeks' => 'last 4 weeks',
'time_period' => 'Time Period'
'time_period' => 'Time Period',
'explore' => [
'reason' => [
'trend' => 'Dieser Track ist in den Trends weit oben.',
'friend' => 'Dein Freund ":friend" hat diesen Track in den letzten Wochen gelegentlich gehört.',
]
],
];

0 comments on commit 814985c

Please sign in to comment.