trypost/lang/pl/common.php
Paulo Castellano c6369a6ddb Crop the avatar/logo before upload with a dependency-free cropper
Selecting an avatar or workspace logo now opens a crop dialog (drag + zoom)
before uploading, so the image is framed the way it renders. The crop is
performed client-side and the resized 512x512 result is what gets uploaded.

This reworks the idea from #131 without its cropper dependency: vue-advanced-cropper
was last released ~2 years ago and we did not want an unmaintained package for
something this load-bearing. What we need is narrow (fixed 1:1, a circle/square
mask, fixed-size output), so a small canvas-based cropper covers it:

- imageCrop.ts: pure transform math (cover-fit, clamp, zoom, viewport->source).
- ImageCropperDialog.vue: CSS-transform preview, pointer drag, wheel/button zoom,
  a ResizeObserver to measure the modal (no requestAnimationFrame timing hacks),
  and a canvas toBlob only on save.
- PhotoUpload.vue: opens the cropper on file select; the mask shape follows the
  display shape (round avatar / square logo) instead of always being round.
- crop_* strings added to all 15 locales.

Also installs Pest browser testing (pest-plugin-browser + Playwright) and adds a
browser test for the crop flow. TestCase only calls withoutVite() for non-browser
tests, since browser tests need the real Vite assets to boot the SPA. The Pest
browser server does not parse multipart uploads, so the test asserts the crop
dispatches the correct upload request; endpoint persistence stays covered by
ProfileUpdateTest.
2026-07-03 21:46:19 -03:00

66 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
return [
'back' => 'Wstecz',
'beta' => 'Beta',
'confirm_modal' => [
'cannot_be_undone' => 'Tej operacji nie można cofnąć.',
'type' => 'Wpisz',
'to_confirm' => 'aby potwierdzić.',
'copy_to_clipboard' => 'Kopiuj do schowka',
'delete_keyword' => 'usuń',
],
'photo_upload' => [
'upload' => 'Prześlij',
'uploading' => 'Przesyłanie...',
'remove' => 'Usuń zdjęcie',
'hint' => 'Zalecane: kwadratowe zdjęcie, maks. 2 MB.',
'crop_title' => 'Przytnij obraz',
'crop_description' => 'Przeciągnij i powiększ, aby wykadrować.',
'crop_hint' => 'Przeciągnij, aby zmienić położenie',
'crop_save' => 'Zapisz',
'crop_cancel' => 'Anuluj',
],
'timezone' => [
'select' => 'Wybierz strefę czasową',
'search' => 'Szukaj strefy czasowej...',
'empty' => 'Nie znaleziono strefy czasowej',
],
'date_picker' => [
'select' => 'Wybierz datę',
],
'date_range_picker' => [
'placeholder' => 'Wybierz zakres dat',
'today' => 'Dziś',
'yesterday' => 'Wczoraj',
'last_7_days' => 'Ostatnie 7 dni',
'last_30_days' => 'Ostatnie 30 dni',
'last_3_months' => 'Ostatnie 3 miesiące',
'last_6_months' => 'Ostatnie 6 miesięcy',
'last_12_months' => 'Ostatnie 12 miesięcy',
'this_month' => 'Ten miesiąc',
'last_month' => 'Poprzedni miesiąc',
'year_to_date' => 'Od początku roku',
'last_year' => 'Poprzedni rok',
],
'cancel' => 'Anuluj',
'clear' => 'Wyczyść',
'close' => 'Zamknij',
'loading_more' => 'Wczytywanie kolejnych...',
'actions' => [
'copy' => 'Kopiuj',
'copied' => 'Skopiowano',
'copy_failed' => 'Nie udało się skopiować do schowka',
],
];