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

Add section on setting the text direction #137

Merged
merged 4 commits into from
Dec 18, 2023
Merged

Conversation

fsteeg
Copy link
Member

@fsteeg fsteeg commented Sep 13, 2023

For details see #126 (where each item links to the relevant part of the W3C i18n docs).

@fsteeg fsteeg requested a review from wetneb September 13, 2023 14:02
Copy link
Member

@wetneb wetneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I wonder if we should add this field to the JSON schemas (and similarly the language field) or if it is just noise. Maybe it would be nice to have some examples use this (also to illustrate the inheritance described)?

@fsteeg
Copy link
Member Author

fsteeg commented Sep 14, 2023

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
Copy link
Member Author

fsteeg commented Sep 14, 2023

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).

@fsteeg fsteeg merged commit 9a0f2c0 into 125-language Dec 18, 2023
@fsteeg fsteeg deleted the 126-text-direction branch December 18, 2023 10:30
fsteeg added a commit that referenced this pull request Dec 18, 2023
To actually merge #137, which had `125-language` as base when merged
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