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

Fallback language #10

Open
dominiclooser opened this issue May 8, 2020 · 2 comments
Open

Fallback language #10

dominiclooser opened this issue May 8, 2020 · 2 comments

Comments

@dominiclooser
Copy link
Contributor

There are items without a label in a specific language. For example, https://www.wikidata.org/wiki/Q86924750 does not have a label in German. If I specify German, I don't a label back.

It would be nice to have a fallback-language. Perhaps use english as default?

I'm not sure what's the way to go forward, but some kind of solution would be really nice.

@lisongx
Copy link
Owner

lisongx commented May 8, 2020

Hi Dominic,

Thanks for using this and reporting this issue! ❤️

That do sounds like a real issue, would something like a comma-separated value as an attribute would work?
For example, this is what we have for the wd-link, see the site attribute here:

<a is="wd-link" entity-id="Q80" site="zhwikiquote, enwikiquote">
  Tim's quote
</a>

We can easily add something for the wd-entity, and the API would also be sort of consistent in a way

<wd-entity entity-id="Q42" description lang="en, de, zh, ja"/>

Does this sound like a good way for you as a user?

But I do have an issue personally when I try to use one of the wd-link another day, imagine all the label you specify is not there (for example what if Q42 doesn't have en, de, zh, ja), it's not clear what we should render in this case! Maybe the user can provide a default content? or even a javascript event so the user can hookup some complex logic?

I'm wondering if you have any thought around this. Thanks so much for using this!

@dominiclooser
Copy link
Contributor Author

I like the version with the commas. I was asking myself if I prefer spaces (like with class attributes), but I guess I prefer commas.

Here the language fallback is discussed: https://meta.wikimedia.org/wiki/Wikidata/Notes/Language_fallback (I haven't read it yet). I think it would be good, if Wikidata would give a last fallback. Perhaps trying English if everything else fails?

There is for sure much space for improvement, but the fallback list alone would help a lot already.

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

No branches or pull requests

2 participants