-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
Preview URLs
FlawsNone! 🎉 External URLsURL: No new external URLs URL: No new external URLs (this comment was updated 2022-02-09 14:48:51.826549) |
- Déni de Service | ||
- Glossaire | ||
- Intro | ||
- Sécurité |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On further inspection,
- 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)
- Here are the macros which are still used in English and which are using tags:
APIListAlpha
(used only on Web/API and targeting subpages withNon-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
- apart from this form: current calls on en-US only relies on
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 parameterListGroups
used on Web/API and Web/Guide/API: only usesNon-standard
,Experimental
orObsolete
tagsMathMLRef
which only checks the tagMathML:Element
Non-standard*
which only uses theFirefox 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.
There was a problem hiding this comment.
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...
There was a problem hiding this 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 :)
Thanks @cw118 ! |
Co-authored-by: SphinxKnight <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Part of #3886