Add bilingual i18n UI and lighten component shadows

This commit is contained in:
Bernard Ngandu
2025-10-10 10:30:28 +02:00
parent 8f4b954af8
commit 0422becdd0
20 changed files with 622 additions and 141 deletions
+5 -5
View File
@@ -5,13 +5,13 @@ import type { LatLng } from '@/types/api'
function geolocationErrorMessage(error: GeolocationPositionError): string {
switch (error.code) {
case error.PERMISSION_DENIED:
return 'Location access denied. Enable it to view nearby pings.'
return 'location.error.permissionDenied'
case error.POSITION_UNAVAILABLE:
return 'Unable to determine your position. Try again.'
return 'location.error.unavailable'
case error.TIMEOUT:
return 'Timed out while fetching your location.'
return 'location.error.timeout'
default:
return 'Failed to retrieve your location.'
return 'location.error.generic'
}
}
@@ -33,7 +33,7 @@ export function useUserLocation() {
const start = useCallback(() => {
if (typeof navigator === 'undefined' || !navigator.geolocation) {
setError('Geolocation is not supported in this browser.')
setError('location.error.unsupported')
setIsRequesting(false)
return
}