Merged
Conversation
4e4efc3 to
58d0ac4
Compare
Contributor
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.