diff --git a/README.md b/README.md index ec8985a..a68dddb 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,19 @@ trips/ └── README.md ``` +## Navigation & languages + +The main dashboard links directly to the flight price watcher from the desktop navigation, hero actions, Flights essentials card and mobile navigation. + +The dashboard and flight-price page share `i18n.js` with these languages: + +- English +- Tiếng Việt +- 中文 (Simplified Chinese) +- 日本語 + +The selected language is stored in `localStorage` as `travel-language`; otherwise the browser language is detected automatically. + ## Local development ```bash diff --git a/flights.html b/flights.html index e164025..58f75a7 100644 --- a/flights.html +++ b/flights.html @@ -49,5 +49,6 @@ async function load(){try{const [data,history]=await Promise.all([fetch(`./data/flights.json?t=${Date.now()}`,{cache:'no-store'}).then(r=>{if(!r.ok)throw new Error('flights.json unavailable');return r.json()}),fetch(`./data/flight-history.json?t=${Date.now()}`,{cache:'no-store'}).then(r=>r.ok?r.json():[]).catch(()=>[])]);LIVE=data;HISTORY=Array.isArray(history)?history:[];$('#searchMeta').textContent=`${data.search?.route_label||'Flight search'} · ${data.search?.passengers?.label||''}`;if(data.status!=='ok'){ $('#cheapest').textContent=data.status==='no_results'?'No results':'Setup needed';$('#cheapestMeta').textContent=data.disclaimer||'Run the GitHub Action after adding the SerpApi key.';$('#freshness').textContent=data.generated_at?'Checked · no matching itinerary':'Waiting for first live check';$('#lastChecked').textContent=data.generated_at?`Last checked: ${dt(data.generated_at)}`:'Last checked: —';$('#comparison').innerHTML='
SERPAPI_API_KEY, merge this PR, then run Update live flight prices from GitHub Actions.