Closed Bug 611549 Opened 14 years ago Closed 14 years ago

Web Console console input box should be LTR even for RTL locales

Categories

(DevTools :: General, defect, P1)

defect

Tracking

(blocking2.0 -)

RESOLVED FIXED
Firefox 4.0b8
Tracking Status
blocking2.0 --- -

People

(Reporter: pcwalton, Assigned: ehsan.akhgari)

References

Details

(Keywords: rtl)

Attachments

(1 file, 1 obsolete file)

The input pointer needs to point the other way in RTL locales.
blocking2.0: --- → ?
I'm not sure I understand - the RTL caret indicator should be handled by the platform. Unless by "input pointer" you mean something else?
I mean the big > prompt in the input box (which is implemented as a background image IIRC). It should point to the left in RTL locales.
(In reply to comment #2) > I mean the big > prompt in the input box (which is implemented as a background > image IIRC). It should point to the left in RTL locales. Is that how terminals are handled on Windows and Unix in RTL locales?
(In reply to comment #3) > (In reply to comment #2) > > I mean the big > prompt in the input box (which is implemented as a background > > image IIRC). It should point to the left in RTL locales. > > Is that how terminals are handled on Windows and Unix in RTL locales? Well, right now we have a ">" way over on the left, but text is entered right-to-left, since it's a plain old XUL textbox and inherits the default locale settings. I suppose another solution could be to force the textbox to left-to-right mode.
(In reply to comment #3) ehsan: Is that how any terminals (other than in Firefox) are handled on Windows and Unix in RTL locales?
It would be interesting to know how WebKit Inspector handles RTL for its console.
thinking about this further, the console is for entering JavaScript, not plain text. The "window" object is called window no matter which locale you're in. We do want to do the right and consistent thing here, but I don't think it's clear cut what that is.
(In reply to comment #7) > thinking about this further, the console is for entering JavaScript, not plain > text. The "window" object is called window no matter which locale you're in. > > We do want to do the right and consistent thing here, but I don't think it's > clear cut what that is. I *think* this bug is INVALID as you are never going to manipulate the DOM or write JS in an RTL locale. I assume it will always be english.
(In reply to comment #8) > I *think* this bug is INVALID as you are never going to manipulate the DOM or > write JS in an RTL locale. I assume it will always be english. If that's the case, then we should verify that the input box assumes LTR, even if the user's locale is RTL. Regardless, I think it would be worth investigating how other consoles behave.
if it's just a background image, we should be able to use a -moz-transform to flip the image in rtl environments.
(In reply to comment #8) > (In reply to comment #7) > > thinking about this further, the console is for entering JavaScript, not plain > > text. The "window" object is called window no matter which locale you're in. > > > > We do want to do the right and consistent thing here, but I don't think it's > > clear cut what that is. > > I *think* this bug is INVALID as you are never going to manipulate the DOM or > write JS in an RTL locale. I assume it will always be english. Unless I misunderstand what you're saying, I disagree. I think people in non-RTL locales will want to use the Web Console.
.js-term-input:-moz-locale-dir(rtl) { background: url("chrome://global/skin/icons/commandline.png") 4px 2px, no-repeat; -moz-transform: matrix(-1, 0, 0, 1, 0, 0); }
I think we should really wait for Ehsan to get out of bed and give design input (i.e. answer comment 4), and then discuss technical solutions to get there.
(In reply to comment #11) > Unless I misunderstand what you're saying, I disagree. I think people in > non-RTL locales will want to use the Web Console. Indeed you did misunderstand. I'm asking Ehsan to clarify if any of his Persian terminal (Mac Terminal, Linux Gnome Term, etc) is typed into RTL or LTR
(In reply to comment #14) > (In reply to comment #11) > > > Unless I misunderstand what you're saying, I disagree. I think people in > > non-RTL locales will want to use the Web Console. > > Indeed you did misunderstand. I'm asking Ehsan to clarify if any of his > Persian terminal (Mac Terminal, Linux Gnome Term, etc) is typed into RTL or LTR Well, either way, it's not an invalid bug: if people in RTL locales enter text in consoles from left to right, then we should hammer LTR mode into the text box.
Blocks: devtools4
Sorry for the delay here guys. So, the data which goes into this text box is inherently LTR (all DOM object names are in latin alphabet), so what we need to do here is to treat the entire box as LTR (and don't flip the arrow image in RTL mode), similar to how we handle the location bar. Patch forthcoming.
Attached patch Patch (v1) (obsolete) (deleted) — Splinter Review
Assignee: pwalton → ehsan
Attachment #490678 - Flags: review?(ddahl)
Keywords: intlrtl
(In reply to comment #17) > Created attachment 490678 [details] [diff] [review] > Patch (v1) So, the direction will always be LTR? Just making sure I understand this.
(In reply to comment #18) > (In reply to comment #17) > > Created attachment 490678 [details] [diff] [review] [details] > > Patch (v1) > > So, the direction will always be LTR? Just making sure I understand this. yessir. Adjusting summary.
Summary: Web Console console input box isn't localized for RTL → Web Console console input box should be LTR even for RTL locales
Comment on attachment 490678 [details] [diff] [review] Patch (v1) Feeback+, passing to gavin for a real r+
Attachment #490678 - Flags: review?(gavin.sharp)
Attachment #490678 - Flags: review?(ddahl)
Attachment #490678 - Flags: review+
(In reply to comment #18) > (In reply to comment #17) > > Created attachment 490678 [details] [diff] [review] > > Patch (v1) > > So, the direction will always be LTR? Just making sure I understand this. Yes, that is correct.
thanks, ehsan!
Gavin: ping?
Comment on attachment 490678 [details] [diff] [review] Patch (v1) include a semi-colon?
Attachment #490678 - Flags: review?(gavin.sharp)
Attachment #490678 - Flags: review+
Attachment #490678 - Flags: approval2.0+
mass change: filter on PRIORITYSETTING
Priority: -- → P1
Attached patch For check-in (deleted) — Splinter Review
Attachment #490678 - Attachment is obsolete: true
Whiteboard: [needs landing]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → Firefox 4.0b8
blocking2.0: ? → -
CC-ing after the fact. This is fixed.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: