https://bugzilla.wikimedia.org/show_bug.cgi?id=72584
Bartosz Dziewoński <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected], | |[email protected], | |[email protected] --- Comment #1 from Bartosz Dziewoński <[email protected]> --- In JS, there's a static method OO.ui.Element.getDir that is used to determine direction. It goes like this: OO.ui.Element.getDir = function ( obj ) { <blah blah> <'obj' is usually 'document.body' at this point> return $( obj ).css( 'direction' ); }; In PHP, we have this so far: class OoUiElement extends OoUiTag { <snip> public static function getDir() { // TODO: Figure out a way to override this functionality when used within MediaWiki, and use // $wgLang->getDir() to get the user interface direction return 'ltr'; } } Subclassing OoUiElement doesn't look viable, so that leaves us with the option of adding OoUiElement::setDir() method that the environment may call to set things up (similarly to how one calls `OoUiTheme::setSingleton( new OoUiMediaWikiTheme() )`). If we also did this in JS, and used that value as a fallback, and went a bit further in that direction, it could probably become possible to use JS OOUI server-side, too; so that might not be a bad idea in general. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
