-
Notifications
You must be signed in to change notification settings - Fork 28
Normalize and validate region, language, and type field values in entries.json #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying awesome-digital-history with
|
| Latest commit: |
26ffaf6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aaa55e2f.awesome-digital-history.pages.dev |
| Branch Preview URL: | https://copilot-fix-8cbed246-a437-47.awesome-digital-history.pages.dev |
Co-authored-by: maehr <[email protected]>
…d type fields Co-authored-by: maehr <[email protected]>
|
@copilot Fix the following
|
…r Dendi (ddn) Co-authored-by: maehr <[email protected]>
Fixed both issues in commit beea858: ✅ Country names are now capitalized: "Switzerland", "Germany", "Great Britain", "North America", etc. All 131 entries have been updated and validation passes with zero errors. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
|
@copilot do not use hacky (hard coded) case statements but improve the logic of the normalization for region and language |
…elper functions Co-authored-by: maehr <[email protected]>
Refactored the normalization logic in commit 1dc20c0: ✅ Removed hardcoded case statements for both region and language normalization
✅ Benefits:
|
Changes implemented:
✅ Improved Normalization Logic: Replaced hardcoded case statements with reusable helper functions:
capitalizeRegionName(): Generic function that capitalizes any region name (title case)normalizeLanguageCode(): Lookup-based function usinglanguageCodeMappingsobject✅ Field Normalization:
✅ Validation System: Updated validation with new approach while maintaining all standards
✅ Data Consistency: All 131 entries remain properly normalized with zero validation errors
✅ Quality Assurance: All changes pass linting and formatting checks, full backwards compatibility maintained
The refactored code is now more maintainable, extensible, and follows better software engineering practices while producing identical results.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.