Page MenuHomePhabricator

CodeReview has no right-to-left support
Closed, ResolvedPublic

Description

The CodeReview extension is completely translated to Hebrew and to several other right-to-left languages, but actually using it in these languages is problematic, because it does not support RTL display completely.

Fixing this is not as urgent as fixing RTL bugs in core MediaWiki and other end-user components, but it would be a nice thing to do someday.


Version: unspecified
Severity: normal

Details

Reference
bz29658
TitleReferenceAuthorSource BranchDest Branch
Initial donation flows diagramsrepos/fundraising-tech/fr-tech-diagrams!3andyrussgdonation-flowsmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:25 PM
bzimport set Reference to bz29658.
bzimport added a subscriber: Unknown Object (MLST).

Maybe enabling wgBetterDirectionality in mediawiki.org will help solving this.

WMF wikis still run on 1.17, so it will take some time until they have the code (v1.19) to enable wgBetterDirectionality (it will likely be default by then).

A few quick notes from a few minutes browsing with lang set to 'he' & wgBetterDirectionality on a local trunk site (with default content language English):

Revision list view:

  • table shows in RTL format, pager is right direction, and looks nice overall, but...
  • paths need to have directionality forced; possibly should flip the cells to LTR, but at least the paths need to be fully marked as LTR or the bidi layout ends up moving the root / to the right hand of the string.
  • Commit comment extracts are also generally English and should probably be forced to LTR.

Revision view:

  • revision paging links may need RTL forced ("r12345" and "ViewVC" are LTR chunks and it seems to get confused on the overall order of pieces; I think they should show something like this in he:

    < r10001 (ViewVC ##) r10000 r9999 >

as equivalent of en:

< r9999 r10000 (on ViewVC) r10001 >

but currently show something awful like:

< ViewVC) | r10001##) r9999 r10000 >
  • commit messages should probably be shown in LTR blocks, as they're generally going to be English
  • ... I'm actually not sure what the best handling for file paths is. Probably either keeping the whole list LTR or else properly marking direction on each path string so they show forwards:

    (##) (#) /trunk/phase3/includes/Title.php

instead of getting the slashes mixed up as now:

(####) (###) trunk/phase3/includes/Title.php/
  • Diffs likewise need to be shown in LTR blocks.
  • Comment display and editing... currently the comments get shown in RTL blocks, which is pretty hard to work with for English & PHP/JS/CSS mixed discussion and will likely lead to lots of corrupted display. Should probably be treated as LTR blocks by default, based on content language -- this appears to be a general issue with editing and text input in $wgBetterDirectionality mode.

Created attachment 8729
CR revision list on current SVN trunk with $wgBetterDirectionality & he

Highlighted a couple bits that may need tweaking.

Attached:

cr-hebrew-list.png (1×1 px, 272 KB)

Created attachment 8730
CR revision view on current SVN trunk with $wgBetterDirectionality & he

Highlighted a number of problematic areas, discussed in comments above.

Attached:

cr-hebrew-revision.png (1×1 px, 221 KB)

I marked the paths and code diff as LTR, and fixed the revision paging links with a direction mark in r91293.
The commit summaries, comments and editing box should be set to the content language. Maybe we should let all textarea and input[type="text"] depend on the content language by default?

I aligned commit messages according to content language direction, and aligned input boxes on SpecialRepoAdmin as LTR in r91519.
Also fixed the margin of the indented comments, which is not seen on the screenshots.

Marking as fixed.