From 08bddc0db679d9647fef035d56c9694889c7df84 Mon Sep 17 00:00:00 2001 From: gnezim Date: Sat, 18 Apr 2026 13:34:45 +0300 Subject: [PATCH] Translate remaining raw status labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ScheduleDetailsPage flight status: rendered raw `flight.status` (English enum 'Scheduled'); now routes through FLIGHT-STATUSES.* keys for localized Russian labels. - FlightsMiniListItem status icon aria-label: same fix, so screen readers say 'Запланирован' instead of 'Scheduled'. --- .../components/FlightsMiniList/FlightsMiniListItem.tsx | 7 ++++++- src/features/schedule/components/ScheduleDetailsPage.tsx | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/features/online-board/components/FlightsMiniList/FlightsMiniListItem.tsx b/src/features/online-board/components/FlightsMiniList/FlightsMiniListItem.tsx index cca73d22..72f474e9 100644 --- a/src/features/online-board/components/FlightsMiniList/FlightsMiniListItem.tsx +++ b/src/features/online-board/components/FlightsMiniList/FlightsMiniListItem.tsx @@ -7,6 +7,7 @@ import { forwardRef } from "react"; import { Link } from "@modern-js/runtime/router"; +import { useTranslation } from "@/i18n/provider.js"; import type { ISimpleFlight, IFlightLeg } from "../../types.js"; import { buildOnlineBoardUrl } from "../../url.js"; import "./FlightsMiniList.scss"; @@ -40,6 +41,7 @@ function getArrTime(arr: IFlightLeg["arrival"]): string { export const FlightsMiniListItem = forwardRef( ({ flight, isSelected, lang }, ref) => { + const { t } = useTranslation(); const { dep, arr } = getEndpoints(flight); const href = `/${lang}/${buildOnlineBoardUrl({ type: "details", @@ -63,7 +65,10 @@ export const FlightsMiniListItem = forwardRef
{getDepTime(dep)} - + {"\u2708"} {getArrTime(arr)} diff --git a/src/features/schedule/components/ScheduleDetailsPage.tsx b/src/features/schedule/components/ScheduleDetailsPage.tsx index ff0c6b98..90126dbb 100644 --- a/src/features/schedule/components/ScheduleDetailsPage.tsx +++ b/src/features/schedule/components/ScheduleDetailsPage.tsx @@ -146,7 +146,9 @@ export const ScheduleDetailsPage: FC = ({

{flightNumber}

- {flight.status} + + {t(`FLIGHT-STATUSES.${flight.status}`)} +