For more discussion of this issue, see the comments to Bug 1144682.
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
With the landing of Bug 1157726, gecko now supports FSI and PDI, so this can land now.
(This patch currently produces test failures in the FTU. Those will be fixed by Bug 1161910.)
Comment on attachment 8601924 [details] [review] [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.
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/951b02671d40bb7f7ddca85ab77765aae10812f3
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Hi Ted, Can you raise 2.2 approval as this seems to fix 2.2+ blocking bug 1166203? Thanks!
Comment on attachment 8601924 [details] [review] [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.
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.
Hi Ryan. This patch needs to land on top of Bug 994357. I'll apply for uplift on Bug 994357.
Depends on: 994357
You need to log in before you can comment on or make changes to this bug.