reconciliation-api / specs

Specifications of the reconciliation API
https://reconciliation-api.github.io/specs/draft/
30 stars 9 forks source link

Add section on setting the text direction #137

Closed fsteeg closed 6 months ago

fsteeg commented 10 months ago

For details see https://github.com/reconciliation-api/specs/issues/126 (where each item links to the relevant part of the W3C i18n docs).

fsteeg commented 10 months ago

Yes, not sure about the schemas too, we have lang in a sample and it validates. For dir in a manifest: we currently have real-world sample manifests, so it would be weird to add it to an existing, or making one up. The manifest schema does not forbid additionalProperties, so manifests with dir validate. I don't think the schemas need to be something like a full spec of whats allowed in an element.

For the full example of dir and inheritance, I did try to come up with something similar to the lang example, but could not find anything useful in our GND data (from what I understand, setting the base direction is required when mixing left-to-right and right-to-left strings). I tried constructing a data extension request against the Wikidata reconciliation endpoint (basically: give me the Persian label for 'Yahoo!'), but did not get that to work (the label itself is not a property? [1]). In the end I was happy with the little inline 'Yahoo!' example, in particular since the inheritance mechanism works just like lang, for which we have the full example.

[1] Tried smth. like this: https://wikidata.reconci.link/fa/api?extend={%22ids%22%3A[%22Q37093%22]%2C%22properties%22%3A[{%22id%22%3A%22P2561%22}]}

fsteeg commented 10 months ago

With help from @wetneb in today's meeting I was able to come up with an example in ea79f96 (based on a Wikidata extension query, which looks a bit different but would actually require setting a dir to render correctly).