Skip to content

feat: make enum label/description overridable#2594

Merged
zachdaniel merged 1 commit intoash-project:mainfrom
zebbra:feat/enum-overridable
Feb 27, 2026
Merged

feat: make enum label/description overridable#2594
zachdaniel merged 1 commit intoash-project:mainfrom
zebbra:feat/enum-overridable

Conversation

@hwuethrich
Copy link
Copy Markdown
Contributor

Make label/1 and description/1 overridable for Ash.Type.Enum.

Also added an example in the docs how to use this to translate labels using Gettext. Maybe this is a bit verbose and hacky (only works if the default locale msgid == msgstr), but this is what we use it for.

This is a follow-up for #2172 and #2222

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@zachdaniel zachdaniel merged commit 0a43e79 into ash-project:main Feb 27, 2026
45 checks passed
@zachdaniel
Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

celeste-wahlquist pushed a commit to celeste-wahlquist/ash that referenced this pull request Mar 11, 2026
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