summaryrefslogtreecommitdiff
path: root/src/ntl-uri-map.c
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-05-08 13:36:24 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-05-08 13:36:24 +0000
commita97767e32ec9a4dc8edd0ee82255020a5631c0a2 (patch)
tree1409a9f58fd3543e328e07d2b2e842a6b363daba /src/ntl-uri-map.c
parentc496f61ee549bc6b8dc21a0057b79328683722df (diff)
downloadnautilus-a97767e32ec9a4dc8edd0ee82255020a5631c0a2.tar.gz
fix bugzilla.eazel.com task #694; pass the language to the oaf calls that
* src/ntl-uri-map.c (get_lang_list), (nautilus_view_identifier_new_from_oaf_server_info): fix bugzilla.eazel.com task #694; pass the language to the oaf calls that get a name so those attributes can be i18n'd.
Diffstat (limited to 'src/ntl-uri-map.c')
-rw-r--r--src/ntl-uri-map.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/ntl-uri-map.c b/src/ntl-uri-map.c
index fa6f1c127..c0b3b63ab 100644
--- a/src/ntl-uri-map.c
+++ b/src/ntl-uri-map.c
@@ -427,23 +427,47 @@ server_matches_content_requirements (OAF_ServerInfo *server, GHashTable *type_ta
}
+static GList *
+get_lang_list (void)
+{
+ GList *retval;
+ char *lang;
+
+ retval = NULL;
+
+ lang = getenv ("LANGUAGE");
+
+ if (!lang) {
+ lang = getenv ("LANG");
+ }
+
+ if (lang) {
+ retval = g_list_prepend (retval, lang);
+ }
+
+ return retval;
+}
+
static NautilusViewIdentifier *
nautilus_view_identifier_new_from_oaf_server_info (OAF_ServerInfo *server)
{
const char *view_as_name;
+ GList *langs;
+
+ langs = get_lang_list ();
- /* FIXME bugzilla.eazel.com 694: need to pass proper set of languages as
- the last arg for i18 purposes */
- view_as_name = oaf_server_info_attr_lookup (server, "nautilus:view_as_name", NULL);
+ view_as_name = oaf_server_info_attr_lookup (server, "nautilus:view_as_name", langs);
if (view_as_name == NULL) {
- view_as_name = oaf_server_info_attr_lookup (server, "name", NULL);
+ view_as_name = oaf_server_info_attr_lookup (server, "name", langs);
}
if (view_as_name == NULL) {
view_as_name = server->iid;
}
+ g_free (langs);
+
return nautilus_view_identifier_new (server->iid, view_as_name);
}