-
-
Notifications
You must be signed in to change notification settings - Fork 140
feat: add i18n support to compare page #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
wojtekmaj
commented
Jan 31, 2026

|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds i18n support for the compare page by moving facet labels/descriptions (and some value strings) into locale dictionaries and wiring translation into the compare UI + comparison composable.
Changes:
- Replaced hardcoded facet labels/descriptions with i18n keys (via
getFacetLabelKey/getFacetDescriptionKey). - Added compare facet
items+valuestranslations to locale JSON files (en/pl). - Updated
usePackageComparisonto accept an i18n translate function for value display strings.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/nuxt/components/compare/FacetSelector.spec.ts | Updates assertions to account for translated facet labels. |
| shared/types/comparison.ts | Removes hardcoded label/description fields and adds i18n key helpers for facets. |
| app/pages/compare.vue | Uses i18n for facet labels/descriptions and passes t into usePackageComparison. |
| app/composables/usePackageComparison.ts | Translates certain computed facet value display strings via injected t. |
| app/components/compare/FacetSelector.vue | Uses i18n keys for button labels, aria-labels, and descriptions/tooltips. |
| i18n/locales/en.json | Adds compare facet items and values translation entries. |
| i18n/locales/en-US.json | Adds compare facet items and values translation entries (currently duplicates en.json). |
| i18n/locales/pl-PL.json | Adds Polish compare facet items and values translation entries. |
| lunaria/files/en-US.json | Adds compare facet items and values entries for Lunaria source locale. |
| lunaria/files/pl-PL.json | Adds Polish compare facet items and values entries for Lunaria. |
a1100de to
8833c2d
Compare
|
Personally, I think translations should always be done in separate PRs to keep the scope clean. But since it's already here, I don't see a reason to remove them again (just for the future) 😉 |
I fully get that - I was kind of forced to write at least one translation to be able to even see if I didn't miss anything though! That was a tough one to i18n! |
Ah, that's a valid reason actually. Then it's very beneficial to be multilingual 😅 Bravo 👏 |