diff --git a/lib/l10n-en_GB.js b/lib/l10n-en_GB.js index fbdff541d..b144c6c2c 100644 --- a/lib/l10n-en_GB.js +++ b/lib/l10n-en_GB.js @@ -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: <a href="${url}">${text}</a>', 'sotd.publish.no-homepage-link': - 'The homepage ${homepage} should appear in the “status of this document”', + 'The group homepage (regular expression: ${homepage}) should appear in the “status of this document”', // 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}.', diff --git a/lib/rules.json b/lib/rules.json index 27046693c..7bdc82a7c 100644 --- a/lib/rules.json +++ b/lib/rules.json @@ -1604,7 +1604,7 @@ "sotd": "There must be a status section that follows the abstract, labeled with an h2 element with content \"Status of This Document\". The Team maintains the status section of a document.", "boilerplateTRDoc": "It must begin with the following boilerplate text:

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 W3C technical reports index at https://www.w3.org/TR/.

Include this source code:
<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>
", "datesFormat": "All dates must have one of the following forms:
  1. DD Month YYYY : 09 January 2020
  2. DD-Month-YYYY : 09-January-2020
  3. DD Mon YYYY : 09 Jan 2020
  4. DD-Mon-YYYY : 09-Jan-2020
A leading zero in the day is optional.", - "publish": "It must include the name of the W3C group that produced the document, the type of document and its track. The name must be a link to a public page for the group.

This document was published by the @@@ Working/Interest Group as a @{param1} using the @{param2}.

Include this source code:
<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 @{param3}.</p>
", + "publish": "It must include the name of the W3C group that produced the document, the type of document and its track. The name must be a link to a public page for the group.

This document was published by the @@@ Working/Interest Group as a @{param1} using the @{param2}.

Include this source code:
<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 @{param3}.</p>
", "customParagraph": "It must include at least one customized paragraph. This section should include the title page date (i.e., the one next to the maturity level at the top of the document). These paragraphs should explain the publication context, including rationale and relationships to other work. See examples and more discussion in the Manual of Style.", "changesList": "It @{param1} include a link to changes since the previous draft (e.g., a list of changes or a diff document or both; see the online HTML diff tool).@{param2}", "deployment": "It must include the expectations in terms of deployment. The recommended text is:
W3C recommends the wide deployment of this specification as a standard for the Web.
", diff --git a/lib/rules/sotd/publish.js b/lib/rules/sotd/publish.js index a9f503c41..4266e7656 100644 --- a/lib/rules/sotd/publish.js +++ b/lib/rules/sotd/publish.js @@ -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, }); } }); diff --git a/test/doc-views/specBase.js b/test/doc-views/specBase.js index 391d3a13a..b23cbac4e 100644 --- a/test/doc-views/specBase.js +++ b/test/doc-views/specBase.js @@ -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: