Skip to content

labelForType should look up loaded labels #176

Description

@jg10-mastodon-social

In pos-type-index-entries, type URLs with the same ending get the same label, e.g. http://www.w3.org/ns/iana/media-types/text/plain#Resource, http://www.w3.org/ns/iana/media-types/text/markdown#Resource both appear as "Resource".
The user can still distinguish them by expanding the label to show the uri or by looking at what resources are linked.

This behaviour is implemented in
https://github.com/pod-os/PodOS/blob/main/core/src/thing/labelForType.ts

While this particular case could be resolved with additional logic, it would be preferable for labelForType to look for labels that are already present in the store.
It would therefore become possible for the type index itself to therefore provide local labels, e.g.
<http://www.w3.org/ns/iana/media-types/text/plain#Resource> rdfs:label "Text files"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions