Page MenuHomePhabricator

Test RTL- compatibility of FileImporter + FileExporter
Closed, ResolvedPublic3 Estimated Story Points

Description

Task:

  • Test yourself, how the FileExporter and FileImporter looks with an RTL interface, and correct the errors you find (or create tickets for them if they are super big)
  • Test with one of your colleagues who know RTL languages, if anything looks fishy to them

Where to test
Go to https://test.wikimedia.beta.wmflabs.org/wiki/Special:ImportFile and add any URL from a "real commons image" like the picture of the day.
(Note: Neither the URL-input page will be available once this is deployed, nor will you be able to actually import images from Commons. Both of this is just test set up)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@WMDE-Fisch can you add @Amire80 to the test wiki? Or (better) link the wiki here so people can test?
And thanks @Amire80!

Tobi_WMDE_SW set the point value for this task to 3.Mar 27 2018, 2:46 PM

@Amire80 I added details where to test to the task description!

Neither the URL-input page will be available once this is deployed

What does this mean exactly?

The the input box on Special:ImportFile, which includes the message fileimporter-exampleprefix in the placeholder, will not actually be part of the deployed extension? There are a couple of issues with it.

I tested it by logging in and changing my UI language to Hebrew.

A list of issues I found:

  • Not an RTL issue, at least yet, but the bug T188250 needs to be fixed to allow complete interface translation. Without complete interface it's impossible to do complete RTL testing.
  • The input box for writing an edit summary:
    • It is forced to left-to-right. This is a usual thing for MediaWiki input boxes—the direction of the wiki's content is forced on input boxes by default. The placeholder is written in Hebrew and it looks wrong. Does it need a placeholder at all? Input box place holders are always troublesome when it comes to RTL. I'd suggest taking it out of the input box completely, and writing it as a label.
    • The interface must make it clear in which language can the summary be written. If it's always for Wikimedia Commons, does it mean that it has to be in English?
  • The message under the "File history" heading says "1/1 file version will be imported." (it's not translated because of T188250). The message after the edit summary says "3 file version will be imported" (in English; I'm not sure that I back-translated it correctly). Something is confusing there. Again, maybe fixing T188250 and translating all the messages will resolve this.
  • When I actually tried to do an import, I got a MediaWiki page with the title "Internal error" (correctly localized to Hebrew), and an error message:
[WruMmwpEE4AAAAxMVJYAAAAM] /wiki/Special:ImportFile MWException from line 121 of /srv/mediawiki/php-master/includes/page/WikiPage.php: Invalid or virtual namespace -1 given.

Backtrace:

#0 /srv/mediawiki/php-master/includes/context/RequestContext.php(231): WikiPage::factory(Title)
#1 /srv/mediawiki/php-master/includes/context/DerivativeContext.php(196): RequestContext->getWikiPage()
#2 /srv/mediawiki/php-master/extensions/SpamBlacklist/includes/SpamBlacklistHooks.php(31): DerivativeContext->getWikiPage()
#3 /srv/mediawiki/php-master/includes/Hooks.php(177): SpamBlacklistHooks::filterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#4 /srv/mediawiki/php-master/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#5 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/TextRevisionValidator.php(59): Hooks::run(string, array)
#6 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(265): FileImporter\Services\TextRevisionValidator->validate(Title, User, WikitextContent, string, boolean)
#7 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(140): FileImporter\Services\Importer->validateFileInfoText(User, FileImporter\Data\ImportPlan)
#8 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(103): FileImporter\Services\Importer->importInternal(User, FileImporter\Data\ImportPlan)
#9 /srv/mediawiki/php-master/extensions/FileImporter/src/SpecialImportFile.php(283): FileImporter\Services\Importer->import(User, FileImporter\Data\ImportPlan)
#10 /srv/mediawiki/php-master/extensions/FileImporter/src/SpecialImportFile.php(177): FileImporter\SpecialImportFile->doImport(FileImporter\Data\ImportPlan)
#11 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(522): FileImporter\SpecialImportFile->execute(NULL)
#12 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#13 /srv/mediawiki/php-master/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(861): MediaWiki->performRequest()
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(524): MediaWiki->main()
#16 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#17 /srv/mediawiki/w/index.php(3): include(string)
#18 {main}

The error text is in English, but it was shown with RTL direction, which makes it hard to read. It may be a core MediaWiki issue, however.

Thanks @Amire80!

The the input box on Special:ImportFile, which includes the message fileimporter-exampleprefix in the placeholder, will not actually be part of the deployed extension? There are a couple of issues with it.

Yes. People should come through the FileExporter extension, which means they will have clicked on an "import to commons" link on a file page of their local wikipedia.

Not an RTL issue, at least yet, but the bug T188250 needs to be fixed to allow complete interface translation.

It's on our list, and even has an estimation since yesterday :)

The input box for writing an edit summary

Both very valid points, I'm going to discuss this more with WMDE-Design

The message under the "File history" heading says "1/1 file version will be imported." (it's not translated because of T188250). The message after the edit summary says "3 file version will be imported" (in English; I'm not sure that I back-translated it correctly).

The first message is about the number of file versions, while the latter one is about the number of page revisions. If you have an idea how we can make the distinction clearer, please let me know!

When I actually tried to do an import, I got a MediaWiki page with the title "Internal error" (correctly localized to Hebrew), and an error message:

That is the first time I see this error. Could you reproduce it also on non-RTL?

Thanks so much again!

When I actually tried to do an import, I got a MediaWiki page with the title "Internal error" (correctly localized to Hebrew), and an error message:

That is the first time I see this error. Could you reproduce it also on non-RTL?

Thanks so much again!

Yep:

[Wr1T5wpEE4AAAFX5DZkAAAAE] /wiki/Special:ImportFile MWException from line 121 of /srv/mediawiki/php-master/includes/page/WikiPage.php: Invalid or virtual namespace -1 given.

Backtrace:

#0 /srv/mediawiki/php-master/includes/context/RequestContext.php(231): WikiPage::factory(Title)
#1 /srv/mediawiki/php-master/includes/context/DerivativeContext.php(196): RequestContext->getWikiPage()
#2 /srv/mediawiki/php-master/extensions/SpamBlacklist/includes/SpamBlacklistHooks.php(31): DerivativeContext->getWikiPage()
#3 /srv/mediawiki/php-master/includes/Hooks.php(177): SpamBlacklistHooks::filterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#4 /srv/mediawiki/php-master/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#5 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/TextRevisionValidator.php(59): Hooks::run(string, array)
#6 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(265): FileImporter\Services\TextRevisionValidator->validate(Title, User, WikitextContent, string, boolean)
#7 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(140): FileImporter\Services\Importer->validateFileInfoText(User, FileImporter\Data\ImportPlan)
#8 /srv/mediawiki/php-master/extensions/FileImporter/src/Services/Importer.php(103): FileImporter\Services\Importer->importInternal(User, FileImporter\Data\ImportPlan)
#9 /srv/mediawiki/php-master/extensions/FileImporter/src/SpecialImportFile.php(283): FileImporter\Services\Importer->import(User, FileImporter\Data\ImportPlan)
#10 /srv/mediawiki/php-master/extensions/FileImporter/src/SpecialImportFile.php(177): FileImporter\SpecialImportFile->doImport(FileImporter\Data\ImportPlan)
#11 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(522): FileImporter\SpecialImportFile->execute(NULL)
#12 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#13 /srv/mediawiki/php-master/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(861): MediaWiki->performRequest()
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(524): MediaWiki->main()
#16 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#17 /srv/mediawiki/w/index.php(3): include(string)
#18 {main}

Hi @Amire80,

Thanks for testing! Regarding the input fields I'm not sure I understand your issue described correctly. When I tried to reproduce it by changing the interface language to arabic, I found the placeholder in the search field in the following (as I assume correct) position:

Would you provide an image of the case you were describing if it is different from what I understood so far?

BUT: We are also looking into the handlung of the input field in general again, which might change the whole input field setup and behaviour.

The search box doesn't have a problem. It's not part of FileImporter :)

The summary input box has a problem:

Note that the full stop is in the right-hand end of the box.

There's another reason not to use this placeholder. It's not actually a placeholder. A placeholder is supposed to give an example of what will be written, but this is an explanatory note. It really should be moved out of the box.

This is a usual thing for MediaWiki input boxes—the direction of the wiki's content is forced on input boxes by default.

I guess this line made me think you're talking about Mediawiki in general not just the FileImporter in specific. I'm glad, it's not a general concern. Phew!
We'll take another look into the issue after figuring out how to handle the summary field.

In general: OOUI places a label like a placeholder. So this actually is a label which is shown in the same manner as a placeholder. I'm with you, that this is confusing. This will be a task for the OOUI team to change though.

Thanks a lot for your input!

Hi @Amire80, we will remove the edit summary's placeholder as of T192756: Only show edit summary input box when you can use it and we fixed T188250: document the $1 and $2 parameters in fileimporter-textrevisions and fileimporter-filerevisions. Is there anything else that you think should be tackled related to RTL compatibility?

Lea_WMDE claimed this task.