Page MenuHomePhabricator

[MEX] M5 - align coordinates on RTL as LTR
Open, In Progress, Needs TriagePublic

Assigned To
Authored By
Arian_Bozorg
Jun 19 2026, 1:26 PM
Referenced Files
F91693600: image.png
Jul 3 2026, 3:51 PM
F91693534: image.png
Jul 3 2026, 3:51 PM
F91693254: image.png
Jul 3 2026, 3:51 PM
F89085593: Screen Shot 2026-06-17 at 11.48.01.png
Jun 19 2026, 1:26 PM
F89506652: image.png
Jun 19 2026, 1:26 PM

Description

Although RTL languages are read RTL coordinates on Wikidata are presented as LTR and should be aligned as LTR.

This needs to be adjusted in the pop-up when adding a statement using the globe coordinate datatype and the published statement on the Item page

image.png (433×447 px, 65 KB)

pop-up

Screen Shot 2026-06-17 at 11.48.01.png (993×347 px, 82 KB)

published statement

Hello, this ticket might be related to this one here https://phabricator.wikimedia.org/T431787

Acceptance Criteria

  • Coordinates in RTL are displayed as LTR on the pop-up, on the published statement, and in the input

Event Timeline

Zaidusyy subscribed.

Hello! I'd like to work on this task. I am currently looking into the implementation and plan to submit a patch for review.

Change #1304599 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/Wikibase@master] [MEX] M5 - align coordinates on RTL as LTR

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

Zaidusyy changed the task status from Open to In Progress.Jun 25 2026, 12:36 PM

It looks like desktop handles this correctly, at least to my ltr-language-only eyes... But, I don't understand *how*.

image.png (1,636×1,041 px, 307 KB)

In this screenshot, you can see that the <div> containing the map itself explicitly sets the direction with the html attribute dir="ltr". But, the caption element, <div class="wikibase-kartographer-caption">, doesn't have this.

There are no explicit style rules that set the direction for this element, but it does inherit rtl from .mw-body:

image.png (597×181 px, 15 KB)

The computed styles contain this confusing bit. As best I can figure out, the browser itself is overriding it?

image.png (597×181 px, 15 KB)

Also note: it's not just the alignment of the text. Something very strange is happening to the order of the characters as well.

For example, this is a correctly formatted, LTR coordinate: 46°3'23.0"N, 14°31'0.2"E
With an RTL language, that same value appears as this absolutely chaotic jumble: N, 14°31'0.2"E"23.0'46°3