Page MenuHomePhabricator

Insertables are reversed in rtl text
Open, LowPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Instead of %2$s or %1$s, s$2% and s$1% gets inserted

image.png (763×1 px, 139 KB)

What should have happened instead?:

The actual variable (%2$s or %1$s) should get inserted

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

  • Translate - master

Other information (browser name/version, screenshots, etc.):

  • Reproduced on Firefox 130 on Linux.
  • Adding a newline and then clicking on the insertables results in the correct value being inserted.

Event Timeline

abi_ triaged this task as High priority.Sep 10 2024, 7:04 AM
abi_ moved this task from Backlog to translation aids on the MediaWiki-extensions-Translate board.
abi_ set the point value for this task to 2.

Selecting the text character by character makes it clear that the first (rightmost) character is %, the next one is 2, then $, then s – it’s just rendered from right to left. I don’t think we can do much about the display – we can’t use <bdi>, CSS or HTML attributes in a <textbox>, and while Unicode characters could be used to force that bit to render from left to right, those Unicode characters would end up in the translation (or, if we removed them, we would risk also removing those that were inserted by the user manually and intentionally).

abi_ lowered the priority of this task from High to Low.Sep 13 2024, 6:15 AM

Selecting the text character by character makes it clear that the first (rightmost) character is %, the next one is 2, then $, then s – it’s just rendered from right to left. I don’t think we can do much about the display – we can’t use <bdi>, CSS or HTML attributes in a <textbox>, and while Unicode characters could be used to force that bit to render from left to right, those Unicode characters would end up in the translation (or, if we removed them, we would risk also removing those that were inserted by the user manually and intentionally).

Thanks. Given that this is only a rendering issue, I'm going to de-prioritize this issue.

I’d even decline it, since I don’t think this is realistically fixable.

Or is it a bug at all? I don’t speak any RTL languages, but I can imagine that the current situation is actually better than what you expect, as one doesn’t have to switch between RTL and LTR, and every switch means extra eye movements.

Removing from team board for now.

I’d even decline it, since I don’t think this is realistically fixable.

Or is it a bug at all? I don’t speak any RTL languages, but I can imagine that the current situation is actually better than what you expect, as one doesn’t have to switch between RTL and LTR, and every switch means extra eye movements.

Removing from team board for now. I'll revisit this to see if it should indeed be closed.