Page MenuHomePhabricator

Wikisource Export: Translate WSExport web interface
Closed, ResolvedPublic5 Estimated Story Points

Description

As a Wikisource user, I want the WSExport page to be translatable into other languages, so that it can be used and understood by a global audience of users.

Background: Currently, the web UI is only available in English. It would be good to make it available in other languages as well.

Additional Resources:

Acceptance Criteria:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
ifried renamed this task from Translate WSExport web interface to Wikisource Export: Translate WSExport web interface.Oct 15 2020, 10:13 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)

@Prtksxna Hello! We need a basic logo for WSExport in order to request translations on translatewiki. It can be very quick/basic. Just wanted to ping you, in case you have any ideas. Thanks!

@ifried As a quick one, what about the official Wikisource logo? Maybe combined with an arrow symbolizing download. (I hope this doesn’t violate Wikimedia’s trademark.) Not being able to translate the website just because no one came up with a logo is quite disappointing…

Before registering with TranslateWiki (and needing a logo) we need to do the work to make the interface translatable — we could start work on that now. Also, possibly T266579 should be resolved before we register with TranslateWiki (although probably it works fine with redirected repositories).

ifried set the point value for this task to 5.Feb 5 2021, 1:01 AM

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

This doesn't do 100% of the translating, but I think we can get the basic stuff sorted out and then iterate, so we can get it onto TranslateWiki quicker (see T273947). The main thing left out is the statistics page.

@Samwilson Is there a way to set the current translation language of the tool?

On my local install, I have tried adding an fr.json file to i18n/ and going to localhost?lang=fr, but it did not seem to work.

Yep, there's the uselang param, e.g.: https://ws-export.wmcloud.org/?uselang=qqx

I'm not sure what we want the interaction to be between that and the existing lang parameter that sets the Wikisource. Possibly it could also be used to set the interface language.

The interface language is also set via the HTTP accept header, so most people should get it in their own language without doing anything.

@MusikAnimal raised the point that we don't display any way to switch languages; possibly that needs to be added (e.g. a dropdown list somewhere). Functionality for that could probably be added to the bundle, so it could be used in all our tools.

Yep, there's the uselang param, e.g.: https://ws-export.wmcloud.org/?uselang=qqx

Ah, of course! Thanks.

Just like on MediaWiki, WS Export now has .json files which contain the translations for each language. At the moment, we only have en.json.

On my local version of WS Export, I made a few of my own translation files so I could check that they were used.

I also checked that, when the translation for a particular word/phrase did not exist in the translation file, we fall back. The fall back chain appears to follow that of MediaWiki (see https://www.mediawiki.org/wiki/Manual:Language#Fallback_languages). So, if an Aymaran translation did not have something translated it fell back to Spanish. If Spanish did not have it translated it fell back to English.

We appear to translate almost everything on the main form. I think we are not translating some of the error messages (e.g. Page not found for: <page>). As Sam points out, the statistics page is not translated.

Test Environment: local docker WS Export commit 13f8c32d37cdd407cadba4f580277371c51a6327.

ifried closed this task as Resolved.EditedFeb 12 2021, 10:46 PM

This has been deployed to production, so I'm marking this ticket as Done.

Regarding the question of the WS Export logo, thank you for submitting the suggestion, @Tacsipacsi! The usage of the general Wikisource logo looks good to me, whenever we do end up needing it for translation purposes. @Samwilson & @Prtksxna, do you think that sounds good, or do you have any concerns/think we need a separate logo for WS Export?

Sorry, I should've linked it here too; in the subticket we went with this logo: https://translatewiki.net/wiki/File:Ws-export_logo.svg

It can easily be changed though.