Open Bug 801349 Opened 13 years ago Updated 6 years ago

[Regression] RTL dialog boxes that start with English word lost their direction

Categories

(Mozilla Localizations :: he / Hebrew, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: tomer, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: rtl)

Attachments

(1 file)

Because of bug 548206 dialog boxes now gets their direction from their content while in previous versions it was controlled by the UI locale direction. We need to make sure that dialog boxes will display as we intended to. Steps to reproduce: data:text/html,<meta charset="utf-8"/><script>window.alert("Firefox אינו דפדפן בררת המחדל שלך.");</script> The word "Firefox" should be the rightmost word in this alert box.
Same issue as bug 753664.
Depends on: 753664
Blocks: 766557
Blocks: 801396
OS: Linux → Unspecified
Hardware: x86 → Unspecified
Is this bug still happening?
Flags: needinfo?(tomer.moz.bugs)
(In reply to Francesco Lodolo [:flod] from comment #2) > Is this bug still happening? Side note: if this is still a bug, and unless I'm misunderstanding it, it should likely be in a Product component, not in the Hebrew localization (same for bug 801396).
(In reply to Francesco Lodolo [:flod] from comment #2) > Is this bug still happening? Yes. As for the attached screenshot, we now override this with RLM at the beginning of the translation. But the steps to reproduce section in comment 0 is still, well, reproducible. (In reply to Francesco Lodolo [:flod] from comment #3) > Side note: if this is still a bug, and unless I'm misunderstanding it, it > should likely be in a Product component, not in the Hebrew localization > (same for bug 801396). Agreed, as this bug affects other RTL languages as well.

Jonathan, any chance you can help with this bug? Should it be moved to Core as bug 548206?

Flags: needinfo?(tomer.moz.bugs) → needinfo?(jfkthame)

(In reply to Itiel from comment #4)

(In reply to Francesco Lodolo [:flod] from comment #2)

Is this bug still happening?
Yes. As for the attached screenshot, we now override this with RLM at the
beginning of the translation. But the steps to reproduce section in comment
0 is still, well, reproducible.

It's unclear to me whether this is really a bug, or expected behavior. For localizations where the dialog text begins with an English word, including initial RLM to signal the desired directionality is the right solution, I think; and perhaps this is what should be done in the simple comment 0 example, too. If I do

data:text/html,<meta charset="utf-8"/><script>window.alert("\u200fFirefox אינו דפדפן בררת המחדל שלך.");</script>

the text appears with the expected RTL directionality.

I'm not sure if it's desirable for the UI locale directionality to be applied by default. In an RTL-localized build, that would mean

data:text/html,<meta charset="utf-8"/><script>window.alert("This is a test for window.alert!");</script>

then gets the exclamation point at the left side, which looks weird.

Only the author of the text appearing in the alert can reasonably know whether it should have LTR or RTL base direction, and there's no guarantee it should match the browser's UI direction.

Flags: needinfo?(jfkthame)

(In reply to Jonathan Kew (:jfkthame) from comment #6)

In an RTL-localized build, that would mean

data:text/html,<meta charset="utf-8"/><script>window.alert("This is a test for window.alert!");</script>

then gets the exclamation point at the left side, which looks weird.

Not quite. On (some? all? not sure) dialog boxes or different UI parts of Firefox the text is considered as dir=auto, which means that the above This is a test for window.alert message still looks fine also on RTL locales.
The issue is that the localizers can't possibly know when they submit suggestions if the string they're about to translate would appear in a dir=auto context or not.
We could always append an RLM character in cases where the string starts with an LTR character, but this doesn't seem like a good solution (though, I'm unsure atm what the right solution should be).

(In reply to Itiel from comment #7)

(In reply to Jonathan Kew (:jfkthame) from comment #6)

In an RTL-localized build, that would mean

data:text/html,<meta charset="utf-8"/><script>window.alert("This is a test for window.alert!");</script>

then gets the exclamation point at the left side, which looks weird.

Not quite. On (some? all? not sure) dialog boxes or different UI parts of Firefox the text is considered as dir=auto, which means that the above This is a test for window.alert message still looks fine also on RTL locales.

Currently, yes. My point is that if we made Firefox dialogs apply the UI locale direction instead of dir=auto (which is what this report seemed to be requesting), it would regress examples like that where an RTL build is asked to display a dialog containing LTR text.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: