Skip to content
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

Update vocabularies to use language maps #74

Closed
gkellogg opened this issue Feb 1, 2022 · 2 comments
Closed

Update vocabularies to use language maps #74

gkellogg opened this issue Feb 1, 2022 · 2 comments

Comments

@gkellogg
Copy link
Member

gkellogg commented Feb 1, 2022

This is implemented in a6d073b.

This updates numerous vocabularies to use a language-map representation for literal values, where appropriate.
Recent changes to the rdf gem (ruby-rdf/rdf@9fb42b6) allow for the use of language-maps in term definitions, for example:

property :actor,
  comment: {en: "Subproperty of as:attributedTo that identifies the primary actor"},
  domain: "https://www.w3.org/ns/activitystreams#Activity”,

Generally this change is transparent, if you use a standard accessor such as RDF::Vocab::AS.actor.comment. But, if you rely on the underlying attribute mechanism such as `RDF::Vocab::AS.actor.attributes[:comment], you will now see the language-map representation (where ‘en’, if present, will always come first)

RDF::Vocab::AS.actor.comment #=> #<RDF::Literal:0x2b84("Subproperty of as:attributedTo that identifies the primary actor"@en)>

RDF::Vocab::AS.actor.attributes[:comment] #=> {en: "Subproperty of as:attributedTo that identifies the primary actor”}

While this affects many vocabulary definitions in rdf-vocab, it adds some long missing capability to the built-in vocabulary definitions.

Without objection, this will be released in version 3.2.1 in the coming days, but as it has the potential to affect some uses of the builtin vocabularies, I wanted to call it out specifically to this group.

@gkellogg
Copy link
Member Author

gkellogg commented Feb 1, 2022

cc/ @wu-lee

@gkellogg
Copy link
Member Author

gkellogg commented Feb 8, 2022

Released in 3.2.1

@gkellogg gkellogg closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant