-
Notifications
You must be signed in to change notification settings - Fork 10
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
Namespaces for the Vocabulary code #2118
Comments
Just to note, API wise it will probably be easier to refactor towards & implement something like |
pgwillia
added a commit
that referenced
this issue
Feb 25, 2021
…ries ## Context We're going to be adding digitization which will have it's own controlled vocabulary. First we move everything ERA to it's own namespace. Related to #2118 ## What's New 1. Changed API From `translate_uri(vocab, uri)` To `translate_uri(namespace, vocab, uri)` And From `humanize_uri(vocab, uri)` To `humanize_uri(namespace, vocab, uri)` And From `validates :languages, presence: true, uri: { in_vocabulary: :language }` or `validates :license, uri: { namespace: :era, in_vocabularies: [:license, :old_license] }` To `validates :languages, presence: true, uri: { namespace: :era, in_vocabulary: :language }` or `validates :license, uri: { namespace: :era, in_vocabularies: [:license, :old_license] }` 2. Added `:era` namespace * config/controlled_vocabularies * config/locales/en.yml#controlled_vocabularies
This is now done with that PR I believe? |
Yes! |
23 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just as a general note, let's add a ticket to the backlog to introduce the concept of "namespaces" to the vocabulary code and these validators, to clean up the prefix everywhere.
Originally posted by @mbarnett in #2089 (comment)
Before
validates :rights, presence: true, uri: { in_vocabulary: :digitization_rights }
After
validates :rights, presence: true, uri: { namespace: :digitization, in_vocabulary: :rights }
Before
CONTROLLED_VOCABULARIES[:digitization_resource_type].txt
After
Digitization::CONTROLLED_VOCABULARIES[:resource_type].txt
The text was updated successfully, but these errors were encountered: