tilfluktsrom/app/src/main/res/values/strings.xml
Ole-Morten Duesund f0c4a1f5b4 Actionable banner når posisjon ikke er tilgjengelig
Tidligere sto statusteksten igjen på «Venter på GPS…» uansett om
årsaken var manglende tillatelse, avslåtte stedstjenester eller
bare at GPS-en ikke hadde fått fix ennå. For en nødsituasjonsapp
er det en reell feilmodus: brukeren får ingen hint om hva som kan
gjøres for å finne nærmeste tilfluktsrom.

Ny noLocationBanner plasseres øverst i innholdsområdet (rett under
statuslinjen) slik at den ikke kolliderer med de flytende
handlingsknappene over bunnarket, og viser én av tre tilstander:

1. Tillatelse avslått eller ikke gitt — «Posisjonstilgang
   nødvendig for å finne nærmeste tilfluktsrom. Du kan også
   trykke på et merke i kartet.» + «Gi tilgang» som åpner
   ACTION_APPLICATION_DETAILS_SETTINGS.
2. Tillatelse gitt, men stedstjenester slått av — «Stedstjenester
   er slått av. Aktiver dem eller velg et tilfluktsrom fra
   kartet.» + «Aktiver» som åpner ACTION_LOCATION_SOURCE_SETTINGS.
3. Begge OK — banner er skjult og den eksisterende «Venter på
   GPS…»-teksten gjelder.

Helperen updateLocationStatusBanner() kalles fra loadData(),
permission-result-kallbacket og onResume(), slik at banneret
oppdaterer seg både ved appstart, umiddelbart etter avslag, og
når brukeren kommer tilbake fra systeminnstillingene.
AlertDialog-en ved permanent avslag er fjernet til fordel for det
ikke-modale banneret, som lar brukeren fortsatt pan-ne kartet og
velge tilfluktsrom manuelt. Toasten på mykt avslag er beholdt som
en kort bekreftelse. API-nivå-fallbacket bruker
LocationManager.isLocationEnabled på API 28+, isProviderEnabled
for GPS/Network på API 26–27.

Verifisert på emulator i alle fire tilstander (avslag → App
Settings, tjeneste-av → Posisjonsinnstillinger, gjenopprettet).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 10:32:02 +02:00

108 lines
7.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Tilfluktsrom</string>
<!-- Status messages -->
<string name="status_ready">Ready</string>
<string name="status_loading">Loading shelter data&#8230;</string>
<string name="status_updating">Updating&#8230;</string>
<string name="status_offline">Offline mode</string>
<string name="status_shelters_loaded">%d shelters loaded</string>
<string name="status_no_location">Waiting for GPS&#8230;</string>
<string name="status_caching_map">Caching map for offline use&#8230;</string>
<!-- Loading screen -->
<string name="loading_shelters">Downloading shelter data&#8230;</string>
<string name="loading_map">Caching map tiles&#8230;</string>
<string name="loading_map_explanation">Preparing offline map.\nThe map will scroll briefly to cache your surroundings.</string>
<string name="loading_first_time">Setting up for first use&#8230;</string>
<!-- Shelter info -->
<string name="shelter_capacity">%d places</string>
<string name="shelter_room_nr">Room %d</string>
<string name="no_shelters">No shelter data available</string>
<!-- Actions -->
<string name="action_refresh">Refresh data</string>
<string name="action_toggle_view">Toggle map/compass view</string>
<string name="action_skip">Skip</string>
<string name="action_cache_ok">Cache map</string>
<string name="action_cache_now">Cache now</string>
<string name="action_reset_navigation">Reset navigation view</string>
<string name="action_share">Share shelter</string>
<string name="action_grant_permission">Grant access</string>
<string name="action_location_settings">Enable</string>
<string name="warning_no_map_cache">No offline map cached. Map requires internet.</string>
<string name="status_location_permission_needed">Location access needed to find the nearest shelter. You can also tap a marker on the map.</string>
<string name="status_location_services_off">Location services are off. Enable them or pick a shelter from the map.</string>
<!-- Permissions -->
<string name="permission_location_title">Location permission required</string>
<string name="permission_location_message">This app needs your location to find the nearest shelter. Please grant location access.</string>
<string name="permission_denied">Location permission denied. The app cannot find nearby shelters without it.</string>
<!-- Errors -->
<string name="error_download_failed">Could not download shelter data. Check your internet connection.</string>
<string name="error_no_data_offline">No cached data available. Connect to the internet to download shelter data.</string>
<string name="error_no_compass">Compass not available on this device</string>
<string name="error_shelter_not_found">Shelter not found</string>
<string name="update_success">Shelter data updated</string>
<string name="update_failed">Update failed — using cached data</string>
<!-- Data freshness -->
<string name="freshness_fresh">Data is up to date</string>
<string name="freshness_week">Data is %d days old</string>
<string name="freshness_old">Data is outdated</string>
<!-- Sharing -->
<string name="share_subject">Emergency shelter</string>
<string name="share_body">Shelter: %1$s\n%2$d places\n%3$.6f, %4$.6f\ngeo:%3$.6f,%4$.6f\n%5$s</string>
<string name="share_no_shelter">No shelter selected</string>
<!-- Accessibility -->
<string name="direction_arrow_description">Direction to shelter, %s away</string>
<string name="content_desc_shelter_item">%1$s, %2$s, %3$d places</string>
<string name="compass_accuracy_warning">Low accuracy - %s</string>
<string name="a11y_map">Shelter map</string>
<string name="a11y_compass">Compass navigation</string>
<!-- %1$s is one of the a11y_dir_* strings, %2$s is the distance. -->
<string name="a11y_direction_with_distance">Direction to shelter: %1$s, %2$s away</string>
<string name="a11y_dir_forward">straight ahead</string>
<string name="a11y_dir_forward_right">ahead to the right</string>
<string name="a11y_dir_right">to the right</string>
<string name="a11y_dir_back_right">behind to the right</string>
<string name="a11y_dir_back">behind you</string>
<string name="a11y_dir_back_left">behind to the left</string>
<string name="a11y_dir_left">to the left</string>
<string name="a11y_dir_forward_left">ahead to the left</string>
<!-- Civil defense info -->
<string name="action_civil_defense_info">Civil defense information</string>
<string name="civil_defense_title">What to do if the alarm sounds</string>
<string name="civil_defense_step1_title">1. Important message signal</string>
<string name="civil_defense_step1_body">Three series of short blasts with one minute of silence between each series. This means: seek information immediately. Turn on DAB radio, TV, or check official sources online.</string>
<string name="civil_defense_step2_title">2. Air raid alarm</string>
<string name="civil_defense_step2_body">Short blasts lasting approximately one minute. This means immediate danger of attack — seek shelter now. Go to the nearest shelter, basement, or inner room immediately.</string>
<string name="civil_defense_step3_title">3. Go indoors and find shelter</string>
<string name="civil_defense_step3_body">Get indoors. Close all windows, doors, and ventilation openings. Use this app to find the nearest public shelter (tilfluktsrom). The compass and map work offline. If no shelter is nearby, go to a basement or an inner room away from windows.</string>
<string name="civil_defense_step4_title">4. Listen to NRK on DAB radio</string>
<string name="civil_defense_step4_body">Tune in to NRK P1 on DAB radio for official updates and instructions from authorities. DAB radio works even when mobile networks and the internet are down. Keep a battery-powered or hand-crank DAB radio as part of your emergency kit.</string>
<string name="civil_defense_step5_title">5. All clear</string>
<string name="civil_defense_step5_body">One continuous tone lasting approximately 30 seconds. The danger or attack is over. Continue to follow instructions from authorities.</string>
<string name="civil_defense_source">Source: DSB (Norwegian Directorate for Civil Protection)</string>
<!-- About -->
<string name="about_title">About Tilfluktsrom</string>
<string name="about_description">Tilfluktsrom helps you find the nearest public shelter in Norway. The app is designed to work offline after initial setup — no internet required to find shelters, navigate by compass, or share your location.</string>
<string name="about_privacy_title">Privacy</string>
<string name="about_privacy_body">This app does not collect, transmit, or share any personal data. There are no analytics, tracking, or third-party services.\n\nYour GPS location is used only on your device to find nearby shelters and is never sent to any server.</string>
<string name="about_data_title">Data sources</string>
<string name="about_data_body">Shelter data is public information from DSB (Norwegian Directorate for Civil Protection), distributed via Geonorge. Map tiles are loaded from OpenStreetMap. Both are cached locally for offline use.</string>
<string name="about_stored_title">Stored on your device</string>
<string name="about_stored_body">• Shelter database (public data from DSB)\n• Map tiles for offline use\n\nNo data leaves your device except requests to download shelter data and map tiles.</string>
<string name="about_open_source">Open source — kode.naiv.no/olemd/tilfluktsrom</string>
<string name="action_about">About this app</string>
<!-- Copyright -->
<string name="app_copyright">Copyright © Ole-Morten Duesund</string>
</resources>