mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Staging (#2927)
* Created localized exception.php (DE) * Update German translation * Update German translation * Update de localization, Create New Post -> New * Formatting * Update site.php (#2889) Co-authored-by: daniel <danielsupernault@gmail.com> * Formatting * Update controllers, fixes #2906 * Update NotificationService, fix 500 bug * Update changelog Co-authored-by: forenta <ueblesurmeli-github@yahoo.de> Co-authored-by: Tomas Brabenec <tomas@brabenec.net>
This commit is contained in:
parent
cdfb6ac25f
commit
68437e614d
10 changed files with 57 additions and 28 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.1...dev)
|
||||
|
||||
### Updated
|
||||
- Updated NotificationService, fix 500 bug. ([4a609dc3](https://github.com/pixelfed/pixelfed/commit/4a609dc3))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
### Added
|
||||
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
||||
|
@ -112,7 +116,6 @@
|
|||
- Updated DirectMessageController, fix autocomplete bug. ([0f00be4d](https://github.com/pixelfed/pixelfed/commit/0f00be4d))
|
||||
- Updated StoryService, fix division by zero bug. ([6ae1ba0a](https://github.com/pixelfed/pixelfed/commit/6ae1ba0a))
|
||||
- Updated ApiV1Controller, fix empty public timeline bug. ([0584f9ee](https://github.com/pixelfed/pixelfed/commit/0584f9ee))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
|
||||
### Added
|
||||
|
|
|
@ -17,6 +17,9 @@ trait Instagram
|
|||
{
|
||||
public function instagram()
|
||||
{
|
||||
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||
abort(404, 'Feature not enabled');
|
||||
}
|
||||
return view('settings.import.instagram.home');
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ trait Mastodon
|
|||
{
|
||||
public function mastodon()
|
||||
{
|
||||
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||
abort(404, 'Feature not enabled');
|
||||
}
|
||||
return view('settings.import.mastodon.home');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,6 @@ class ImportController extends Controller
|
|||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
|
||||
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||
abort(404, 'Feature not enabled');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,14 +11,10 @@ use App\Services\FollowerService;
|
|||
|
||||
class PollController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
}
|
||||
|
||||
public function getPoll(Request $request, $id)
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
|
||||
$poll = Poll::findOrFail($id);
|
||||
$status = Status::findOrFail($poll->status_id);
|
||||
if($status->scope != 'public') {
|
||||
|
@ -34,6 +30,8 @@ class PollController extends Controller
|
|||
|
||||
public function vote(Request $request, $id)
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
|
||||
abort_unless($request->user(), 403);
|
||||
|
||||
$this->validate($request, [
|
||||
|
|
|
@ -27,7 +27,10 @@ class NotificationService {
|
|||
$ids = self::coldGet($id, $start, $stop);
|
||||
}
|
||||
foreach($ids as $id) {
|
||||
$res->push(self::getNotification($id));
|
||||
$n = self::getNotification($id);
|
||||
if($n != null) {
|
||||
$res->push($n);
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
@ -56,7 +59,10 @@ class NotificationService {
|
|||
|
||||
$res = collect([]);
|
||||
foreach($ids as $id) {
|
||||
$res->push(self::getNotification($id));
|
||||
$n = self::getNotification($id);
|
||||
if($n != null) {
|
||||
$res->push($n);
|
||||
}
|
||||
}
|
||||
return $res->toArray();
|
||||
}
|
||||
|
@ -71,7 +77,10 @@ class NotificationService {
|
|||
|
||||
$res = collect([]);
|
||||
foreach($ids as $id) {
|
||||
$res->push(self::getNotification($id));
|
||||
$n = self::getNotification($id);
|
||||
if($n != null) {
|
||||
$res->push($n);
|
||||
}
|
||||
}
|
||||
return $res->toArray();
|
||||
}
|
||||
|
@ -129,7 +138,12 @@ class NotificationService {
|
|||
public static function getNotification($id)
|
||||
{
|
||||
return Cache::remember('service:notification:'.$id, now()->addDays(3), function() use($id) {
|
||||
$n = Notification::with('item')->findOrFail($id);
|
||||
$n = Notification::with('item')->find($id);
|
||||
|
||||
if(!$n) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$fractal = new Fractal\Manager();
|
||||
$fractal->setSerializer(new ArraySerializer());
|
||||
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'about' => 'O nás',
|
||||
'help' => 'Nápověda',
|
||||
'language' => 'Jazyk',
|
||||
|
@ -12,5 +11,8 @@ return [
|
|||
'l10nWip' => 'Stále pracujeme na podpoře lokalizací',
|
||||
'currentLocale' => 'Aktuální jazyk',
|
||||
'selectLocale' => 'Vyberte si jeden z podporovaných jazyků',
|
||||
|
||||
'contact' => 'Kontakt',
|
||||
'contact-us' => 'Kontaktujte nás',
|
||||
'places' => 'Místa',
|
||||
'profiles' => 'Profily',
|
||||
];
|
||||
|
|
11
resources/lang/de/exception.php
Normal file
11
resources/lang/de/exception.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'compose' => [
|
||||
'invalid' => [
|
||||
'album' => 'Mindestens 1 Foto oder Video muss enthalten sein.',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'search' => 'Suche',
|
||||
'home' => 'Heim',
|
||||
'local' => 'Lokal',
|
||||
|
@ -16,5 +15,5 @@ return [
|
|||
'admin' => 'Administration',
|
||||
'logout' => 'Abmelden',
|
||||
'directMessages' => 'Privatnachrichten',
|
||||
|
||||
'composePost' => 'Neu',
|
||||
];
|
||||
|
|
|
@ -15,5 +15,5 @@ return [
|
|||
'contact' => 'Kontakt',
|
||||
'contact-us' => 'Kontaktiere uns',
|
||||
'places' => 'Orte',
|
||||
|
||||
'profiles' => 'Profile',
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue