Skip to content

Commit

Permalink
allow and even recommend the use of traling slash on group homepage (w…
Browse files Browse the repository at this point in the history
  • Loading branch information
deniak authored Jul 19, 2023
1 parent 0b5fd20 commit cdea9d3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/l10n-en_GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const messages = {
'sotd.publish.url-not-match':
'The link for "${text}" in publisher paragraph in the Status of This Document is not correct. The right link is: <code>&lt;a href="${url}"&gt;${text}&lt;/a&gt;</code>',
'sotd.publish.no-homepage-link':
'The homepage ${homepage} should appear in the <em>&ldquo;status of this document&rdquo;</em>',
'The group homepage (regular expression: ${homepage}) should appear in the <em>&ldquo;status of this document&rdquo;</em>',
// sotd/rec-comment-end
'sotd.rec-comment-end.not-found':
'This W3C Recommendation has substantive changes or new features, cannot find comment end date no earlier than ${minimumEndDate}.',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@
"sotd": "There <span class=\"rfc2119\">must</span> be a status section that follows the abstract, labeled with an <code>h2</code> element with content \"Status of This Document\". The Team maintains the status section of a document.",
"boilerplateTRDoc": "It <span class=\"rfc2119\">must</span> begin with the following boilerplate text: <blockquote class=\"boilerplate\"> <p> <em>This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> at https://www.w3.org/TR/.</em> </p> </blockquote> <div class=\"source\"> <span style=\"font-style: italic\">Include this source code</span>:<br><code>&lt;p&gt;&lt;em&gt;This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the &lt;a href=\"https://www.w3.org/TR/\"&gt;W3C technical reports index&lt;/a&gt; at https://www.w3.org/TR/.&lt;/em&gt;&lt;/p&gt;</code></div>",
"datesFormat": "All dates <span class=\"rfc2119\">must</span> have one of the following forms:<ol><li>DD Month YYYY : 09 January 2020</li><li>DD-Month-YYYY : 09-January-2020</li><li>DD Mon YYYY : 09 Jan 2020</li><li>DD-Mon-YYYY : 09-Jan-2020</li></ol>A leading zero in the day is <span class=\"rfc2119\">optional</span>.",
"publish": "It <span class=\"rfc2119\">must</span> include the name of the W3C group that produced the document, the type of document and its track. The name <span class=\"rfc2119\">must</span> be a link to a public page for the group.<blockquote><p>This document was published by the <a href=\"https://www.w3.org/groups/(wg|ig)/@@\">@@@ Working/Interest Group</a> as a @{param1} using the @{param2}.</p> </blockquote><div class=\"source\"> <span style=\"font-style: italic\">Include this source code</span>:<br><code>&lt;p&gt;This document was published by the &lt;a href=\"https://www.w3.org/groups/(wg|ig)/@@\"&gt;@@@ Working/Interest Group&lt;/a&gt; as a @{param1} using the @{param3}.&lt;/p&gt;</code></div>",
"publish": "It <span class=\"rfc2119\">must</span> include the name of the W3C group that produced the document, the type of document and its track. The name <span class=\"rfc2119\">must</span> be a link to a public page for the group.<blockquote><p>This document was published by the <a href=\"https://www.w3.org/groups/(wg|ig)/@@/\">@@@ Working/Interest Group</a> as a @{param1} using the @{param2}.</p> </blockquote><div class=\"source\"> <span style=\"font-style: italic\">Include this source code</span>:<br><code>&lt;p&gt;This document was published by the &lt;a href=\"https://www.w3.org/groups/(wg|ig)/@@/\"&gt;@@@ Working/Interest Group&lt;/a&gt; as a @{param1} using the @{param3}.&lt;/p&gt;</code></div>",
"customParagraph": "It <span class=\"rfc2119\">must</span> include at least one customized paragraph. This section <span class=\"rfc2119\">should</span> include the title page date (i.e., the one next to the maturity level at the top of the document). These paragraphs <span class=\"rfc2119\">should</span> explain the publication context, including rationale and relationships to other work. See <a href=\"https://www.w3.org/2001/06/manual/#Status\">examples and more discussion in the Manual of Style</a>.",
"changesList": "It <span class=\"rfc2119\">@{param1}</span> include a link to changes since the previous draft (e.g., a list of changes or a diff document or both; see the <a href=\"https://www.w3.org/2007/10/htmldiff\">online HTML diff tool</a>).@{param2}",
"deployment": "It <span class=\"rfc2119\">must</span> include the expectations in terms of deployment. The recommended text is: <blockquote>W3C recommends the wide deployment of this specification as a standard for the Web.</blockquote>",
Expand Down
12 changes: 7 additions & 5 deletions lib/rules/sotd/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ export async function check(sr, done) {

// Check the Deliverer Group link.
const delivererGroups = await sr.getDelivererGroups();
const groupsURLExpected = delivererGroups.map(
const groupsURLRegExpExpected = delivererGroups.map(
delivererGroup =>
`https://www.w3.org/groups/${delivererGroup.groupType}/${delivererGroup.groupShortname}`
new RegExp(
`^https://www.w3.org/groups/${delivererGroup.groupType}/${delivererGroup.groupShortname}/?$`
)
);
const sotdLinksHref = Array.from(sotdLinks).map(l => l.href);
groupsURLExpected.forEach(groupURLExpected => {
if (!sotdLinksHref.includes(groupURLExpected)) {
groupsURLRegExpExpected.forEach(groupURLRegExpExpected => {
if (!sotdLinksHref.some(l => groupURLRegExpExpected.test(l))) {
sr.error(self, 'no-homepage-link', {
homepage: groupURLExpected,
homepage: groupURLRegExpExpected,
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/doc-views/specBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const data = {

group: 'Internationalization Working Group',

WGLink: 'https://www.w3.org/groups/wg/i18n-core',
WGLink: 'https://www.w3.org/groups/wg/i18n-core/',
trackLink: 'https://www.w3.org/2023/Process-20230612/#recs-and-notes',
extra1: '',
noEndorsementHTML:
Expand Down

0 comments on commit cdea9d3

Please sign in to comment.