[yelp-xsl] l10n.xsl: Typo fixes in docs



commit 1bb86ef5c90d867f6dccffe1f3609025ffbbae4f
Author: Shaun McCance <shaunm redhat com>
Date:   Tue Oct 17 12:28:40 2017 -0400

    l10n.xsl: Typo fixes in docs

 doc/yelp-xsl/C/l10n.gettext.page |    6 +++---
 xslt/common/l10n.xsl             |   14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/doc/yelp-xsl/C/l10n.gettext.page b/doc/yelp-xsl/C/l10n.gettext.page
index 81bd9ba..f7dd74a 100644
--- a/doc/yelp-xsl/C/l10n.gettext.page
+++ b/doc/yelp-xsl/C/l10n.gettext.page
@@ -44,8 +44,8 @@
   <p>The <code>xml:lang</code> attribute should contain an RFC 3066 language identifier, which is different 
from the POSIX locale identifiers used by gettext. To accommodate this difference, this stylesheet converts 
all identifiers to lowercase and replaces the characters <code>_</code>, <code>@</code>, and <code>.</code> 
with the character <code>-</code>. If it cannot find an exact match, it strips the part after the last 
<code>-</code> and looks again. It repeats this as long as the identifier contains a <code>-</code> 
character. If there is still no matching <code>msgstr</code> element, it looks for one with no 
<code>xml:lang</code> attribute.</p>
   <p>Sometimes you have to provide different versions of a string for different cardinalities. While English 
and many other languages have singular and plural, some languages have no plural forms, while others have as 
many as six. These stylesheets use a numeric index for plural forms, similarly to gettext. To get the string 
for a plural, pass the cardinality in the <code style="xslt-param">number</code> parameter. This template 
gets an index for that number by calling <code style="xslt-template" 
xref="l10n.plural.form">l10n.plural.form</code>. The plural form index is in the <code 
style="xslt-param">form</code> parameter. You do not have to pass this parameter. It will be computed 
automatically based on the <code style="xslt-param">number</code> parameter.</p>
   <p>There is currently no support for editing plural forms using the standard PO syntax. Instead, plurals 
are defined with an XML snippet. Instead of putting the single translated message in the <code>msgstr</code> 
element, plural messages have <code>msgstr</code> child elements of the <code>msgstr</code> element with the 
<code>xml:lang</code> attribute. Each of these child <code>msgstr</code> elements has a <code>form</code> 
attribute that holds the numeric index returned by <code style="xslt-template" 
xref="l10n.plural.form">l10n.plural.form</code>. Translators must adapt the XML snippet according to the 
plural rules and forms defined in this stylesheet for their language.</p>
-  <p>Some translations aren't simple strings, but are instead format strings where certain values are 
inserted. This template can handle format strings with XML marker elements to signal where values should be 
substituted. These values cat be the result of applying templates.</p>
-  <p>To enable format strings, pass set the <code style="xslt-param">format</code> parameter to 
<code>true()</code>. Instead of just returning the translated string, this template will instead apply 
templates in the mode <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code> to the fragment 
contained in the <code>msgstr</code> element.</p>
-  <p>The <code style="xslt-param">node</code> and <code style="xslt-param">string</code> parameters are 
passed to templates in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code>. This 
stylesheet contains matches in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code> for 
the marker elements <code><string/></code> and <code><node/></code>. The element <code><string/></code> will 
be replaced by the string value of <code style="xslt-param">string</code>. The element <code><node/></code> 
will apply templates without a mode to <code style="xslt-param">node</code>. Text nodes are copied to the 
result in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code>.</p>
+  <p>Some translations aren't simple strings, but are instead format strings where certain values are 
inserted. This template can handle format strings with XML marker elements to signal where values should be 
substituted. These values can be the result of applying templates.</p>
+  <p>To enable format strings, set the <code style="xslt-param">format</code> parameter to 
<code>true()</code>. Instead of just returning the translated string, this template will apply templates in 
the mode <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code> to the fragment contained in 
the <code>msgstr</code> element.</p>
+  <p>The <code style="xslt-param">node</code> and <code style="xslt-param">string</code> parameters are 
passed to templates in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code>. This 
stylesheet contains matches in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code> for 
the marker elements <code>&lt;string/&gt;</code> and <code>&lt;node/&gt;</code>. The element 
<code>&lt;string/&gt;</code> will be replaced by the string value of <code style="xslt-param">string</code>. 
The element <code>&lt;node/&gt;</code> will apply templates without a mode to <code 
style="xslt-param">node</code>. Text nodes are copied to the result in <code style="xslt-mode" 
xref="l10n.format.mode">l10n.format.mode</code>.</p>
   <p>If you need any other behavior, add elements with any name of your choosing to the format string, then 
match on those elements in <code style="xslt-mode" xref="l10n.format.mode">l10n.format.mode</code>. You will 
be able to use the <code style="xslt-param">node</code> and <code style="xslt-param">string</code> parameters 
in your template. Try to use a name that is unique.</p>
 <list style="compact"><title>Calls Templates</title><item><p><link 
xref="l10n.plural.form"/></p></item><item><p><link xref="l10n.gettext"/></p></item></list><list 
style="compact"><title>Calls Keys</title><item><p><link xref="l10n.msgstr.key"/></p></item></list></page>
diff --git a/xslt/common/l10n.xsl b/xslt/common/l10n.xsl
index 4064651..ceb058e 100644
--- a/xslt/common/l10n.xsl
+++ b/xslt/common/l10n.xsl
@@ -149,19 +149,19 @@ stylesheet for their language.
 Some translations aren't simple strings, but are instead format strings where
 certain values are inserted. This template can handle format strings with XML
 marker elements to signal where values should be substituted. These values
-cat be the result of applying templates.
+can be the result of applying templates.
 
-To enable format strings, pass set the ${format} parameter to #{true()}.
-Instead of just returning the translated string, this template will instead
+To enable format strings, set the ${format} parameter to #{true()}.
+Instead of just returning the translated string, this template will
 apply templates in the mode %{l10n.format.mode} to the fragment contained in
 the #{msgstr} element.
 
 The ${node} and ${string} parameters are passed to templates in
 %{l10n.format.mode}. This stylesheet contains matches in %{l10n.format.mode}
-for the marker elements #{<string/>} and #{<node/>}. The element #{<string/>}
-will be replaced by the string value of ${string}. The element #{<node/>} will
-apply templates without a mode to ${node}. Text nodes are copied to the result
-in %{l10n.format.mode}.
+for the marker elements #{&lt;string/>} and #{&lt;node/>}. The element
+#{&lt;string/>} will be replaced by the string value of ${string}. The
+element #{&lt;node/>} will apply templates without a mode to ${node}.
+Text nodes are copied to the result in %{l10n.format.mode}.
 
 If you need any other behavior, add elements with any name of your choosing to
 the format string, then match on those elements in %{l10n.format.mode}. You will


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]