Skip to content

Translate content to Spanish. Move from JSON to YAML#84

Merged
brunoborges merged 14 commits intomainfrom
yaml
Feb 26, 2026
Merged

Translate content to Spanish. Move from JSON to YAML#84
brunoborges merged 14 commits intomainfrom
yaml

Conversation

@brunoborges
Copy link
Copy Markdown
Member

This pull request migrates several "collections" topic files from JSON format to YAML format for improved readability and maintainability. Each JSON file has been fully replaced with an equivalent YAML file, with no changes to the underlying content or structure. This is a format migration only and does not alter any data or logic.

This PR also includes Spanish translation!

hallvard and others added 14 commits February 20, 2026 11:10
support yaml as format for patterns
Merged both branches into generate.java:
- YAML support: JSON_MAPPER, YAML_MAPPER, and MAPPERS for .json/.yaml/.yml
- i18n support: TRANSLATIONS_DIR, dotted token pattern, resolveSnippet, locale-aware generation
- Updated all bare MAPPER references to JSON_MAPPER

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Translation files now contain only translatable fields (title, summary,
  explanation, oldApproach, modernApproach, whyModernWins, support.description).
  The generator overlays them onto the English base, preventing divergence.
- Add difficultyDisplay token: CSS class stays as enum value, display text
  resolved from UI strings (difficulty.beginner/intermediate/advanced).
- Generator loadStrings and resolveSnippet now support .json/.yaml/.yml
  translation files via findWithExtensions/readAuto helpers.
- Update i18n spec with field translation reference table and partial-file
  approach.
- Trim existing pt-BR translation files to translatable fields only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 112 pattern definitions under content/ are now in YAML format.
The generator supports both JSON and YAML, so this is a format-only
change with identical HTML output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add es locale to locales.properties
- Create translations/strings/es.yaml with all UI strings
- Create 112 translated content files under translations/content/es/
  covering all 11 categories (language, collections, streams, etc.)
- Translation files contain only translatable fields per i18n spec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace per-locale entries with patterns that automatically match
any future locale directory (xx/ or xx-XX/) without manual updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add YAML quoting, Jackson compatibility, and validation sections
  to the i18n spec based on lessons from Spanish translation.
- Expand README contributing section with translation workflow,
  partial-file schema example, and YAML quoting warning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@brunoborges brunoborges merged commit 5e9b22c into main Feb 26, 2026
@brunoborges brunoborges deleted the yaml branch February 26, 2026 01:28
@brunoborges brunoborges added enhancement New feature or request translation labels Feb 26, 2026
@brunoborges brunoborges changed the title Move content to YAML-based structure. Add Spanish Translate content to Spanish. Move from JSON to YAML Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants