Page MenuHomePhabricator

Wikisource: How can communities choose default fonts for download button?
Closed, ResolvedPublic3 Estimated Story Points

Description

As a Wikisource user, I want book downloads to use the font that is most suitable for my language community, so I can read books that are properly supported and rendered.

Background: Users want a way to select which font is best for their language. So, for example, if I am on Hindi Wikisource and I click the blue download button & then choose to download a book, the book should be in the font that the community decided is best for the Hindi language. Right now, there is no way for the community to easily share their decision and then communicate that decision to someone that can make it the default font. So, we should see what we can do to make this possible.

Acceptance Criteria:

  • Implement a means for Wikisource community members to either:
    • Specify & configure the appropriate font for their community themselves
    • OR have a way of letting us know what is the recommended font, and we would then make that the font the default choice ourselves

Event Timeline

ARamirez_WMF set the point value for this task to 3.Feb 11 2021, 6:14 PM
ifried updated the task description. (Show Details)

I suggest we add MediaWiki:WS_Export.json and use it to store the font name, and then the tool can retrieve that page and use the correct font. Then, each Wikisource can set their own font (or ask us to set it for them).

This is somewhat at odds with the existing MediaWiki:Wsexport i18n.ini pages, but in T264699 we're going to remove those.

Does this sound okay?

Example config page: https://en.wikisource.beta.wmflabs.org/wiki/MediaWiki:WS_Export.json

The following languages will need their default font set to 'FreeSerif': 'fr', 'en', 'de', 'it', 'es', 'pt', 'vec', 'pl', 'nl', 'fa', 'he', 'ar', 'zh', 'jp', 'kr' — if they're to match the status quo, that is.

PR: https://github.com/wikimedia/ws-export/pull/331

I suggest we add MediaWiki:WS_Export.json and use it to store the font name, and then the tool can retrieve that page and use the correct font. Then, each Wikisource can set their own font (or ask us to set it for them).

This is somewhat at odds with the existing MediaWiki:Wsexport i18n.ini pages, but in T264699 we're going to remove those.

Does this sound okay?

Sounds good to me

The following languages will need their default font set to 'FreeSerif': 'fr', 'en', 'de', 'it', 'es', 'pt', 'vec', 'pl', 'nl', 'fa', 'he', 'ar', 'zh', 'jp', 'kr' — if they're to match the status quo, that is.

I of course meant "Wikis other than the following…"!

The patch is now merged, and I'll get to work creating the on-wiki config pages.

(Oops, I hit submit too soon on the above comment.)

I accidentally put the config at the wrong locations on the above six wikis. I've put the correct ones in and asked that the wrong ones be deleted. Sorry for the mess!

All on-wiki config pages have been created. We only added them for Wikisources that use non-latin writing systems.

This should be good to release now.

dom_walden subscribed.

If I use the download links on, say, https://gu.wikisource.org the font "FreeSerif" is included in the Epub (because that is how it is configured).

Similarly, if I go to https://ws-export-test.wmcloud.org/?lang=gu I see "FreeSerif" is already selected in the dropdown.

Test Environment: https://ws-export-test.wmcloud.org version 2.5.0-7-g5ba7d68.

As Dom mentioned, we can see an example of the font selection configuration, which shows up in the download. I'm marking this work as Done.