Page MenuHomePhabricator

Supporting RTL direction in the Special:PageMigration
Closed, ResolvedPublic

Description

The page Special:PageMigration provided by MediaWiki's Translate extension lacks support for RTL (Right-to-Left) direction of text:

pasted_file (566×774 px, 76 KB)

This task is to add

dir="rtl"

into

<textarea class="mw-tpm-sp-unit__target five columns">

in the resulting HTML code.

(This should be based on language properties, but one problem exists: currently is no common way for determine this property by the literal language code.)

Possible way for resolving (by @Nikerabbit ):

  • On PHP side there is Language::getDir.
  • JavaScript can call prop=info or use ULS: $.uls.data.getDir.

See also T177306 (similar problem in the 'Type 2')

Event Timeline

Nikerabbit triaged this task as Medium priority.Jul 7 2016, 12:20 PM
Nikerabbit added a project: good first task.
Nikerabbit moved this task from Backlog to page migration on the MediaWiki-extensions-Translate board.

Nidhinmahesh1, let us know if you encounter some roadblock while trying to fix this.

@Nidhinmahesh1: Could you please share a status update? Are you still working (or still plan to work) on this issue? Is there anything that others could help with? Only in case you do not plan to work on this issue anymore, should you be removed as assignee (via 'Assign / Claim' in the 'Actions' dropdown menu)?

sorry for the inconvenience. please remove me

  • best regards,*

Nidhin Mahesh
Member at FOSS@Amrita http://foss.amrita.ac.in/
Amrita University http://www.amrita.edu

Blog https://nidhinmahesh1.wordpress.com/ | GitHub
https://github.com/nidhinmahesh | Facebook
https://www.facebook.com/nidhin.mahesh2

Aklapper added a subscriber: Nidhinmahesh1.

Hi all! Maybe someone resolve this issue?

Hi all! Maybe someone resolve this issue?

@Kaganer: Do you ask if someone maybe already works on this issue? Currently not.
Do you ask if someone could work on this issue? Your contributions are welcome.
Or do you imply that you cannot reproduce the problem anymore and that somebody maybe already resolved the issue?

Do you ask if someone could work on this issue? Your contributions are welcome.
Or do you imply that you cannot reproduce the problem anymore and that somebody maybe already resolved the issue?

  1. Thanks for advise ;) My technical wiki experience (not so small) and my familiarity with really experienced wiki developers tells me that everyone should do their own thing.
  2. This problem still reproduced anywere. As a result, using [[Special:PagetMigration]] for rtl languages is difficult.

Now I understand that this is a non-trivial task (and may be needs to remove tag "Easy").

This task is to adding

dir="rtl"

into

<textarea class="mw-tpm-sp-unit__target five columns">

This should be based on language properties, but there is single small problem: currently is no common way for determine this property by the literal language code.

PS: Similar issues "inwiki" are solved using templates {{dir}}, a very ugly.

I would still consider this easy task. On PHP side there is Language::getDir. JavaScript can call https://translatewiki.net/wiki/Special:ApiSandbox#action=query&format=json&prop=info&meta=&titles=Project%3AAbout%2Ffi or use ULS: $.uls.data.getDir.

nikitavbv subscribed.

I will work on adding support for RTL direction! :)

Change 400251 had a related patch set uploaded (by Phantom42; owner: Phantom42):
[mediawiki/extensions/Translate@master] Add RTL direction support in the Special:PageMigration

https://gerrit.wikimedia.org/r/400251

Issue fixed and tested! I didn't use PHP-side solution (it is not suitable here) and I decided not to do API calls from JavaScript side. In my opinion ULS ($.uls.data.getDir) is the best solution here.

Change 400251 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add RTL direction support in the Special:PageMigration

https://gerrit.wikimedia.org/r/400251

After deploying new version on Meta-wiki, this tool is completly stopped any changes. Absolutely nothing performed after pressing "save" button. The best christmas changes...

See my comment in T179182 for details.

See my comment in T179182 for details.

This change is not the cause of that problem. See my comment for details.

@Kaganer: Sarcasm is not welcome.

I'm sorry. This is very annoyed.