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

@Nwakaego-Ego
Copy link
Copy Markdown
Collaborator

Hi @mikhailbond1 Thank you for this PR. I tested this locally on both main and 2.0. The fix works correctly on main. I noticed the same 404 existed on the 2.0 branch so I cherry-picked your commit and opened a separate PR for it here: #1394
cc @doradocodes @ksen0

@mikhailbond1
Copy link
Copy Markdown
Author

Sounds good! Thanks for checking it out and opening the separate PR for 2.0 as well.

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)

2 participants