Skip to content

Fix: add localized fallback for p5.sound reference landing page#1362

Open
mikhailbond1 wants to merge 1 commit intoprocessing:mainfrom
mikhailbond1:fix/p5-sound-locale-fallback
Open

Fix: add localized fallback for p5.sound reference landing page#1362
mikhailbond1 wants to merge 1 commit intoprocessing:mainfrom
mikhailbond1:fix/p5-sound-locale-fallback

Conversation

@mikhailbond1
Copy link
Copy Markdown

Resolves #1346

Changes:

Adds a localized fallback route for the p5.sound reference landing page. Previously, /reference/p5.sound/ only existed for English. Visiting /es/reference/p5.sound/, /hi/reference/p5.sound/, /ko/reference/p5.sound/, or /zh-Hans/reference/p5.sound/ would result in a 404.

This PR adds src/pages/[locale]/reference/p5.sound.astro which generates the landing page for all non-default locales using getCollectionInLocaleWithFallbacks, falling back to English content where translations don't exist.

PR Checklist:

  • npm run lint passes
  • npm run test passes
  • npm run build & npm run preview pass

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.

Feature: Add fallback routing for localized p5.sound reference pages (currently doesn’t exist)

1 participant