Pseudolanguages break HTML in translations

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: stas, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
We don't currently do anything to support HTML in translations which results in HTML element names and attributes ending up pseudolocalized as well.

Now that bug 1101632 is fixed and we can build pseudolocales on buildtime, I'm less concerned about the performance impact parsing HTML in translations might have.

It would be cool to use <template> for this but I'm afraid we'd run into the same problem we have in bug 994357.
(Reporter)

Updated

4 years ago
Blocks: 1143275
(Reporter)

Updated

4 years ago
Blocks: 1143187
Created attachment 8601971 [details] [review]
[gaia] tedders1:bug-1137094-dont-pseudolocalize-html-tags > mozilla-b2g:master

Updated

3 years ago
Attachment #8601971 - Flags: review?(stas)

Updated

3 years ago
Blocks: 1159906
(Reporter)

Comment 2

3 years ago
Comment on attachment 8601971 [details] [review]
[gaia] tedders1:bug-1137094-dont-pseudolocalize-html-tags > mozilla-b2g:master

This won't pseudo-localize localizable attributes like placeholders or titles but they aren't pseudolocalized right now either.  Let;s land this; it's still a useful addition.

Since Ted is asleep now I'll submit a new PR in which I want to add a test.
Attachment #8601971 - Flags: review?(stas) → review+
Created attachment 8602049 [details] [review]
[gaia] stasm:1137094-dont-pseudo-html > mozilla-b2g:master
(Reporter)

Comment 4

3 years ago
Comment on attachment 8602049 [details] [review]
[gaia] stasm:1137094-dont-pseudo-html > mozilla-b2g:master

Let's land this.
Attachment #8602049 - Flags: review+
(Reporter)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/pull/29914

The pull request could not be applied to the integration branch. Please try again after current integration is complete. You may need to rebase your branch against the target branch.
(Reporter)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/pull/29914

The pull request could not be applied to the integration branch. Please try again after current integration is complete. You may need to rebase your branch against the target branch.

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Comment 8

3 years ago
L20n.js: https://github.com/l20n/l20n.js/commit/a8f67e8c906c5517b16e31bae1fb2894d7fad82c

Thanks Ted, this was easier than I thought :)
(Reporter)

Comment 9

3 years ago
I realized that the autolander landed Ted's pull request which didn't have tests.  Let's see if it can land mine now as a follow-up.
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.