Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

some EmbedLiveSample not work on localized page #340

Closed
zhangchen915 opened this issue Oct 3, 2017 · 2 comments
Closed

some EmbedLiveSample not work on localized page #340

zhangchen915 opened this issue Oct 3, 2017 · 2 comments

Comments

@zhangchen915
Copy link

This page has two EmbedLiveSample, but on the localized page they are not shown. When I changed the name of EmbedLiveSample to 'Examples' only returned the second, it was very strange.
And I did some testing.

× en-US/docs/Web/CSS/:first-of-type$samples/Example
√ en-US/docs/Web/CSS/:first-of-type$samples/Examples (return the second LiveSample)
√ en-US/docs/Web/CSS/:first-of-type$samples/Example_1_Simple_first_paragraph

√ zh-CN/docs/Web/CSS/:first-of-type$samples/Example (return the second LiveSample)
× zh-CN/docs/Web/CSS/:first-of-type$samples/Examples
× zh_CN/docs/Web/CSS/:first-of-type$samples/Example_1_Simple_first_paragraph

@jwhitlock
Copy link
Contributor

The macro syntax is:

{{EmbedLiveSample('id of h2 or h3 with sample')}}

The IDs changed with the translation to zh-CN. It is easier to see this in the Source mode of the editor.

Either the IDs should be changed back, or the macro should be changed from:

{{EmbedLiveSample('Example_1_Simple_first_paragraph')}}

to

{{EmbedLiveSample("例1:选择第一个段落")}}

The second macro call should be changed to:

{{EmbedLiveSample("例2:假定通配选择器")}}

@zhangchen915
Copy link
Author

Thank you for your help :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants