trypost/lang/ja/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
2 KiB
PHP

<?php
declare(strict_types=1);
return [
'back' => '戻る',
'beta' => 'ベータ',
'confirm_modal' => [
'cannot_be_undone' => 'この操作は取り消せません。',
'type' => '入力',
'to_confirm' => 'で確認してください。',
'copy_to_clipboard' => 'クリップボードにコピー',
'delete_keyword' => '削除',
],
'photo_upload' => [
'upload' => 'アップロード',
'uploading' => 'アップロード中...',
'remove' => '写真を削除',
'hint' => '推奨: 正方形の画像、最大 2 MB。',
'crop_title' => '画像を切り抜く',
'crop_description' => 'ドラッグとズームで位置を調整します。',
'crop_hint' => 'ドラッグして移動',
'crop_save' => '保存',
'crop_cancel' => 'キャンセル',
],
'timezone' => [
'select' => 'タイムゾーンを選択',
'search' => 'タイムゾーンを検索...',
'empty' => 'タイムゾーンが見つかりません',
],
'date_picker' => [
'select' => '日付を選択',
],
'date_range_picker' => [
'placeholder' => '期間を選択',
'today' => '今日',
'yesterday' => '昨日',
'last_7_days' => '過去 7 日間',
'last_30_days' => '過去 30 日間',
'last_3_months' => '過去 3 か月',
'last_6_months' => '過去 6 か月',
'last_12_months' => '過去 12 か月',
'this_month' => '今月',
'last_month' => '先月',
'year_to_date' => '今年(年初から)',
'last_year' => '昨年',
],
'cancel' => 'キャンセル',
'clear' => 'クリア',
'close' => '閉じる',
'loading_more' => 'さらに読み込み中...',
'actions' => [
'copy' => 'コピー',
'copied' => 'コピーしました',
'copy_failed' => 'クリップボードへのコピーに失敗しました',
],
];