Open Bug 326790 Opened 19 years ago Updated 14 years ago

direction should revert to LTR when starting a message with /

Categories

(Other Applications :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: eyalroz1, Assigned: rginda)

References

Details

(Keywords: rtl)

'messages' beginning with / are command issues, and these are in almost all cases more appropriately displayed LTR rather than RTL. It would be useful to the direction to revert to LTR when the first message char is /, and revert back to whatever the original direction was after entering the message or deleting the /.
What exactly are you saying here? You want just the *input* box to go to LTR mode if the first character is a "/", and for it to revert to RTL (if it was RTL to start with) if the first character stops being a /?
(In reply to comment #1)
Exactly :-)
We discussed this on IRC quite some time ago. I also asked some people in #developers what they thought about the idea, notably Simon Montagu. They were undecided, as far as I can remember. The point is that the suggestion is fairly fair for normal commands, which need plain English input, but not for commands like /msg, /say, /describe, /me, /kick (with a reason in some RTL language), etc.

I suppose we might be able to make an exception for those commands, but that'd make this feature even messier than it already seems to be.
It's better, IMHO, for /'s to LTR-align by default, with me being able to re-RTL it if I need to, than the other way around. And this wouldn't be messy. As for making specific exceptions for msg, say, etc. commands - that could be another bug. In the mean time I think it's pretty safe to switch the default / behavior. Simon, what do you think?
I'm not sure that the feature is really necessary, but if we implement it I agree with Eyal in comment 4 that 

> It's better, IMHO, for /'s to LTR-align by default, with me being able to
> re-RTL it if I need to, than the other way around.

I just had a discussion with Uri and Simon on IRC (again). Uri mentioned he'd created Hebrew aliases for some of the IRC commands he uses more often, and asked if it wasn't possible to make this part of the localization process. In the end I blurted out something resembling the following, which I hope makes sense:

<Hannibal>	Uri: I'm currently thinking we could just let localizers define an alias for a command.
<Hannibal>	if you check the chatzilla.properties file, you'll see there's all these cmd.somecommandname.params and cmd.somecommandname.help entries
<Hannibal>	(some have a shortcut and/or label too)
<Hannibal>	we could probably just add a cmd.somecommandname.alias one, and localizers could use that to define their own names for those commands.
<Hannibal>	and we would magically parse that and create aliases on the fly.
* Hannibal	ponders.
<Hannibal>	I think that'd work, and I'm going to add that to the bug as a comment.
<Uri>	Hannibal: sounds like a good plan to me (although I really know very little about chatzilla, to tell the truth)
<Hannibal>	Uri / smontagu: so if we have localizable commandnames, I'm assuming we can do away with the entire LTR/RTL switching thing?
<smontagu>	Hannibal: I would say so
<Hannibal>	ok.
<Uri>	Hannibal: For me, that would solve the problem, but the bug reporter might disageree

Of course, the existing commandnames should continue to work (for when new users come for help, or experienced IRC users are just used to them).

I'm wondering what James, Samuel, Robert and of course Eyal think of this idea. Would it solve the problem, is it technically viable, and does it seem like the 'right' thing to do? :-)
I disagree, for two reasons:

1. I don't want to memorize another set of commands.
2. The localizable commands are all the more reason to have '/' LTR the text: Now, if I want to /me a Hebrew message, I can use the localized alias, and leave the '/' strictly for commands with LTR parameters.
(In reply to comment #7)
> 2. The localizable commands are all the more reason to have '/' LTR the text:
> Now, if I want to /me a Hebrew message, I can use the localized alias, and
> leave the '/' strictly for commands with LTR parameters.

The localized commands will also have a '/' in front of them, of course. Which, as  smontagu pointed out, a reason *not* to have '/' LTR the text (because the '/' can be followed by an RTL command alias). 

I can't argue with your first point, though (and I expected you or others to bring it up).
I really don't like the idea of localisation-specific extra commands, even if they are names for existing commands. The problem with making it switch automatically as you type is that there is no shortcut key for switching the direction of just the input box - Ctrl-Shift-E changes the direction of the entire view as well.
(In reply to comment #9)
That's true.
Depends on: 329413
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
QA Contact: samuel → chatzilla
You need to log in before you can comment on or make changes to this bug.