Clarify the files excluded from language check

This commit is contained in:
vr8hub 2025-03-07 14:44:56 -06:00 committed by Alex Cabal
parent 5066252355
commit 1b6d69c725

View file

@ -191,7 +191,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll
<span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span></code></figure>
<p>If you look carefully, youll notice that the <code class="html"><span class="p">&lt;</span><span class="nt">html</span><span class="p">&gt;</span></code> element has the <code class="html"><span class="na">xml:lang</span><span class="o">=</span><span class="s">"en-US"</span></code> attribute, even though our source text uses British spelling! We have to change the <code class="html"><span class="na">xml:lang</span></code> attribute for the source files to match the actual language, which in this case is en-GB. Lets do that now:</p><code class="terminal"><span><b>perl</b> -pi -e <i>"s|en-US|en-GB|g"</i> src/epub/text/chapter<i class="glob">*</i></span></code>
<p>Note that we <em>dont</em> change the language for the metadata or front/back matter files, like <code class="path">content.opf</code>, <code class="path">titlepage.xhtml</code>, or <code class="path">colophon.xhtml</code>. Those must always be in American spelling, so theyll always have the en-US language tag.</p>
<p>Note that we <em>dont</em> change the language for the metadata or boilerplate files, like <code class="path">colophon.xhtml</code>, <code class="path">imprint.xhtml</code>, <code class="path">toc.xhtml</code>, or <code class="path">titlepage.xhtml</code>. Those must always be in American spelling, so theyll always have the en-US language tag.</p>
<p>Once the file split and cleanup is complete, you can perform your second commit.</p><code class="terminal"><span><b>git</b> add -A</span> <span><b>git</b> commit -m <i>"Split files and clean"</i></span></code>
</li>
<li>