diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index d687b6bdf..27cf768f8 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -14,7 +14,7 @@ class StatusController extends Controller { $user = Profile::whereUsername($username)->firstOrFail(); $status = Status::whereProfileId($user->id) - ->withCount('likes') + ->withCount(['likes', 'comments']) ->findOrFail($id); if(!$status->media_path && $status->in_reply_to_id) { return redirect($status->url()); diff --git a/app/Util/Lexer/Hashtag.php b/app/Util/Lexer/Hashtag.php index 9f19ed897..3b27f0dd7 100644 --- a/app/Util/Lexer/Hashtag.php +++ b/app/Util/Lexer/Hashtag.php @@ -7,7 +7,7 @@ class Hashtag { public static function getHashtags($status) { $hashtags = false; - preg_match_all("/(#\w+)/u", $status, $matches); + preg_match_all("/(? 'Disse oplysninger stemmer ikke overens med nogen konto.', + 'throttle' => 'For mange loginforsøg. Vær venlig at prøve igen om :seconds sekunder.', + +]; diff --git a/resources/lang/da/notification.php b/resources/lang/da/notification.php new file mode 100644 index 000000000..6024d9b16 --- /dev/null +++ b/resources/lang/da/notification.php @@ -0,0 +1,7 @@ + 'syntes om dit billede.', + +]; \ No newline at end of file diff --git a/resources/lang/da/pagination.php b/resources/lang/da/pagination.php new file mode 100644 index 000000000..c4d70ab5b --- /dev/null +++ b/resources/lang/da/pagination.php @@ -0,0 +1,19 @@ + '« forrige', + 'next' => 'næste »', + +]; diff --git a/resources/lang/da/passwords.php b/resources/lang/da/passwords.php new file mode 100644 index 000000000..ee117c41e --- /dev/null +++ b/resources/lang/da/passwords.php @@ -0,0 +1,22 @@ + 'Adgangskode skal være mindst 6 tegn og skal matche bekræftelsen.', + 'reset' => 'Din adgangskode er blevet nulstillet!', + 'sent' => 'Vi har sendt dig en email med et link, hvor du kan nulstille din adgangskode!', + 'token' => 'Dette nulstillingslink er ikke længere gyldigt.', + 'user' => "Vi kan ikke finde en bruger med den emailadresse.", + +]; diff --git a/resources/lang/da/profile.php b/resources/lang/da/profile.php new file mode 100644 index 000000000..e19ae40ab --- /dev/null +++ b/resources/lang/da/profile.php @@ -0,0 +1,5 @@ + 'Denne bruger har ikke postet noget endnu!', +]; \ No newline at end of file diff --git a/resources/lang/da/validation.php b/resources/lang/da/validation.php new file mode 100644 index 000000000..2f2f555f2 --- /dev/null +++ b/resources/lang/da/validation.php @@ -0,0 +1,122 @@ + ':attribute skal accepteres.', + 'active_url' => ':attribute er ikke en gyldig URL.', + 'after' => ':attribute skal være en dato efter :date.', + 'after_or_equal' => ':attribute skal være en dato ens med, eller efter :date.', + 'alpha' => ':attribute må kun indeholde bogstaver.', + 'alpha_dash' => ':attribute må kun indeholde bogstaver, tal og bindestreger.', + 'alpha_num' => ':attribute må kun indeholde bogstaver og tal.', + 'array' => ':attribute skal være et Array.', + 'before' => ':attribute skal være en dato før :date.', + 'before_or_equal' => ':attribute skal være en dato før, eller det samme som :date.', + 'between' => [ + 'numeric' => ':attribute skal være mellem :min og :max.', + 'file' => ':attribute skal være mellem :min og :max kilobytes.', + 'string' => ':attribute skal være mellem :min og :max tegn.', + 'array' => ':attribute skal være mellem :min og :max elementer.', + ], + 'boolean' => ':attribute felt skal være sandt eller falsk.', + 'confirmed' => ':attribute bekræftelse matcher ikke.', + 'date' => ':attribute er ikke en gyldig dato.', + 'date_format' => ':attribute matcher ikke formatet :format.', + 'different' => ':attribute og :other skal være forskellige.', + 'digits' => ':attribute skal være :digits tal.', + 'digits_between' => ':attribute skal være mellem :min og :max tal.', + 'dimensions' => ':attribute har ugyldige billeddimensioner.', + 'distinct' => ':attribute-felt har en dobbeltværdi.', + 'email' => ':attribute skal være en gyldig emailadresse.', + 'exists' => 'Den valgte :attribute er ugyldig.', + 'file' => ':attribute skal være en fil.', + 'filled' => 'Feltet :attribute skal have en værdi.', + 'image' => ':attribute skal være et billede.', + 'in' => 'Den valgte :attribute er ugyldig.', + 'in_array' => ':attribute feltet findes ikke i :other.', + 'integer' => ':attribute skal være et heltal.', + 'ip' => ':attribute skal være en gyldig IP-adresse.', + 'ipv4' => ':attribute skal være en gyldig IPv4 adresse.', + 'ipv6' => ':attribute skal være en gyldig IPv6 adresse.', + 'json' => ':attribute skal være en gyldig JSON-streng.', + 'max' => [ + 'numeric' => ':attribute må ikke være større end :max.', + 'file' => ':attribute må ikke være større end :max kilobytes.', + 'string' => ':attribute må ikke være større end :max tegn.', + 'array' => ':attribute må ikke have mere end :max elementer.', + ], + 'mimes' => ':attribute skal være en fil af typen: :values.', + 'mimetypes' => ':attribute skal være en fil af typen: :values.', + 'min' => [ + 'numeric' => ':attribute skal være mindst :min.', + 'file' => ':attribute skal være mindst :min kilobytes.', + 'string' => ':attribute skal være mindst :min tegn.', + 'array' => ':attribute skal være mindst :min elementer.', + ], + 'not_in' => 'Den valgte :attribute er ugyldig.', + 'not_regex' => ':attribute format er ugyldigt.', + 'numeric' => ':attribute skal være et tal.', + 'present' => ':attribute feltet skal være til stede.', + 'regex' => ':attribute format er ugyldigt.', + 'required' => ':attribute felt er påkrævet.', + 'required_if' => ':attribute felt er påkrævet når :other er :value.', + 'required_unless' => ':attribute felt er påkrævet medmindre :other er i :values.', + 'required_with' => ':attribute felt er påkrævet når :values er tilstede.', + 'required_with_all' => ':attribute felt er påkrævet når :values er tilstede.', + 'required_without' => ':attribute felt er påkrævet når :values ikke er tilstede.', + 'required_without_all' => ':attribute felt er påkrævet når ingen af :values er tilstede.', + 'same' => ':attribute og :other skal være ens.', + 'size' => [ + 'numeric' => ':attribute skal være :size.', + 'file' => ':attribute skal være :size kilobytes.', + 'string' => ':attribute skal være :size tegn.', + 'array' => ':attribute skal indeholde :size elementer.', + ], + 'string' => ':attribute skal være en streng.', + 'timezone' => ':attribute skal være en gyldig zone.', + 'unique' => ':attribute er allerede taget.', + 'uploaded' => ':attribute kunne ikke uploades.', + 'url' => ':attribute format er ugyldigt.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/admin/users/home.blade.php b/resources/views/admin/users/home.blade.php index e19c98ff7..304f05063 100644 --- a/resources/views/admin/users/home.blade.php +++ b/resources/views/admin/users/home.blade.php @@ -6,33 +6,34 @@
- - - - - - - - - - - - - @foreach($users as $user) - - - - - - - - @endforeach - -
#StatusesStorageRoleCreated
- - {{$user->id}} - - {{$user->profile->statuses->count()}}

{!!$user->is_admin ? 'admin' : 'member'!!}{{$user->created_at->diffForHumans(null, true, true)}}
+
+ + + + + + + + + + + + @foreach($users as $user) + + + + + + + + @endforeach + +
UsernameStatusesStorageRoleCreated
+ + {{$user->username}} + + {{$user->profile->statuses->count()}}

{!!$user->is_admin ? 'admin' : 'member'!!}{{$user->created_at->diffForHumans(null, true, true)}}
+
{{$users->links()}}
@@ -48,4 +49,4 @@ }); }); -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/discover/home.blade.php b/resources/views/discover/home.blade.php index 0bce0f326..5bd9e3c3b 100644 --- a/resources/views/discover/home.blade.php +++ b/resources/views/discover/home.blade.php @@ -41,4 +41,8 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/discover/tags/show.blade.php b/resources/views/discover/tags/show.blade.php index bacc30178..3099b3e41 100644 --- a/resources/views/discover/tags/show.blade.php +++ b/resources/views/discover/tags/show.blade.php @@ -34,4 +34,8 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 740323892..2f7b05cd3 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => 'Welcome to ' . config('app.name')]) @section('content')
@@ -29,7 +29,7 @@ @endsection @push('meta') - + @endpush diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 58c55b131..83a10462a 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -7,10 +7,21 @@ - {{ config('app.name', 'Laravel') }} - + + + + {{ $title or config('app.name', 'Laravel') }} + + + + + @stack('meta') + + + + @@ -19,12 +30,10 @@ @include('layouts.partial.nav') -
+
@yield('content')
-
- @include('layouts.partial.footer') -
+ @include('layouts.partial.footer') @stack('scripts') diff --git a/resources/views/layouts/partial/footer.blade.php b/resources/views/layouts/partial/footer.blade.php index 382d513b4..29cd2d2d1 100644 --- a/resources/views/layouts/partial/footer.blade.php +++ b/resources/views/layouts/partial/footer.blade.php @@ -1,6 +1,6 @@
@endsection + +@push('meta') + + +@endpush diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index c2206387a..d432103bd 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . " on " . config('app.name')]) @section('content') @@ -133,3 +133,9 @@ @endsection + +@push('meta') + + +@endpush + diff --git a/resources/views/site/about.blade.php b/resources/views/site/about.blade.php index 433d3f283..a8d17eb05 100644 --- a/resources/views/site/about.blade.php +++ b/resources/views/site/about.blade.php @@ -9,4 +9,8 @@

PixelFed is a federated image sharing platform, powered by the ActivityPub protocol.

-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/bannedinstances.blade.php b/resources/views/site/bannedinstances.blade.php index aca13d885..c52aa4ed7 100644 --- a/resources/views/site/bannedinstances.blade.php +++ b/resources/views/site/bannedinstances.blade.php @@ -6,4 +6,8 @@

Banned Instances


-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/features.blade.php b/resources/views/site/features.blade.php index 6d7ea4cdb..d2ba7f1e1 100644 --- a/resources/views/site/features.blade.php +++ b/resources/views/site/features.blade.php @@ -6,4 +6,8 @@

Features


-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/fediverse.blade.php b/resources/views/site/fediverse.blade.php index 2f7cc9ddd..436f73332 100644 --- a/resources/views/site/fediverse.blade.php +++ b/resources/views/site/fediverse.blade.php @@ -14,4 +14,8 @@
  • Pleroma - A federated twitter alternative.
  • -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/help.blade.php b/resources/views/site/help.blade.php index 59a9cb2ae..3ba51f775 100644 --- a/resources/views/site/help.blade.php +++ b/resources/views/site/help.blade.php @@ -6,4 +6,8 @@

    Help


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/libraries.blade.php b/resources/views/site/libraries.blade.php index 97ded54f6..d6156acac 100644 --- a/resources/views/site/libraries.blade.php +++ b/resources/views/site/libraries.blade.php @@ -6,4 +6,8 @@

    Libraries


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/opensource.blade.php b/resources/views/site/opensource.blade.php index 9688a90e3..a48832dfb 100644 --- a/resources/views/site/opensource.blade.php +++ b/resources/views/site/opensource.blade.php @@ -9,4 +9,8 @@

    The software that powers this website is called PixelFed and anyone can download the source code and run their own instance!

    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/partial/template.blade.php b/resources/views/site/partial/template.blade.php index 31cd0aa95..f79c6a334 100644 --- a/resources/views/site/partial/template.blade.php +++ b/resources/views/site/partial/template.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => 'About ' . config('app.name')]) @section('content') @@ -22,4 +22,4 @@ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/site/platform.blade.php b/resources/views/site/platform.blade.php index e8f71bb9e..1972f83e2 100644 --- a/resources/views/site/platform.blade.php +++ b/resources/views/site/platform.blade.php @@ -6,4 +6,8 @@

    Platform/API Terms Of Use


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/privacy.blade.php b/resources/views/site/privacy.blade.php index aa99d8e2f..576f1af20 100644 --- a/resources/views/site/privacy.blade.php +++ b/resources/views/site/privacy.blade.php @@ -77,4 +77,8 @@

    Originally adapted from the Mastodon privacy policy.

    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/terms.blade.php b/resources/views/site/terms.blade.php index 383eb331c..001642731 100644 --- a/resources/views/site/terms.blade.php +++ b/resources/views/site/terms.blade.php @@ -6,4 +6,8 @@

    Terms Of Use


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 3060f9ce2..be57f0c92 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . " posted a photo: " . $status->likes_count . " likes, " . $status->comments_count . " comments" ]) @section('content') @@ -87,3 +87,8 @@ @endsection + +@push('meta') + + +@endpush diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 9a140cf63..15e76492f 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -8,3 +8,7 @@ @endsection + +@push('meta') + +@endpush