Page 1 of 1

RTL Themes, RTL Dialogs, and Missing Translations

Posted: 2020-09-13, 17:21
by RealityRipple
I was doing some work on my theme for Pale Moon and figured I'd check up on RTL support, which definitely needed some improvements here and there, and after building my own Arabic translation, noticed the results of bug #652550 apply to XUL Dialogs, not just JS alerts.

I was working on the styling of tabs and menuitem icons in RTL when I opened an extension's options window and noticed that despite being right-aligned, all the :-moz-locale-dir(ltr) directives were being applied instead of the :-moz-locale-dir(rtl) ones. The extension did not have any Arabic support, so I tried an extension with Arabic and its options window behaved correctly, with the :-moz-locale-dir(rtl) CSS directives being used as expected.

I was wondering if there's any way to force an XUL Dialog to use the application's locale direction, similar to the legacy "chromedir" attribute from before Firefox 4, either accessible via CSS or JS, that would help prevent this kind of mix-up. Or a way to make such a dialog revert to actual LTR GUI layout instead of having all the elements right-aligned. Having both an RTL aligned elements and :-moz-locale-dir(ltr) is... not fun.