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

Remove {{page}} macro from Glossaire files #4058

Merged
merged 2 commits into from
Feb 9, 2022
Merged

Remove {{page}} macro from Glossaire files #4058

merged 2 commits into from
Feb 9, 2022

Conversation

cw118
Copy link
Member

@cw118 cw118 commented Feb 8, 2022

Part of #3886

@cw118 cw118 requested a review from a team as a code owner February 8, 2022 22:32
@cw118 cw118 requested review from SphinxKnight and removed request for a team February 8, 2022 22:32
@github-actions github-actions bot added the l10n-fr Issues related to French content. label Feb 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

Preview URLs

Flaws

None! 🎉

External URLs

URL: /fr/docs/Glossary/Second-level_Domain
Title: Domaine de deuxième niveau
on GitHub

No new external URLs


URL: /fr/docs/Glossary/Denial_of_Service
Title: Déni de service
on GitHub

No new external URLs

(this comment was updated 2022-02-09 14:48:51.826549)

- Déni de Service
- Glossaire
- Intro
- Sécurité
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cw118 should we avoid adding tags? I know you told me that they are optional for us, which one is the best approach?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly tags don't do much for translated-content, but I'm not the best person to ask — @SphinxKnight is it just for fr or should all locales avoid adding tags?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuanVqz hello, tags for localized pages are mostly a relicate of the old platform (kuma) and are not used anywhere or presented to the reader in any form. As such, I'd advise to remove/avoid them. That being written, they're not harmful so it's not a really big deal if they're kept.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be completely honest, some tags may be used by some macros (cf. https://github.com/mdn/yari/blob/main/kumascript/macros/HTMLRef.ejs#L34 ) but this is not consistent depending on the section (in other words, not all sidebars (ex. JSRef or HTTPSidebar) use them)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further inspection,

  1. A localized page shoud automatically/implicitly get the tags of its "parent" (i.e. English) page: https://github.com/mdn/yari/blob/main/kumascript/index.js#L67 (this also applies for other info in the frontmatter)
  2. Here are the macros which are still used in English and which are using tags:
  • APIListAlpha (used only on Web/API and targeting subpages with Non-standard, Obsolete, Experimental, junk )
  • HTMLRef (used for many element pages, tag must have the "HTML XYZ" form)
    • apart from this form: current calls on en-US only relies on Sectioning Root Element, multimedia, Deprecated, Web Components, Obsolete
  • HTMLRefTable (used only on Web/HTML/Element but scanning subpages)
  • LearnBox which uses a parameter on tags to filter / there are only two calls for this macro, none of them uses this parameter
  • ListGroups used on Web/API and Web/Guide/API: only uses Non-standard, Experimental or Obsolete tags
  • MathMLRef which only checks the tag MathML:Element
  • Non-standard* which only uses the Firefox OS tag (present only on 9 pages in en-US)
    • SVGRef (used for many element pages, tag must have the "SVG XYZ" form)

So:

  • Tags are not strictly necessary on localized pages
  • Even for English pages, only a small subset of tags are still useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SphinxKnight @cw118 Thank you for your time and great explanation. 📑
we will remove the tags, let's do it...

Copy link
Member

@SphinxKnight SphinxKnight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one case nitpicking to go before merging :)

files/fr/glossary/denial_of_service/index.md Outdated Show resolved Hide resolved
@SphinxKnight
Copy link
Member

Thanks @cw118 !

Copy link
Member

@SphinxKnight SphinxKnight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@SphinxKnight SphinxKnight merged commit 66c8976 into mdn:main Feb 9, 2022
@cw118 cw118 deleted the glossaire-macros-page branch February 9, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-fr Issues related to French content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants