[glib] Bug 620767 - Typo in GSettings documentation
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Bug 620767 - Typo in GSettings documentation
- Date: Mon, 7 Jun 2010 11:07:42 +0000 (UTC)
commit af78f6d418788fa76a2c78298896f9c656d8eb85
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Jun 7 12:58:57 2010 +0200
Bug 620767 - Typo in GSettings documentation
Use the correct variable name and work around the escaping of '@'.
Expand/clarify the section on how translation of <default> is handled.
docs/reference/gio/migrating-gconf.xml | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/docs/reference/gio/migrating-gconf.xml b/docs/reference/gio/migrating-gconf.xml
index 15b4ff4..4a6447e 100644
--- a/docs/reference/gio/migrating-gconf.xml
+++ b/docs/reference/gio/migrating-gconf.xml
@@ -322,10 +322,24 @@ gsettings_SCHEMAS = my.app.gschema.xml
</key>
]]>
</programlisting>
- Note how we used the context attribute to add msgctxt - "18" is not a
- good string to look up in gettext by itself. Also note that the value
- 24 is not present in the schema anymore. It has to be added to the
- gettext catalog for "be" instead.
+ </para>
+ <para>
+ GSettings uses gettext for translation of default values.
+ The string that is translated is exactly the string that appears
+ inside of the <tag class='starttag'>default</tag> element. This
+ includes the quotation marks that appear around strings.
+ Default values must be marked with the <varname>l10n</varname>
+ attribute in the <tag class='starttag'>default</tag> tag, which
+ should be set as equal to <literal>'messages'</literal> or
+ <literal>'time'</literal> depending on the desired category. An
+ optional translation context can also be specified with the
+ <varname>context</varname> attribute, as in the example. This
+ is usually recommended, since the string "<literal>18</literal>"
+ is not particularly easy to translate without context. The
+ translated version of the default value should be stored in the
+ specified <varname>gettext-domain</varname>. Care must be taken
+ during translation to ensure that all translated values remain
+ syntactically valid; mistakes here will cause runtime errors.
</para>
<para>
GSettings schemas have optional <tag class="starttag">summary</tag> and
@@ -343,7 +357,8 @@ gsettings_SCHEMAS = my.app.gschema.xml
extracted into your gettext catalog. One way to do that is to use
intltool. For that, you use <tag class="starttag">_summary</tag>
and <tag class="starttag">_description</tag> elements in a
- .gschema.xml.in file and use <literal>@INTLTOOL_XML_NOMERGE_RULE@</literal>
+ .gschema.xml.in file and use
+ <literal>@<!-- -->INTLTOOL_XML_NOMERGE_RULE<!-- -->@</literal>
in your Makefile.am to produce the .gschema.xml file. The
<literal>NOMERGE</literal> part of the rule instructs intltool
to extract translatable strings, but not merge the translations
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]