diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-06-07 12:58:57 +0200 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-06-07 13:04:39 +0200 |
commit | af78f6d418788fa76a2c78298896f9c656d8eb85 (patch) | |
tree | 15f96f1882e3408ea4432c87e9388bca20294018 | |
parent | 486c46b9459f7b28528d9144296da9e4a32023d3 (diff) |
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.
-rw-r--r-- | 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 15b4ff4ad..4a6447ebc 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 |