Page MenuHomePhabricator

Names.php includes RTL control characters
Open, LowPublic

Description

Names.php includes RTL control characters in the names of some languages. This is needed for correct display of punctuation; see for example T28208.

But this also introduces some problems. Most importantly, this affects the sorting order of language names. Also:

  • The code of Names.php is ugly.
  • Mixing Unicode invisible control characters with HTML bidi markup is a bad practice according to W3C.

Unfortunately, immediately removing these control characters is problematic, because the correct display of language names in many parts of the code depends on it. One example is language selection dropdowns. This will be probably a kind of a tracking bug for removing such problems.


Version: unspecified
Severity: normal

Details

Reference
bz38674

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:01 AM
bzimport set Reference to bz38674.
bzimport added a subscriber: Unknown Object (MLST).
Amire80 created this task.Jul 25 2012, 3:37 PM

This bug is valid, but it is lacking steps to go forward.

What needs to be done so that this bug can be fixed? New interfaces? Auditing all existing code?

unbelievabe ! There's a <bdi> element if you want to safely embed a foreign language in an unknown script so that you can place after this element a punctuation on the right side.
There's also CSS style "unicode-bidi:" values for directional control if you want full embedding.
There are also quirks possible in previous versions of HTML4 (it requires using absolute positioning as ain a relative element container).

Philippe Verdy: The problem was mostly that we simply didn't know where all of these language names were being used (and we needed a quick fix). It wasn't known if we could safely add html into them. So we used direction chars as a 'patch' and at the same time opening this ticket.

Options:
1: Split the table of names into fragments + direction info. Use toHtml method to build a Html fragment rework the code to safely use it.
2: Simply add <bdi> tags into the name and cleanup all uses to make sure this is possible
3: Identify all places where the names are used and do individual markup/styling for all of those locations to fix the problem.

Ebraminio moved this task from Backlog to MediaWiki-core on the RTL board.Aug 9 2015, 11:45 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2015, 11:45 AM
Meno25 removed a subscriber: Meno25.Feb 22 2016, 5:40 PM
Elitre added a subscriber: Elitre.Apr 15 2016, 5:08 PM
Amire80 moved this task from Untriaged to RTL on the I18n board.Feb 28 2018, 12:34 PM