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

EmbedLiveSample macro does not support translated slugs #4436

Closed
shapkarin opened this issue Aug 9, 2021 · 3 comments
Closed

EmbedLiveSample macro does not support translated slugs #4436

shapkarin opened this issue Aug 9, 2021 · 3 comments

Comments

@shapkarin
Copy link
Contributor

it looks like EmbedLiveSample does not works well with slugs in other than en language. I guess it's the general problem with EmbedLiveSample. I got that at issue mdn/translated-content#1985, found the same issues at other languages and there is a lot of the same can be found at PRs. And I that it's the problem with macro EmbedLiveSample because saw a lot of other pages with the same problems and also tried that:

Steps to reproduce:

  1. Try to change live-sample ID argument at EmbedLiveSample call {{EmbedLiveSample('A_table_of_contents', 500, 300)}} to the value that title's id has Таблица_контента

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.

@wbamberg
Copy link
Collaborator

wbamberg commented Aug 9, 2021

Please see also #3973 which (we hope) will make live samples work more easily with translated content.

shapkarin pushed a commit to shapkarin/yari that referenced this issue Aug 10, 2021
@shapkarin
Copy link
Contributor Author

@wbamberg thanks. Added review suggestion to the #3973
Not sure that #4437 cover all languages, but will test a couple a bit later

@shapkarin
Copy link
Contributor Author

@wbamberg thanks. they add it as part of PR #3973

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

Successfully merging a pull request may close this issue.

2 participants