From: Matthias Clasen Date: Fri, 28 Nov 2008 20:29:42 +0000 (+0000) Subject: Improve docs X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a2830c774d4a178f6c95a7b924ac47f403371568;p=dana%2Fcg-glib.git Improve docs svn path=/trunk/; revision=7704 --- diff --git a/ChangeLog b/ChangeLog index 4f848492..da731edb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-28 Matthias Clasen + + * glib/gkeyfile.c: Refer to @locale parameters as locale identifier + in docs. + 2008-11-28 Matthias Clasen Bug 557603 – carbon check output misplaced diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 0adf39bb..2e8e1397 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +@008-11-28 Matthias Clasen + + * glib/tmpl/keyfile.sgml: Explain locale identifiers in + more detail + @008-11-28 Matthias Clasen Bug 562549 – g_byte_array_free should tell how free data diff --git a/docs/reference/glib/tmpl/keyfile.sgml b/docs/reference/glib/tmpl/keyfile.sgml index bcc03719..18ce443a 100644 --- a/docs/reference/glib/tmpl/keyfile.sgml +++ b/docs/reference/glib/tmpl/keyfile.sgml @@ -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. Key-value pairs generally have the form key=value, with the exception of localized strings, which have the form -key[locale]=value. Space before and after the +key[locale]=value, with a locale identifier of the form +lang_COUNTRY@MODIFIER where COUNTRY and +MODIFIER 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. diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 4558e15e..d49a17d4 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -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 *