Skip to content

feat: use plural when there are several sponsors - #236

Merged
itziarZG merged 5 commits into
mainfrom
feat/sponsors-plural
Sep 8, 2026
Merged

feat: use plural when there are several sponsors#236
itziarZG merged 5 commits into
mainfrom
feat/sponsors-plural

Conversation

@gnufede

@gnufede gnufede commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 *_plural i18n keys for sponsor tiers (platinum/gold/silver/bronze) across es, en, and ca.
  • Updated the home sponsors section to choose between sponsors.<tier> and sponsors.<tier>_plural based 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.astro builds the plural key sponsors.community_plural when 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.astro builds the plural key sponsors.community_plural when 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 thread src/i18n/home.ts
Comment on lines +18 to 20
'sponsors.bronze_plural': 'Patrocinadores Bronce',
'sponsors.community': 'Comunidades Patrocinadoras',
'sponsors.none': 'No hay patrocinadores en este nivel',
@itziarZG
itziarZG merged commit 1be9182 into main Sep 8, 2026
1 check passed
@itziarZG
itziarZG deleted the feat/sponsors-plural branch September 8, 2026 20:54
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.

3 participants