diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 47f0d52..64088d9 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -5,7 +5,6 @@ namespace App\Http\Controllers; use App\Models\Image; use App\Settings\GeneralSettings; use Carbon\Carbon; -use Illuminate\Support\Facades\Lang; use Inertia\Inertia; class HomeController extends Controller @@ -14,11 +13,6 @@ class HomeController extends Controller public function index() { - $locale = app()->getLocale(); - $translations = array_merge( - Lang::get('api', [], $locale), - Lang::get('settings', [], $locale) - ); $galleryHeading = $this->settings->gallery_heading; $newImageTimespanMinutes = $this->settings->new_image_timespan_minutes; @@ -30,7 +24,6 @@ class HomeController extends Controller }); return Inertia::render('Home', [ - 'translations' => $translations, 'galleryHeading' => $galleryHeading, 'images' => $images, ]); diff --git a/resources/js/Components/GalleryGrid.vue b/resources/js/Components/GalleryGrid.vue index e6e4320..7a0f054 100644 --- a/resources/js/Components/GalleryGrid.vue +++ b/resources/js/Components/GalleryGrid.vue @@ -2,19 +2,19 @@

- {{ props.translations.empty_gallery || 'Noch keine Bilder vorhanden.' }} + {{ __('api.gallery.empty') }}

@@ -48,17 +48,9 @@ const props = defineProps({ type: Array, required: true, }, - translations: { - type: Object, - required: true, - }, }); const emits = defineEmits(['imageTapped']); -const __ = (key) => { - return props.translations[key] || key; -}; - -const fallbackLabel = (image) => image?.name || props.translations.image || 'Bild'; +const fallbackLabel = (image) => image?.name || 'Bild'; diff --git a/resources/js/Components/LoadingSpinner.vue b/resources/js/Components/LoadingSpinner.vue index cf578bd..48bdfc5 100644 --- a/resources/js/Components/LoadingSpinner.vue +++ b/resources/js/Components/LoadingSpinner.vue @@ -2,7 +2,7 @@
-

{{ __('loading_spinner.processing_image') }}

+

{{ __('api.loading_spinner.processing_image') }}

{{ progress }}%

diff --git a/resources/js/Components/Navigation.vue b/resources/js/Components/Navigation.vue index 9c6cead..b365b28 100644 --- a/resources/js/Components/Navigation.vue +++ b/resources/js/Components/Navigation.vue @@ -1,31 +1,31 @@