Add "use my current location" button to Journey entry editor

- One-shot getCurrentPositionOnce() helper in useGeolocation with typed
  error codes (unsupported, insecure context, permission denied, timeout)
- Button inside the entry editor Location field fills coordinates from the
  device and reverse-geocodes the place name via /api/maps/reverse,
  falling back to formatted coordinates when no name is available
- New journey.editor.* i18n keys in all 23 locales
- Unit tests for the helper and component tests for the button flow
This commit is contained in:
Renzo Beux
2026-07-28 12:32:11 -03:00
committed by Maurice
parent 8a59c139c0
commit 3ec4b33dbb
27 changed files with 377 additions and 5 deletions
+6
View File
@@ -126,6 +126,12 @@ const journey: TranslationStrings = {
'journey.editor.photoFirst': 'thứ nhất',
'journey.editor.makeFirst': 'làm số 1',
'journey.editor.searching': 'Đang tìm kiếm...',
'journey.editor.useCurrentLocation': 'Dùng vị trí hiện tại của tôi',
'journey.editor.locationPermissionDenied':
'Quyền truy cập vị trí bị từ chối. Hãy cho phép trong cài đặt trình duyệt rồi thử lại.',
'journey.editor.locationTimeout': 'Hết thời gian lấy vị trí. Hãy thử lại.',
'journey.editor.locationUnavailable': 'Không thể xác định vị trí của bạn.',
'journey.editor.locationInsecureContext': 'Vị trí yêu cầu kết nối an toàn (HTTPS).',
'journey.mood.amazing': 'Tuyệt vời',
'journey.mood.good': 'Tốt',
'journey.mood.neutral': 'Trung lập',