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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Keep the same header between locales #20829

Closed
1 task done
jaironalves opened this issue Apr 29, 2020 · 6 comments 路 Fixed by #21041
Closed
1 task done

[docs] Keep the same header between locales #20829

jaironalves opened this issue Apr 29, 2020 · 6 comments 路 Fixed by #21041
Labels
docs Improvements or additions to the documentation

Comments

@jaironalves
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

Intention

Regardless of how the translation affects the content, it should not affect the anchor (#) that keeps pointing to the content.

Summary 馃挕

The request is that the translations keep the same header, facilitating the way the links are made available between locales.
Currently when a content is translated, the anchor for this content also changes, resulting in the scenario below.

Examples 馃寛

Expected

Regardless of locale, same content anchor #

Motivation 馃敠

Discussion started on this pull request #20779.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Apr 29, 2020
@oliviertassinari
Copy link
Member

@jaironalves Thanks, regarding the implementation, it would require to:

  1. Change the logic of parseMarkdown.js to process the English version first.
  2. In the heading handler, use the English hash for the non-English locales

Done

@eps1lon
Copy link
Member

eps1lon commented Apr 29, 2020

Note that using the id from another translation can break if the translations aren't synced. It's not ideal for the master deploy but manageable. We just need to make sure that we never deploy outdated translations to material-ui.com.

@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 29, 2020

@eps1lon Great point. Depending on the level of quality we want to provide on the translations, we could either fail or fallback to the translated hash. Maybe the latter? Crowdin guarantees that it will be eventually kept in sync.

@eps1lon
Copy link
Member

eps1lon commented Apr 29, 2020

Crowdin guarantees that it will be eventually kept in sync.

That is hardly a useful guarantee. When is "eventually"?

@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 29, 2020

@eps1lon The "when" depends on the frequency we merge the changes into the repository. I think that it can be automated. Right now, it's every time we manually do it. For instance, once per release.

@eps1lon
Copy link
Member

eps1lon commented Apr 29, 2020

That's what I was saying: It's not as important if they're out-of-sync on master. But they need to be synced before we deploy material-ui.com which happens on release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants