Skip to content

Add Spanish translations for categories, sectors, and workshop titles#1359

Open
maebeale wants to merge 1 commit intomainfrom
maebeale/spanish-translations
Open

Add Spanish translations for categories, sectors, and workshop titles#1359
maebeale wants to merge 1 commit intomainfrom
maebeale/spanish-translations

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 7, 2026

What is the goal of this PR and why is this important?

  • Workshop tags (categories, sectors) and titles currently only display in English, even when viewing the Spanish tab
  • This adds name_spanish to categories, sectors, and category_types, and title_spanish to workshops
  • When a workshop is viewed in Spanish mode, tags and title now display their Spanish translations (falling back to English when blank)

How did you approach the change?

  • Added name_spanish column to categories, sectors, and category_types tables
  • Added title_spanish column to workshops table
  • Updated admin forms and show pages to expose the new Spanish fields
  • Updated tagging label partials to accept a spanish flag and conditionally display the Spanish name
  • Moved tag rendering from above the English/Spanish tabs into each tab's content div, so switching tabs naturally shows the correct language
  • Spanish title renders as an <h2> inside the Spanish tab content (only when present)
  • Updated decorators with title_spanish / detail_spanish methods that fall back to English
  • Updated has_spanish_fields? to also check title_spanish
  • All strong params updated across controllers

UI Testing Checklist

  • Workshop show page: verify tags appear inside the English tab
  • Workshop show page: switch to Español tab and verify Spanish tags and title display
  • Workshop show page: verify fallback to English when no Spanish translations exist
  • Category admin: verify Name (Spanish) field on new/edit forms and show page
  • Sector admin: verify Name (Spanish) field on new/edit forms and show page
  • Category type admin: verify Name (Spanish) field on new/edit forms and show page
  • Workshop edit: verify Title (Spanish) field in the Spanish Translations section

Anything else to add?

  • Consistent with existing _spanish suffix column pattern used by workshop content fields
  • No data migration needed — all Spanish fields are nullable and fall back gracefully

🤖 Generated with Claude Code

… workshop titles

Support name_spanish on categories, sectors, and category_types so tags
display translated names when viewing the workshop Spanish tab. Also adds
title_spanish to workshops, shown as a heading inside the Spanish tab.

Tags are now rendered inside each tab content div (English and Spanish)
instead of above the tabs, so switching tabs naturally toggles the
correct language. All Spanish fields fall back to English when blank.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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