Closed Bug 1439268 Opened 8 years ago Closed 8 years ago

EmbedLiveSample not displaying on non-english pages

Categories

(Developer Documentation Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan.simon, Assigned: cmills)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160606114238 Steps to reproduce: For example go on https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Styling_boxes/%E8%83%8C%E6%99%AF (which is the chinese version of https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_boxes/Backgrounds ) scroll a bit to a place where you have a live sample Actual results: only a white empty space was present Expected results: the same live example as the english should be displaied
A better than nothing solution would be to have the exact same example than in the english page but the best would be to have the possibility to also translate the example code (as most of the time it contains also text that bring information like "oh look i'm a red div")
I've fixed them. Basically, each {{EmbedLiveSample()}} macro takes as its first parameter the ID of the heading element that sits on top of the document section containing the code examples you want to embed. When you translate the document, the headings get translated along with their IDs, but the parameters in the macros aren't updated, so the examples break. You have to update them all manually. You can also translate the code blocks, if you want the text inside the samples to also be translated.
Assignee: nobody → cmills
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.