Skip to content

feat(cms): make navigation menus translatable via Strapi i18n [INTORG-587]#197

Open
Infi-Knight wants to merge 4 commits intostagingfrom
ravi/intorg-587
Open

feat(cms): make navigation menus translatable via Strapi i18n [INTORG-587]#197
Infi-Knight wants to merge 4 commits intostagingfrom
ravi/intorg-587

Conversation

@Infi-Knight
Copy link
Copy Markdown
Contributor

@Infi-Knight Infi-Knight commented Apr 9, 2026

Summary

Enables editors to manage Spanish (ES) labels and links for Foundation and Summit navigation menus directly in Strapi's admin UI.

Changes:

  • Enable i18n.localized on Foundation Navigation and Summit Navigation Strapi schemas
  • Update navigation lifecycle to export per-locale JSON files (.en.json, .es.json) instead of a single file
  • Falls back to EN content when no locale-specific translation exists
  • Add src/utils/navigation.ts utility for Astro to load locale-aware menu data based on routeLocale
  • Update FoundationHeader and SummitHeader to read the current locale and load the correct navigation
  • Add unit tests (23 passing) for sanitize functions and locale path derivation

Related Issue

Fixes INTORG-587

Manual Test

  1. Run pnpm start and visit / verify EN Foundation header renders all nav groups
  2. Visit /es/sobre-nosotros verify header renders (labels same as EN until ES content is edited)
  3. Visit /summit and /es/summit verify Summit header renders correctly
  4. Edit src/config/foundation-navigation.es.json, change a label (e.g. "Foundation" → "Fundación") verify /es/ pages show the updated label while / stays English
  5. In Strapi admin, open Foundation Navigation → verify "Locales" dropdown shows "English (en)" and "Create Spanish (es) locale"
  6. Same check for Summit Navigation

Screenshots

es-about foundation-header-en strapi-foundation-nav strapi-locale-options strapi-summit-locale summit-header-en summit-header-es

Checks

  • pnpm run format
  • pnpm run lint

PR Checklist

  • PR title follows Conventional Commits
  • Linked issue included
  • Scope is focused (14 files changed)
  • Screenshots for UI changes

…-587]

Enable editors to manage Spanish (ES) labels and links for the
Foundation and Summit navigation menus directly in Strapi's admin UI.

- Add i18n localized plugin options to both navigation content type schemas
- Update navigation lifecycle to export per-locale JSON files (.en.json, .es.json)
- Add locale parameter to Strapi findFirst type definition
- Create navigation utility for Astro to load locale-aware menu data
- Update FoundationHeader and SummitHeader to read routeLocale and
  select the correct navigation JSON
- Add unit tests for sanitize functions and locale path derivation
- Remove old non-localized navigation JSON files
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 9, 2026

Deploy Preview for interledger-org-v5 ready!

Name Link
🔨 Latest commit 70b42bc
🔍 Latest deploy log https://app.netlify.com/projects/interledger-org-v5/deploys/69d7953410d5720008fa71c6
😎 Deploy Preview https://deploy-preview-197--interledger-org-v5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Infi-Knight Infi-Knight self-assigned this Apr 9, 2026
Integrate staging's exportAndCommitNavigation helper and afterUpdate
hook with per-locale export logic from this branch.
@JonathanMatthey
Copy link
Copy Markdown
Collaborator

check out spanish menu with cta button on summit - seems to have 2 links

image

@JonathanMatthey
Copy link
Copy Markdown
Collaborator

image

i have no cta set

but i see one

image

@JonathanMatthey
Copy link
Copy Markdown
Collaborator

sync script broken

➜ cms git:(ravi/intorg-587) ✗ pnpm sync:navigation --force

interledger-cms@0.1.0 sync:navigation /Users/jxm/dev/interleger/interledger.org-v5/cms
tsx scripts/sync-navigation.ts --force

[dotenv@17.3.1] injecting env (16) from ../.env -- tip: ⚙️ write to custom object with { processEnv: myObject }

❌ Fatal error: Config file not found: /Users/jxm/dev/interleger/interledger.org-v5/src/config/foundation-navigation.json
 ELIFECYCLE  Command failed with exit code 1.

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.

2 participants