88// - Use slightly modified conformance text.
99//
1010// Note: Run after inlines so the conformance section has an id and NormativeReferences is available.
11- import { htmlJoinAnd , showError , showWarning } from "../core/utils.js" ;
11+ import { getIntlData , htmlJoinAnd , showError , showWarning } from "../core/utils.js" ;
1212import { html } from "../core/import-maps.js" ;
1313import { renderInlineCitation } from "../core/render-biblio.js" ;
1414import { rfc2119Usage } from "../core/inlines.js" ;
15+ import localizationStrings from "./translations/conformance.js" ;
16+ const l10n = getIntlData ( localizationStrings ) ;
1517
1618export const name = "1edtech/conformance" ;
1719
@@ -53,38 +55,28 @@ function getNormativeText(conf) {
5355 const plural = terms . length > 1 ;
5456
5557 const content = html `< p >
56- As well as sections marked as non-normative, all authoring guidelines,
57- diagrams, examples, and notes in this specification are non-normative.
58- Everything else in this specification is normative.
58+ ${ l10n . normative_text_paragraph_1 }
5959 </ p >
6060 ${ terms . length
6161 ? html `
6262 < p >
63- The key word${ plural ? "s" : "" } ${ [ keywords ] } in this document
64- ${ plural ? "are" : "is" } to be interpreted as described in
65- ${ renderInlineCitation ( "RFC2119" ) } .
63+ ${ plural ? `${ l10n . the_plural } ${ l10n . key_words } ` : `${ l10n . the } ${ l10n . key_word } ` }
64+ ${ [ keywords ] }
65+ ${ l10n . keywords_paragraph
66+ . replace ( "{0}" , plural ? l10n . are : l10n . is )
67+ . replace ( "{1}" , renderInlineCitation ( "RFC2119" ) ) }
6668 </ p >
6769 `
6870 : null }
69- < p >
70- An implementation of this specification that fails to implement a
71- MUST/REQUIRED/SHALL requirement or fails to abide by a MUST NOT/SHALL NOT
72- prohibition is considered nonconformant. SHOULD/SHOULD NOT/RECOMMENDED
73- statements constitute a best practice. Ignoring a best practice does not
74- violate conformance but a decision to disregard such guidance should be
75- carefully considered. MAY/OPTIONAL statements indicate that implementers
76- are entirely free to choose whether or not to implement the option.
77- </ p > ` ;
71+ < p > ${ l10n . normative_text_implementation } </ p > ` ;
7872
7973 if ( conf . skipCertGuideConformanceRef || conf . specType == "cert" ) {
8074 return content ;
8175 }
8276
8377 return html `${ content }
8478 < p >
85- The < a href ="#document-set "> Conformance and Certification Guide</ a >
86- for this specification may introduce greater normative constraints than
87- those defined here for specific service or implementation categories.
79+ ${ l10n . normative_text_certification_constraints }
8880 </ p > ` ;
8981}
9082
@@ -101,14 +93,8 @@ function getInformativeText(conf) {
10193 }
10294
10395 return html ` < p >
104- This document is an informative resource in the Document Set of the
105- ${ conf . mainSpecTitle ? conf . mainSpecTitle : "" } specification
106- ${ conf . mainSpecBiblioKey
107- ? renderInlineCitation ( conf . mainSpecBiblioKey )
108- : "" } .
109- As such, it does not include any normative requirements. Occurrences in this
110- document of terms such as MAY, MUST, MUST NOT, SHOULD or RECOMMENDED have no
111- impact on the conformance criteria for implementors of this specification.
96+ ${ l10n . informative_text_paragraph_1 . replace ( "{0}" , conf . mainSpecTitle ? conf . mainSpecTitle : "" ) . replace ( "{1}" , conf . mainSpecBiblioKey ? renderInlineCitation ( conf . mainSpecBiblioKey ) : "" ) } .
97+ ${ l10n . informative_text_paragraph_2 }
11298 </ p > ` ;
11399}
114100
0 commit comments