mdn / translated-content

The source repository of all translated content for MDN Web Docs
https://developer.mozilla.org/en-US/docs/MDN/Community/Contributing/Translated_content
Other
1.73k stars 8.09k forks source link

Add sidebar to all Glossary pages #16942

Closed leon-win closed 10 months ago

leon-win commented 1 year ago

What is the new suggestion?

I recently noticed that many Glossary pages were missing a sidebar with a list of terms. Examples of pages that do not have a sidebar: https://developer.mozilla.org/es/docs/Glossary/Abstraction https://developer.mozilla.org/ja/docs/Glossary/Abstraction https://developer.mozilla.org/ko/docs/Glossary/Accessible_name https://developer.mozilla.org/pt-BR/docs/Glossary/Abstraction

I already fixed it for ru locale (#16863). And I think it will be useful to do this in other locales:

Why is it important or useful?

Sidebar is useful for navigation in Glossary, so this change will improve user experience.

Other supporting information

Initial works was in #16848.

To add a sidebar we need to do the following on each page (using the Spanish locale as an example): 1) add a {{GlossarySidebar}} macro at the beginning of the page 2) remove {{MDNSidebar}} macro if present 2) remove {{QuickLinksWithSubpages("/es/docs/Glossary")}} macro if present 3) remove {{ListSubpagesForSidebar("/es/docs/Glossary", 1)}} macro if present 4) replace such code blocks:

<section id="Quick_links">
 <ol>
  <li><a href="/es/docs/Glossary">Glossary</a>
   <ol>
    <li>{{Glossary("Accessibility")}}</li>
    <li>{{Glossary("ARIA")}}</li>
   </ol>
  </li>
 </ol>
</section>

with regular markup with the heading "See also":

## Véase también

- [Glosario de MDN Web Docs](/es/docs/Glossary)
  - {{Glossary("Accessibility")}}
  - {{Glossary("ARIA")}}
leon-win commented 1 year ago

This issues has become closed, although in fact it has not yet been completed. Perhaps this is due to the fact that I closed #16979. But I did this at the request of a @mfuji09 to break it into several parts (#17031, #17032, #17033, #17034, #17035, #17036).

Therefore, if anyone has the opportunity, please re-open this issue.