Page MenuHomePhabricator

Use target language instead of interface language for textbox direction (LTR/RTL)
Open, Needs TriagePublic

Description

In [[Special:Translate]], the direction of the textbox to translate text into is based on the interface language rather than the language selected to be translated to.

For example, if your interface language is English and you choose to translate a message into Hebrew, the textbox for translating will be LTR. Adding uselang=he to the URL will properly make the textbox RTL.

Another issue is after flipping the interface language to RTL, it seems to "remember" that setting even after you go back to an LTR interface language and choose to translate to an LTR language. I've attached a screenshot showing this. I arrived at that screenshot with the following reproduction steps:

  1. Go to Special:Translate on MediaWiki.org with English as your interface language.
  2. Select to translate into Hebrew
  3. Edit any arbitrary message pending translation. Note that the text box is (incorrectly) LTR.
  4. Add &uselang=he to the end of the URL to flip the interface language to Hebrew.
  5. Edit any arbitrary message pending translation. Note that the text box is now correctly RTL.
  6. Remove &uselang=he from the URL to set the interface language back to English.
  7. Edit any arbitrary message pending translation. Note that the text box is still RTL. This is correct, but did not happen earlier in step 3.
  8. Select to translate into German
  9. Edit any arbitrary message pending translating. Note that the text box is still RTL, despite the fact we are now targeting an LTR language.

Having proper detection of the language being translated to and setting text box status based on that I believe would fix both of the above mentioned issues.

ltr-bug.png (1×3 px, 421 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nikerabbit moved this task from Untriaged to RTL on the I18n board.
Vvjjkkii renamed this task from Use target language instead of interface language for textbox direction (LTR/RTL) to 7baaaaaaaa.Jul 1 2018, 1:01 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
JJMC89 renamed this task from 7baaaaaaaa to Use target language instead of interface language for textbox direction (LTR/RTL).Jul 1 2018, 3:44 AM
JJMC89 raised the priority of this task from High to Needs Triage.
JJMC89 updated the task description. (Show Details)
JJMC89 added a subscriber: Aklapper.

Change 443558 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Handle message languages better in TUX

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

Change 443558 abandoned by Nikerabbit:

[mediawiki/extensions/Translate@master] Handle message languages better in TUX

Reason:

too many conflicts, easier to start from scratch

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