feat(weather): Add localization support to Weather plugin#670
Open
saulob wants to merge 8 commits intofatihak:mainfrom
Open
feat(weather): Add localization support to Weather plugin#670saulob wants to merge 8 commits intofatihak:mainfrom
saulob wants to merge 8 commits intofatihak:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds localization to the Weather plugin by introducing a centralized locale/translation mapping and wiring language selection through backend parsing and the frontend template.
Changes:
- Added
LOCALE_DATAplus helper functions to localize current date, forecast day labels, and UI strings inweather.py. - Added a language selector to the plugin settings UI and persisted it in plugin settings.
- Updated the weather render template to use dynamic (localized) labels and a stable
dp.keyfor wind-arrow rendering.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/plugins/weather/weather.py | Introduces locale dictionary + helpers; passes language through parsing; localizes labels/date/day names. |
| src/plugins/weather/settings.html | Adds language dropdown and loads default/saved language. |
| src/plugins/weather/render/weather.html | Replaces hardcoded strings with backend-provided localized labels; uses dp.key for wind arrow conditional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 5 commits
April 11, 2026 20:53
Author
|
All Copilot review comments addressed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌍 Localization Support for Weather Plugin
This PR adds multi-language support to the Weather plugin, improving usability for non-English users.
This improves the Weather plugin UX significantly for non-English users. I focused on keeping labels short to fit small e-paper displays while maintaining clarity.
✅ Features
⚙️ Implementation
LOCALE_DATAstructureget_localized_dateget_localized_day_shortget_ui_label🎯 Notes
📸 Screenshots
Weather plugin UI is now fully localized across supported languages