Closed Bug 1154438 Opened 10 years ago Closed 10 years ago

String substitutions should be wrapped with Unicode bidi isolation characters when appropriate.

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S12 (15may)
blocking-b2g 2.2+
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: tedders1, Assigned: tedders1)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

For more discussion of this issue, see the comments to Bug 1144682.
Assignee: nobody → tclancy
Blocks: 1152074
Depends on: 258974
There's been some discussion about whether we should use <bdi> and </bdi> tags for this, or Unicode FSI and PDI control characters. Bug 1152127 is a good example of where <bdi> and </bdi> tags might not work. Unfortunately, gecko doesn't currently support FSI and PDI. (Support will be added by 922963, but it's unclear on when that will be finished.) In the meantime, and imperfect solution using LRE and RLE might be better than nothing. Unfortunately, LRE and RLE don't provide perfect isolation.
Depends on: 922963
*an imperfect solution
Whiteboard: [systemsfe]
Depends on: 1161910
With the landing of Bug 1157726, gecko now supports FSI and PDI, so this can land now.
No longer depends on: 258974, 922963
(This patch currently produces test failures in the FTU. Those will be fixed by Bug 1161910.)
Attachment #8601924 - Flags: review?(stas)
Comment on attachment 8601924 [details] [gaia] tedders1:bug-1154438-bidi-wrap-substitions > mozilla-b2g:master Thanks, Ted, r=me with a nit left in github about the fat arrow. IIUC, this will ensure proper directionality of LTR text inside of RTL translations. It won't do anything for RTL text inside of LTR translations, but that's much less common anyways and probably already taken care of with <bdi> where absolutely needed, like in Contacts.
Attachment #8601924 - Flags: review?(stas) → review+
Hi Staś. The patch does take care of RTL substitutions inside an LTR translation. On line 911, I check for 'value.match(nonLatin1)'. That looks in the substitution string for a non-Latin-1, possibly RTL character.
Keywords: checkin-needed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Hi Ted, Can you raise 2.2 approval as this seems to fix 2.2+ blocking bug 1166203? Thanks!
blocking-b2g: --- → 2.2+
Flags: needinfo?(tclancy)
Target Milestone: --- → 2.2 S12 (15may)
Blocks: 1166203
Comment on attachment 8601924 [details] [gaia] tedders1:bug-1154438-bidi-wrap-substitions > mozilla-b2g:master NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): RTL support for B2G (Bug 906270) This patch is required for Bug 1166203, which is confirmed as blocking 2.2. (And probably a bunch of similar issues which haven't been spotted yet.) User impact if declined: Punctuation marks will appear in the wrong place when LTR phrases appear within RTL text, or vice versa. Testing completed: Green try run - https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=1365157b38eb59bb42fd32f63c9eb5254e4d4a67 Risk to taking this patch (and alternatives if risky): None foreseen. String or UUID changes made by this patch: None.
Flags: needinfo?(tclancy)
Attachment #8601924 - Flags: approval-gaia-v2.2?
Attachment #8601924 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
Hi Ryan. This is the last one. Thanks
Needs rebasing for v2.2 uplift.
Flags: needinfo?(tclancy)
Hi Ryan. This patch needs to land on top of Bug 994357. I'll apply for uplift on Bug 994357.
Depends on: 994357
Flags: needinfo?(tclancy)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: