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:

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

Kaganer created this task.Jul 6 2016, 1:08 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 6 2016, 1:08 PM
Restricted Application added a project: I18n. · View Herald TranscriptJul 7 2016, 9:58 AM
Nikerabbit triaged this task as Normal priority.Jul 7 2016, 12:20 PM
Nikerabbit added a project: good first bug.
Nikerabbit moved this task from Backlog to page migration on the MediaWiki-extensions-Translate board.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJul 7 2016, 12:20 PM

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 removed Nidhinmahesh1 as the assignee of this task.Dec 16 2016, 1:07 PM
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?

Kaganer added a comment.EditedOct 5 2017, 12:16 PM

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.

Kaganer updated the task description. (Show Details)Oct 5 2017, 12:17 PM

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.

Kaganer updated the task description. (Show Details)Oct 6 2017, 12:04 AM
Kaganer updated the task description. (Show Details)Oct 6 2017, 12:18 AM
Aklapper updated the task description. (Show Details)Nov 27 2017, 9:15 PM
nikitavbv added a subscriber: nikitavbv.

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.

Nikerabbit closed this task as Resolved.Dec 27 2017, 11:29 AM
Nikerabbit removed a project: Patch-For-Review.

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

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

Kaganer added a comment.EditedJan 7 2018, 10:33 PM

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.

@Kaganer: Sarcasm is not welcome.

I'm sorry. This is very annoyed.