Skip to content

issue-1386: Improved unit translation support for next hour forecast#1387

Merged
geosaaga merged 1 commit into
mainfrom
feature/1386-unit-translations-in-vertical-layout
Jun 24, 2026
Merged

issue-1386: Improved unit translation support for next hour forecast#1387
geosaaga merged 1 commit into
mainfrom
feature/1386-unit-translations-in-vertical-layout

Conversation

@geosaaga

Copy link
Copy Markdown
Collaborator

Closes #1386

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #1386 by ensuring unit abbreviations are translated via the unitAbbreviations i18n namespace (instead of being rendered as raw unit strings) in next-hour and vertical forecast UI components.

Changes:

  • Updated multiple forecast components to render units using t(\unitAbbreviations:${unitAbb}`)` (temperature, wind, precipitation).
  • Aligned unit rendering across next-hour forecast panels/bars and the vertical 10-day forecast precipitation row.
  • Updated i18n mocks in relevant unit tests so unitAbbreviations:* resolves to the unit key (e.g., C) for assertions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/weather/NextHourForecastPanelWithWeatherBackground.tsx Translate displayed temperature unit abbreviation via unitAbbreviations namespace.
src/components/weather/forecast/Vertical10DaysForecast.tsx Translate displayed precipitation unit abbreviation in the vertical 10-day list row.
src/components/weather/forecast/NextHourForecastBar.tsx Translate displayed wind/precipitation/temperature unit abbreviations in the next-hour bar.
src/components/weather/forecast/HourForecast.tsx Translate displayed temperature unit abbreviation in the hourly forecast item.
__tests__/components/NextHourForecastPanelWithWeatherBackground.test.tsx Adjust t mock to return unit abbreviations for unitAbbreviations:* keys.
__tests__/components/HourForecast.test.tsx Adjust t mock to return unit abbreviations for unitAbbreviations:* keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geosaaga geosaaga merged commit 99646b6 into main Jun 24, 2026
3 checks passed
@geosaaga geosaaga deleted the feature/1386-unit-translations-in-vertical-layout branch June 24, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix unit translations in vertical-layout

2 participants