mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-24 23:35:23 +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)
|
## [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)
|
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||||
### Added
|
### Added
|
||||||
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
- 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 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 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))
|
- 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)
|
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -15,10 +15,13 @@ use App\Jobs\ImportPipeline\ImportInstagram;
|
||||||
|
|
||||||
trait Instagram
|
trait Instagram
|
||||||
{
|
{
|
||||||
public function instagram()
|
public function instagram()
|
||||||
{
|
{
|
||||||
return view('settings.import.instagram.home');
|
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||||
}
|
abort(404, 'Feature not enabled');
|
||||||
|
}
|
||||||
|
return view('settings.import.instagram.home');
|
||||||
|
}
|
||||||
|
|
||||||
public function instagramStart(Request $request)
|
public function instagramStart(Request $request)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,8 +6,11 @@ use Illuminate\Http\Request;
|
||||||
|
|
||||||
trait Mastodon
|
trait Mastodon
|
||||||
{
|
{
|
||||||
public function mastodon()
|
public function mastodon()
|
||||||
{
|
{
|
||||||
return view('settings.import.mastodon.home');
|
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()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('auth');
|
$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
|
class PollController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPoll(Request $request, $id)
|
public function getPoll(Request $request, $id)
|
||||||
{
|
{
|
||||||
|
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||||
|
|
||||||
$poll = Poll::findOrFail($id);
|
$poll = Poll::findOrFail($id);
|
||||||
$status = Status::findOrFail($poll->status_id);
|
$status = Status::findOrFail($poll->status_id);
|
||||||
if($status->scope != 'public') {
|
if($status->scope != 'public') {
|
||||||
|
@ -34,6 +30,8 @@ class PollController extends Controller
|
||||||
|
|
||||||
public function vote(Request $request, $id)
|
public function vote(Request $request, $id)
|
||||||
{
|
{
|
||||||
|
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||||
|
|
||||||
abort_unless($request->user(), 403);
|
abort_unless($request->user(), 403);
|
||||||
|
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
|
|
|
@ -27,7 +27,10 @@ class NotificationService {
|
||||||
$ids = self::coldGet($id, $start, $stop);
|
$ids = self::coldGet($id, $start, $stop);
|
||||||
}
|
}
|
||||||
foreach($ids as $id) {
|
foreach($ids as $id) {
|
||||||
$res->push(self::getNotification($id));
|
$n = self::getNotification($id);
|
||||||
|
if($n != null) {
|
||||||
|
$res->push($n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +59,10 @@ class NotificationService {
|
||||||
|
|
||||||
$res = collect([]);
|
$res = collect([]);
|
||||||
foreach($ids as $id) {
|
foreach($ids as $id) {
|
||||||
$res->push(self::getNotification($id));
|
$n = self::getNotification($id);
|
||||||
|
if($n != null) {
|
||||||
|
$res->push($n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $res->toArray();
|
return $res->toArray();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +77,10 @@ class NotificationService {
|
||||||
|
|
||||||
$res = collect([]);
|
$res = collect([]);
|
||||||
foreach($ids as $id) {
|
foreach($ids as $id) {
|
||||||
$res->push(self::getNotification($id));
|
$n = self::getNotification($id);
|
||||||
|
if($n != null) {
|
||||||
|
$res->push($n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $res->toArray();
|
return $res->toArray();
|
||||||
}
|
}
|
||||||
|
@ -129,7 +138,12 @@ class NotificationService {
|
||||||
public static function getNotification($id)
|
public static function getNotification($id)
|
||||||
{
|
{
|
||||||
return Cache::remember('service:notification:'.$id, now()->addDays(3), function() use($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 = new Fractal\Manager();
|
||||||
$fractal->setSerializer(new ArraySerializer());
|
$fractal->setSerializer(new ArraySerializer());
|
||||||
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());
|
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'about' => 'O nás',
|
'about' => 'O nás',
|
||||||
'help' => 'Nápověda',
|
'help' => 'Nápověda',
|
||||||
'language' => 'Jazyk',
|
'language' => 'Jazyk',
|
||||||
|
@ -12,5 +11,8 @@ return [
|
||||||
'l10nWip' => 'Stále pracujeme na podpoře lokalizací',
|
'l10nWip' => 'Stále pracujeme na podpoře lokalizací',
|
||||||
'currentLocale' => 'Aktuální jazyk',
|
'currentLocale' => 'Aktuální jazyk',
|
||||||
'selectLocale' => 'Vyberte si jeden z podporovaných 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
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'search' => 'Suche',
|
'search' => 'Suche',
|
||||||
'home' => 'Heim',
|
'home' => 'Heim',
|
||||||
'local' => 'Lokal',
|
'local' => 'Lokal',
|
||||||
|
@ -16,5 +15,5 @@ return [
|
||||||
'admin' => 'Administration',
|
'admin' => 'Administration',
|
||||||
'logout' => 'Abmelden',
|
'logout' => 'Abmelden',
|
||||||
'directMessages' => 'Privatnachrichten',
|
'directMessages' => 'Privatnachrichten',
|
||||||
|
'composePost' => 'Neu',
|
||||||
];
|
];
|
||||||
|
|
|
@ -15,5 +15,5 @@ return [
|
||||||
'contact' => 'Kontakt',
|
'contact' => 'Kontakt',
|
||||||
'contact-us' => 'Kontaktiere uns',
|
'contact-us' => 'Kontaktiere uns',
|
||||||
'places' => 'Orte',
|
'places' => 'Orte',
|
||||||
|
'profiles' => 'Profile',
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue