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

Handle mul wikisource pages #14

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

Parthiv-M
Copy link

Modify Wikidata query to include
mul wikisource and handle it in
related methods as well

Bug: T345325

Parthiv added 2 commits September 1, 2023 20:43
Modify Wikidata query to include
mul wikisource and handle it in
related methods as well

Bug: T345325
@samwilson
Copy link
Member

With this, WikisourceApi::fetchWikisources() returns a lot of duplicates for mul, e.g. the output of examples/list.php includes the following:

* pa - ਪੰਜਾਬੀ - Q28861316
* ml - മലയാളം - Q22004659
* li - Limburgs - Q24577674
* mul - لغات متعددة - Q18198097
* mul - distintes llingües - Q18198097
* mul - çoxdilli - Q18198097
* mul - бер нисә тел - Q18198097
* mul - некалькі моў - Q18198097
* mul - некалькі моваў - Q18198097

It's slightly odd, because this library never really thought about Multilingual Wikisource to start with (sorry! that's my fault), and so it has a language code and name for each Wikisource (e.g. Wikisource::$langName). For Multilingual Wikisource these should probably return mul and a localised name, perhaps from multiple languages (Q20923490). That's not particularly satisfactory, but do you think it'll make sense enough? Either that, or we could explicitly separate mulwikisource from the others, so consuming code would have to change.

@Parthiv-M
Copy link
Author

Ah, I did see this in the output, but was not sure what to make of it.

I'm not entirely sure I get what you mean by localised name. Does that mean we don't need to show the names некалькі моў, некалькі моваў, etc.?

How would the output be formatted then?

src/WikisourceApi.php Outdated Show resolved Hide resolved
src/WikisourceApi.php Outdated Show resolved Hide resolved
src/WikisourceApi.php Outdated Show resolved Hide resolved
src/WikisourceApi.php Outdated Show resolved Hide resolved
src/WikisourceApi.php Outdated Show resolved Hide resolved
@samwilson samwilson merged commit c52f260 into wikisource:master Sep 18, 2023
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