Skip to content

Generate locales#162

Merged
drewsonne merged 1 commit intomainfrom
generate-locales
Jan 5, 2026
Merged

Generate locales#162
drewsonne merged 1 commit intomainfrom
generate-locales

Conversation

@drewsonne
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 5, 2026 19:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a code generation system for internationalization (i18n) locale files, enabling support for multiple Maya calendar orthographic conventions. The PR replaces a simple default locale with three academically-sourced locale definitions that are auto-generated from a canonical JSON data source.

Key changes:

  • Implements a locale generation script that produces TypeScript files from structured JSON data containing Maya calendar spelling variations and their scholarly sources
  • Adds three orthographic convention locales (Modern Mayanist, Modern Variant, Older 16th Century) with full bibliographic attribution
  • Integrates locale generation into the build process via a prebuild hook to ensure consistency

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/i18n/data/maya_spellings_sources.json New canonical data source containing all Maya calendar name spellings with tags and bibliographic sources
scripts/generate-locales.ts Code generator that produces TypeScript locale files from JSON, including quote escaping and documentation generation
src/i18n/locales/modern_mayanist.ts Auto-generated locale for modern epigraphic conventions (e.g., Pohp, Ik', Ak'bal)
src/i18n/locales/modern_variant.ts Auto-generated locale for common modern variant spellings (e.g., Pop, Ik', Ak'bal)
src/i18n/locales/older_16c.ts Auto-generated locale for traditional Thompson/Landa conventions (e.g., Pop, Ik, Akbal)
src/i18n/locales/default.ts Removed - replaced by generated locale files
src/i18n/i18n-manager.ts Updated to use modern_mayanist as default locale instead of 'default', includes whitespace formatting fixes
src/i18n/index.ts Updated exports to expose the three new locale definitions instead of default locale
src/tests/i18n/generated-locales.spec.ts Comprehensive test suite validating locale completeness, cross-locale consistency, normalization, and rendering
website/docs/spelling-variations.md New documentation page with tables of all spelling variations and scholarly references
website/docs/api-overview.md New API reference overview page linking to TypeDoc-generated documentation
scripts/README.md Documentation for the locale generation script and build integration
package.json Added generate:locales and prebuild scripts to automate locale generation
.github/copilot-instructions.md Updated with locale generation workflow, documentation structure, and removed outdated references
.cursor/worktrees.json Removed configuration file

@drewsonne drewsonne merged commit 649b7b6 into main Jan 5, 2026
14 checks passed
@drewsonne drewsonne deleted the generate-locales branch January 5, 2026 19:22
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