feat: use plural when there are several sponsors - #236
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The UI now selects sponsors.community_plural when there are multiple community sponsors, but that translation key is missing in all locales, causing the community tier title to render empty/undefined.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the sponsors section to display tier titles in singular vs plural depending on how many sponsors exist in each tier, aligning the UI copy with the actual sponsor counts.
Changes:
- Added new
*_plurali18n keys for sponsor tiers (platinum/gold/silver/bronze) acrosses,en, andca. - Updated the home sponsors section to choose between
sponsors.<tier>andsponsors.<tier>_pluralbased on the number of sponsors in that tier.
File summaries
| File | Description |
|---|---|
| src/i18n/home.ts | Adds plural tier labels used by the sponsors section; currently missing sponsors.community_plural needed by the new selection logic. |
| src/components/home/SectionSponsors.astro | Switches sponsor tier heading key based on sponsor count (> 1 uses the _plural key). |
Review details
Suppressed comments (2)
src/i18n/home.ts:65
SectionSponsors.astrobuilds the plural keysponsors.community_pluralwhen there is more than one community sponsor, but this locale block doesn't define that key, so the group title will render empty/undefined for the community tier.
'sponsors.bronze': 'Bronze Sponsor',
'sponsors.bronze_plural': 'Bronze Sponsors',
'sponsors.community': 'Sponsoring Communities',
'sponsors.none': 'No sponsors in this tier',
src/i18n/home.ts:112
SectionSponsors.astrobuilds the plural keysponsors.community_pluralwhen there is more than one community sponsor, but this locale block doesn't define that key, so the group title will render empty/undefined for the community tier.
'sponsors.bronze': 'Patrocinador Bronze',
'sponsors.bronze_plural': 'Patrocinadors Bronze',
'sponsors.community': 'Comunitats Patrocinadores',
'sponsors.none': 'No hi ha patrocinadors en aquest nivell',
'sponsors.altlogo': 'Logo de {name}',
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+18
to
20
| 'sponsors.bronze_plural': 'Patrocinadores Bronce', | ||
| 'sponsors.community': 'Comunidades Patrocinadoras', | ||
| 'sponsors.none': 'No hay patrocinadores en este nivel', |
itziarZG
approved these changes
Sep 8, 2026
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.
No description provided.