Closed
Bug 694986
Opened 13 years ago
Closed 13 years ago
[RTL] The right bracket is misplaced in language names
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox9 affected)
VERIFIED
FIXED
Firefox 10
Tracking | Status | |
---|---|---|
firefox9 | --- | affected |
People
(Reporter: xti, Assigned: jfkthame)
References
Details
(Keywords: rtl)
Attachments
(2 files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Open Fennec App
2. Install the Arabic Language pack
3. Restart the app
4. Go to Preferences > Languages
5. Check if the following language names are displayed correctly: Espanol (de Espana), English (US), Portugues (Europeu).
Expected result:
All language names are displayed correctly.
Actual result:
The right bracket is not set in the end, but before the first character as you can see in the attached screenshot.
Reporter | ||
Comment 1•13 years ago
|
||
Build ID: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a2)Gecko/20111017
Firefox/9.0a2 Fennec/9.0a2
Device: Samsung Galaxy S
OS: Android 2.2
Build ID: Mozilla/5.0 (Android;Linux armv7l;rv:10.0a1)Gecko/20111017
Firefox/10.0a1 Fennec/10.0a1
Device: Samsung Galaxy S
OS: Android 2.2
This issue occurs on the latest Aurora and Nightly builds.
Version: Firefox 9 → Trunk
Updated•13 years ago
|
Blocks: 689706
tracking-fennec: --- → ?
status-firefox10:
--- → affected
status-firefox9:
--- → affected
Depends on: 694047
Keywords: rtl
Assignee | ||
Comment 2•13 years ago
|
||
The issue here is that LTR language names such as "English (US)" are being displayed in a RTL environment, where the trailing neutral-direction character will take on the surrounding RTL directionality and hence appears at the left-hand side of the string (and is mirrored).
Ideally, fragments of text such as the language names, which may be displayed in either LTR or RTL contexts, should carry their own direction tagging and be displayed in a <span> or similar, with the appropriate directionality. However, this seems like a lot of overhead. A lower-level approach would be something like the attached patch, which just wraps all language names in <LRE>...<PDF> Unicode control characters, so that the name is consistently regarded as a left-to-right fragment, regardless of the environment within which it is embedded.
This does not break purely-RTL names such as Arabic, as the inherent strong directionality of the letters still applies. The only case where it would cause a problem would be if a RTL name were to begin or end with neutral characters such as parens. In this case, there would need to be additional control characters within the language name itself (but such a name would already be a problem if we had any, as they'd display incorrectly within the existing English UI).
Given that the vast majority of language names will be LTR, it seems reasonable to design the default behavior so that these will display correctly, and only the rare (currently non-existent?) exceptional case of a RTL name with neutral characters at start/end will need special care.
Attachment #567747 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 3•13 years ago
|
||
BTW, another option would presumably be to explicitly control the overall directionality of the language names via css. I didn't try this, as it seemed a much more invasive approach for no real benefit. I think we'd need to wrap each name in an additional element so that we could set its direction, as we don't want to override the RTL directionality of the list as a whole.
Updated•13 years ago
|
Attachment #567747 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Assignee: nobody → jfkthame
Target Milestone: --- → Firefox 10
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•13 years ago
|
||
Verified fixed on:
Mozilla/5.0 (Android;Linux armv7l;rv:10.0a1)Gecko/20111031
Firefox/10.0a1 Fennec/10.0a1
Devices: Acer ICONIA A500
OS: Android 3.1
Status: RESOLVED → VERIFIED
Updated•13 years ago
|
status-firefox10:
affected → ---
Updated•11 years ago
|
tracking-fennec: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•