Closed Bug 1137094 Opened 6 years ago Closed 6 years ago

Pseudolanguages break HTML in translations

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Unassigned)

References

Details

Attachments

(2 files)

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.
Blocks: 1143187
Attachment #8601971 - Flags: review?(stas)
Blocks: 1159906
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+
Comment on attachment 8602049 [details] [review]
[gaia] stasm:1137094-dont-pseudo-html > mozilla-b2g:master

Let's land this.
Attachment #8602049 - Flags: review+
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.
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.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
L20n.js: https://github.com/l20n/l20n.js/commit/a8f67e8c906c5517b16e31bae1fb2894d7fad82c

Thanks Ted, this was easier than I thought :)
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
You need to log in before you can comment on or make changes to this bug.