Improve docs
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 28 Nov 2008 20:29:42 +0000 (20:29 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 28 Nov 2008 20:29:42 +0000 (20:29 +0000)
svn path=/trunk/; revision=7704

ChangeLog
docs/reference/ChangeLog
docs/reference/glib/tmpl/keyfile.sgml
glib/gkeyfile.c

index 4f84849218ebf85740716bb122fd688a17b1773c..da731edb86f6f84a08870277b0c2b5bbb1ebde5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gkeyfile.c: Refer to @locale parameters as locale identifier
+       in docs.
+
 2008-11-28  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 557603 – carbon check output misplaced
index 0adf39bbb3bfb752ac35d7a64575f69132d084de..2e8e1397bf107c94654da79acf22f72c9608cdf5 100644 (file)
@@ -1,3 +1,8 @@
+@008-11-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/tmpl/keyfile.sgml: Explain locale identifiers in
+       more detail
+
 @008-11-28  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 562549 – g_byte_array_free should tell how free data
index bcc03719ff374244c39a29567d6ad11922671b24..18ce443a92a8c9429e9006a9b1fa63666e355acf 100644 (file)
@@ -34,8 +34,9 @@ Name=Key File Example\tthis value shows\nescaping
 # localized strings are stored in multiple key-value pairs
 Welcome=Hello
 Welcome[de]=Hallo
-Welcome[fr]=Bonjour
+Welcome[fr_FR]=Bonjour
 Welcome[it]=Ciao
+Welcome[be@latin]=Hello
 
 [Another Group]
 
@@ -58,7 +59,9 @@ the end of the file. Each key-value pair must be contained in a group.
 <para>
 Key-value pairs generally have the form <literal>key=value</literal>, 
 with the exception of localized strings, which have the form 
-<literal>key[locale]=value</literal>. Space before and after the 
+<literal>key[locale]=value</literal>, with a locale identifier of the form
+<literal>lang_COUNTRY@MODIFIER</literal> where <literal>COUNTRY</literal> and 
+<literal>MODIFIER</literal> are optional. Space before and after the 
 '=' character are ignored. Newline, tab, carriage return and backslash 
 characters in value are escaped as \n, \t, \r, and \\, respectively. 
 To preserve leading spaces in values, these can also be escaped as \s.
index 4558e15e2c8e4b2af751a4d6a2bf2f49f552317a..d49a17d4f2d7e396b1c42d19b1585e3ac236ce64 100644 (file)
@@ -1589,7 +1589,7 @@ g_key_file_set_string_list (GKeyFile            *key_file,
  * @key_file: a #GKeyFile
  * @group_name: a group name
  * @key: a key
- * @locale: a locale
+ * @locale: a locale identifier
  * @string: a string
  *
  * Associates a string value for @key and @locale under @group_name.  
@@ -1625,7 +1625,7 @@ extern GSList *_g_compute_locale_variants (const gchar *locale);
  * @key_file: a #GKeyFile
  * @group_name: a group name
  * @key: a key
- * @locale: a locale or %NULL
+ * @locale: a locale identifier or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Returns the value associated with @key under @group_name
@@ -1721,7 +1721,7 @@ g_key_file_get_locale_string (GKeyFile     *key_file,
  * @key_file: a #GKeyFile
  * @group_name: a group name
  * @key: a key
- * @locale: a locale
+ * @locale: a locale identifier or %NULL
  * @length: return location for the number of returned strings or %NULL
  * @error: return location for a #GError or %NULL
  *
@@ -1796,7 +1796,7 @@ g_key_file_get_locale_string_list (GKeyFile     *key_file,
  * @key_file: a #GKeyFile
  * @group_name: a group name
  * @key: a key
- * @locale: a locale
+ * @locale: a locale identifier
  * @list: a %NULL-terminated array of locale string values
  * @length: the length of @list
  *