feat(year_progress): add language selection for localized labels#641
Open
saulob wants to merge 3 commits intofatihak:mainfrom
Open
feat(year_progress): add language selection for localized labels#641saulob wants to merge 3 commits intofatihak:mainfrom
saulob wants to merge 3 commits intofatihak:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a self-contained language selector to the Year Progress plugin so its three static UI labels (“Progress”, “Done”, “Days left”) are rendered using plugin-localized strings.
Changes:
- Added
LOCALE_DATAtranslations and passed localized label strings into the render template parameters. - Added a plugin
settings.htmlwith a Language dropdown that persists/loads the selected language. - Updated the render HTML template to use
{{label_*}}variables instead of hardcoded English labels.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plugins/year_progress/year_progress.py | Adds locale dictionary + injects localized labels into template params based on settings["language"]. |
| src/plugins/year_progress/settings.html | Adds Language <select> and JS to initialize it from pluginSettings. |
| src/plugins/year_progress/render/year_progress.html | Replaces hardcoded labels with localized template variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Add language selection to the Year Progress plugin so the three UI labels are localized directly inside the plugin
This change keeps the implementation simple and self contained, with no external API, no extra dependency, and no remote translation source
What changed
Added a new Language setting in the plugin configuration
Added hardcoded locale labels for:
Localized only the static UI labels used by the plugin:
Kept the rest of the plugin behavior unchanged
Why hardcoded
This plugin only needs a very small and stable set of short labels, so hardcoding the translations keeps it:
Why these languages
I selected a compact set of widely used languages that makes sense for an open source project with an international audience, while keeping the settings list small and practical
The goal here was to cover common languages used by many users in community projects without overcomplicating the plugin
Notes
Screenshots
Configuration screen with the new language selector
Main screen example using Portuguese labels