Add a tip about re-using $ entities in example version strings.
This commit is contained in:
parent
bf61357f32
commit
db993063ac
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=47702
1 changed files with 32 additions and 0 deletions
|
|
@ -676,6 +676,38 @@ DOC_PREFIX?= ${.CURDIR}/../../..
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 xml:id="po-translations-literal-dollar">
|
||||||
|
<title><literal>$FreeBSD$</literal>
|
||||||
|
Strings</title>
|
||||||
|
|
||||||
|
<para>The $FreeBSD$ version strings used in
|
||||||
|
files require special handling. In examples like
|
||||||
|
<xref linkend="po-translations-creating-example"/>, these
|
||||||
|
strings are not meant to be expanded. The English documents
|
||||||
|
use <literal>&dollar;</literal> entities to avoid
|
||||||
|
including actual literal dollar signs in the file:</para>
|
||||||
|
|
||||||
|
<programlisting>&dollar;FreeBSD&dollar;</programlisting>
|
||||||
|
|
||||||
|
<para>The <literal>&dollar;</literal> entities are not seen
|
||||||
|
as dollar signs by the version control system and so the
|
||||||
|
string is not expanded into a version string.</para>
|
||||||
|
|
||||||
|
<para>When a <acronym>PO</acronym> file is created, the
|
||||||
|
<literal>&dollar;</literal> entities used in examples are
|
||||||
|
replaced with actual dollar signs. The resulting literal
|
||||||
|
<literal>$FreeBSD$</literal> string will be
|
||||||
|
wrongly expanded by the version control system when the file
|
||||||
|
is committed.</para>
|
||||||
|
|
||||||
|
<para>The same technique as used in the English documents can be
|
||||||
|
used in the translation. The <literal>&dollar;</literal>
|
||||||
|
is used to replace the dollar sign in the translation entered
|
||||||
|
into the <acronym>PO</acronym> editor:</para>
|
||||||
|
|
||||||
|
<programlisting>&dollar;FreeBSD&dollar;</programlisting>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<sect2 xml:id="po-translations-tips-makefile">
|
<sect2 xml:id="po-translations-tips-makefile">
|
||||||
<title>Modifying the <filename>Makefile</filename></title>
|
<title>Modifying the <filename>Makefile</filename></title>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue