Translate the interface into 12 languages
Add full lang/ translations for fr, de, it, nl, pl, el, ja, ko, zh, ru,
tr, and ar — all 23 base files each, with identical key trees to lang/en,
preserved :placeholders and plural forms, and native product terminology.
2026-07-03 18:38:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
|
|
'back' => '返回',
|
|
|
|
|
|
|
|
|
|
'confirm_modal' => [
|
|
|
|
|
'cannot_be_undone' => '此操作无法撤销。',
|
|
|
|
|
'type' => '输入',
|
|
|
|
|
'to_confirm' => '以确认。',
|
|
|
|
|
'copy_to_clipboard' => '复制到剪贴板',
|
2026-07-03 21:52:45 +00:00
|
|
|
'delete_keyword' => '删除',
|
Translate the interface into 12 languages
Add full lang/ translations for fr, de, it, nl, pl, el, ja, ko, zh, ru,
tr, and ar — all 23 base files each, with identical key trees to lang/en,
preserved :placeholders and plural forms, and native product terminology.
2026-07-03 18:38:40 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'photo_upload' => [
|
|
|
|
|
'upload' => '上传',
|
|
|
|
|
'uploading' => '上传中…',
|
|
|
|
|
'remove' => '移除照片',
|
|
|
|
|
'hint' => '推荐:正方形图片,最大 2 MB。',
|
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-04 00:46:19 +00:00
|
|
|
'crop_title' => '裁剪图片',
|
2026-07-04 12:56:31 +00:00
|
|
|
'crop_description' => '选择要保留的区域。',
|
|
|
|
|
'crop_hint' => '拖动以移动,拖动边角可调整大小。',
|
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-04 00:46:19 +00:00
|
|
|
'crop_save' => '保存',
|
|
|
|
|
'crop_cancel' => '取消',
|
2026-07-04 01:07:23 +00:00
|
|
|
'crop_error' => '无法加载此图片。请尝试其他文件。',
|
Translate the interface into 12 languages
Add full lang/ translations for fr, de, it, nl, pl, el, ja, ko, zh, ru,
tr, and ar — all 23 base files each, with identical key trees to lang/en,
preserved :placeholders and plural forms, and native product terminology.
2026-07-03 18:38:40 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'timezone' => [
|
|
|
|
|
'select' => '选择时区',
|
|
|
|
|
'search' => '搜索时区…',
|
|
|
|
|
'empty' => '未找到时区',
|
|
|
|
|
],
|
|
|
|
|
|
2026-08-06 00:02:34 +00:00
|
|
|
'just_now' => '刚刚',
|
|
|
|
|
|
Translate the interface into 12 languages
Add full lang/ translations for fr, de, it, nl, pl, el, ja, ko, zh, ru,
tr, and ar — all 23 base files each, with identical key trees to lang/en,
preserved :placeholders and plural forms, and native product terminology.
2026-07-03 18:38:40 +00:00
|
|
|
'date_picker' => [
|
2026-08-06 00:02:34 +00:00
|
|
|
'label' => '日期选择器',
|
Translate the interface into 12 languages
Add full lang/ translations for fr, de, it, nl, pl, el, ja, ko, zh, ru,
tr, and ar — all 23 base files each, with identical key trees to lang/en,
preserved :placeholders and plural forms, and native product terminology.
2026-07-03 18:38:40 +00:00
|
|
|
'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' => '复制到剪贴板失败',
|
|
|
|
|
],
|
|
|
|
|
];
|