Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live sample is not work (and mdn/yari macros issue) #1985

Closed
shapkarin opened this issue Aug 8, 2021 · 2 comments
Closed

Live sample is not work (and mdn/yari macros issue) #1985

shapkarin opened this issue Aug 8, 2021 · 2 comments

Comments

@shapkarin
Copy link
Contributor

shapkarin commented Aug 8, 2021

MDN URL: https://developer.mozilla.org/ru/docs/Web/CSS/:target

Результат for the Таблица контента render the error

Screenshot 2021-08-09 at 01 39 31

I will provide the PR that just change

<h3 id="Таблица_контента">Таблица контента</h3>

to the

<h3 id="A_table_of_contents">Таблица контента</h3>

General issue

But I guess the problem with EmbedLiveSample is more general. The same issues can be found at other languages. And it looks like EmbedLiveSample does not works well with slugs in other than en language.
I that it's the general problem with macro EmbedLiveSample because saw a lot of other pages with the same problems and also tried that:

I tried to change

<div>{{EmbedLiveSample('A_table_of_contents', 500, 300)}}</div>
to the value that title's id has
<h3 id="Таблица_контента">Таблица контента</h3>

like:

<div>{{EmbedLiveSample('Таблица_контента', 500, 300)}}</div>

But I got the error

Error: No live-sample "%d0%a2%d0%b0%d0%b1%d0%bb%d0%b8%d1%86%d0%b0_%d0%ba%d0%be%d0%bd%d1%82%d0%b5%d0%bd%d1%82%d0%b0" found within /ru/docs/web/css/:target

As I can see macro EmbedLiveSample or live-sample.js does not works with translated ids and slugs. More info can be found at mdn/yari#4436

@shapkarin
Copy link
Contributor Author

For the rest of this issue I prepared PR mdn/yari#4437 that can help to define EmbedLiveSample's sampleId (first argument) in different languages.

@shapkarin shapkarin changed the title Live sample is not work, typo (and general EmbedLiveSample issue) Live sample is not work (and mdn/yari macros issue) Aug 9, 2021
@shapkarin
Copy link
Contributor Author

shapkarin commented Aug 10, 2021

I think it can be closed because the rest of it is not related to this repository

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

No branches or pull requests

1 participant