Skip to content

Support multi-language role and acknowledgments.text in institutions data - #55

Merged
Creylay merged 1 commit into
mainfrom
feat/institutions-i18n-role-ack
Jul 20, 2026
Merged

Support multi-language role and acknowledgments.text in institutions data#55
Creylay merged 1 commit into
mainfrom
feat/institutions-i18n-role-ack

Conversation

@Creylay

@Creylay Creylay commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

institutions.json (source of truth in DashAI's docs/static/institutions/institutions.json) changed role and acknowledgments.text from plain strings to per-language objects (en, es, pt, de, zh). This updates the website's types and consumers to resolve the correct locale at render time, with a fallback to English for any locale not present in the data.

Changes by file

  • lib/institutions.ts

    • Added SupportedLang ('en' | 'es' | 'pt' | 'de' | 'zh') and LocalizedText types.
    • Institution.role and acknowledgments.text now typed as LocalizedText instead of string.
    • Added resolveLocalized() helper (resolves by locale, falls back to `e
    • Added getInstitutionRole(institution, lang) to resolve an institution's localized role.
    • getAcknowledgmentsText() now accepts any locale string and uses the same fallback logic.
  • components/community/InstitutionsGrid.tsx

    • Resolves inst.role to a string via getInstitutionRole(inst, lang) using the current i18n.language, before merging with funder logos (unchanged, already resolved via
      t(...)).
  • components/community/routes/AboutRoute.tsx

    • Removed the manual es/pt/en ternary for language selection; now passes i18n.language directly to getAcknowledgmentsText, since fallback handling lives centrally in
      lib/institutions.ts.
  • lib/institutions-data.json

    • Refreshed cached data pulled from the updated upstream institutions.jsowledgments.text now as per-language objects (en, es, pt, de,zh).

Test

Manually check /home and /about in es, en, pt, de, zh to confirm institution roles and acknowledgments text render correctly per locale.

@Creylay
Creylay merged commit 0370f12 into main Jul 20, 2026
2 of 3 checks passed
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.

1 participant