GKeyFile: add API for getting locale of a string

g_key_file_get_locale_string() returns a translated string from the
keyfile.  In some cases, it may be useful to know the locale that that
string came from.

Add a new API, g_key_file_get_locale_for_key(), that returns the locale
of the string.

Include tests.

(Modified by Philip Withnall to rename the API and fix some minor review
issues. Squash in a separate test case commit.)

https://bugzilla.gnome.org/show_bug.cgi?id=605700
This commit is contained in:
Allison Lortie
2013-10-28 17:53:58 -07:00
committed by Philip Withnall
parent 7b3f78fddb
commit 1574321e51
4 changed files with 109 additions and 0 deletions

View File

@@ -1987,6 +1987,7 @@ g_key_file_has_key
g_key_file_get_value
g_key_file_get_string
g_key_file_get_locale_string
g_key_file_get_locale_for_key
g_key_file_get_boolean
g_key_file_get_integer
g_key_file_get_int64