Skip to content

Simplify locale: use single struct hierachy with optional fields#330

Merged
tolik518 merged 6 commits intotolik518:masterfrom
Aras14HD:simplify-locale
Mar 8, 2026
Merged

Simplify locale: use single struct hierachy with optional fields#330
tolik518 merged 6 commits intotolik518:masterfrom
Aras14HD:simplify-locale

Conversation

@Aras14HD
Copy link
Collaborator

@Aras14HD Aras14HD commented Mar 1, 2026

Currently Locale is quite unwieldy. If one wants to add a single field, they have to make a new module, copy the struct with the field, add it, copy the struct that is in, change it and so on until Locale. Then they have to add these structs to the helper enums and add the get/set_field macro invocations.

This architecture was chosen to have locale versions. I feel that there is too little benefit in having versions to justify this complexity.

With these changes, that replace the versions with simple optional fields, we save 240 lines in locale.

@tolik518
Copy link
Owner

tolik518 commented Mar 1, 2026

The changed lines looked scary before I've seen the changes :D

I'll QA all the open PRs sometime next week as I'm currently in the middle of moving and I don't have internet in my new flat yet.

If something critical happens in my absence, feel free to merge fixes

I'll still lurk here, but only on the phone

@tolik518
Copy link
Owner

tolik518 commented Mar 7, 2026

Looks good from what I've seen. After #327 was merged I'll merge this one

@tolik518 tolik518 merged commit c810038 into tolik518:master Mar 8, 2026
6 checks passed
@Aras14HD Aras14HD deleted the simplify-locale branch March 11, 2026 13:01
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