diff --git a/src/features/flights-map/components/FlightsMapStartPage.test.tsx b/src/features/flights-map/components/FlightsMapStartPage.test.tsx index d3397c45..875851ce 100644 --- a/src/features/flights-map/components/FlightsMapStartPage.test.tsx +++ b/src/features/flights-map/components/FlightsMapStartPage.test.tsx @@ -187,8 +187,10 @@ describe("FlightsMapStartPage — markers from dictionaries", () => { const mow = markers.find((m) => m["id"] === "MOW")!; expect(mow["countryType"]).toBe("ru"); expect(mow["zoomLevel"]).toBe(2); - // TZ §4.1.24.3 R24: tooltip label is the IATA city code, not the city name - expect(mow["label"]).toBe("MOW"); + // Permanent marker label is the localized city name. (The IATA code + // belongs to a separate hover tooltip per TZ §4.1.24.3 R24 — not to + // this always-visible label.) + expect(mow["label"]).toBe("Москва"); const par = markers.find((m) => m["id"] === "PAR")!; expect(par["countryType"]).toBe("other"); @@ -790,10 +792,12 @@ describe("4.1.1-R14/R21: Flight-Map first-entry toggle defaults per TZ §4.1.1", }); // --------------------------------------------------------------------------- -// TZ §4.1.24.3 R24: marker labels are IATA codes (not city names) +// Permanent marker label shows the localized city name. TZ §4.1.24.3 R24 +// prescribes the separate hover tooltip (not the always-visible label) +// as showing the IATA code. // --------------------------------------------------------------------------- -describe("§4.1.24.3 R24: map markers use IATA code as tooltip label", () => { +describe("map markers use localized city name as permanent label", () => { beforeEach(() => { lastMapCanvasProps = null; dictState.loading = false; @@ -804,7 +808,7 @@ describe("§4.1.24.3 R24: map markers use IATA code as tooltip label", () => { resetCrossSectionStore(); }); - it("4.1.24-R24: marker label equals city code (IATA), not city name", () => { + it("marker label equals the localized city name, not the IATA code", () => { dictState.dictionaries = buildDictionaries({ regions: [], countries: [], @@ -832,9 +836,8 @@ describe("§4.1.24.3 R24: map markers use IATA code as tooltip label", () => { const markers = lastMapCanvasProps!["markers"] as Array>; const mow = markers.find((m) => m["id"] === "MOW")!; - // TZ §4.1.24.3 R24: tooltip shows the IATA airport code, not the city name - expect(mow["label"]).toBe("MOW"); - expect(mow["label"]).not.toBe("Москва"); + expect(mow["label"]).toBe("Москва"); + expect(mow["label"]).not.toBe("MOW"); }); }); diff --git a/src/features/flights-map/components/FlightsMapStartPage.tsx b/src/features/flights-map/components/FlightsMapStartPage.tsx index 422c6d66..ea1d80df 100644 --- a/src/features/flights-map/components/FlightsMapStartPage.tsx +++ b/src/features/flights-map/components/FlightsMapStartPage.tsx @@ -243,10 +243,11 @@ export const FlightsMapStartPage: FC = ({ id: city.code, lat: city.location.lat, lng: city.location.lon, - // TZ §4.1.24.3 R24: hover tooltip shows the IATA airport code, not - // the city name. The city code doubles as IATA here since our - // dictionaries use IATA city codes (MOW, LED, …). - label: city.code, + // Permanent on-map label shows the localized city name (dictionary + // is loaded per current locale). TZ §4.1.24.3 R24 describes the + // separate hover tooltip as showing the IATA code; that's not the + // same element as this always-visible marker label. + label: city.name, tooltipPermanent: true, style: isHighlighted ? "orange" : "blue-small", zoomLevel: getCityZoomLevel(city.code),