Page MenuHomePhabricator

Add {{bidi:}} syntax for directionality-safe arguments
Closed, ResolvedPublic

Description

This is to avoid BIDI corruption that looks like "(Ben_(WMF", which happens when a string is inserted into a context with the reverse directionality. Directionality-neutral characters at the edge of the string can get wrongly interpreted by the BIDI algorithm. This would let you embed your substituted string into a new BIDI context, e.g.:

"Shalom, {{bidi:$1}}, hi!"

The embedded context's directionality is determined by looking at the argument for $1, and then explicitly inserted into the Unicode text, ensuring correct rendering (because then the bidi algorithm "knows" the argument text is a separate context).

Some contexts would benefit from an RTL alternative to 'bidi', a strongly LTR string that will sometimes mess up the appearance of RTL message source code for translators, which would be a pain.

Event Timeline

Jdforrester-WMF assigned this task to dchan.
Jdforrester-WMF raised the priority of this task from to High.
Jdforrester-WMF updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 1 2015, 6:06 PM

Change 221774 had a related patch set uploaded (by Divec):
Add {{bidi:}} syntax for directionality-safe arguments

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

Change 221323 had a related patch set uploaded (by Divec):
Strong directionality support

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

Change 221323 merged by jenkins-bot:
Strong directionality support

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

Change 221774 merged by jenkins-bot:
Add {{bidi:}} syntax for directionality-safe arguments

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

All patches merged.
@dchan: What is left to do here? Can the task status be set to "resolved"?

Umherirrender closed this task as Resolved.Sep 27 2015, 7:32 PM
Umherirrender set Security to None.