summaryrefslogtreecommitdiff
path: root/src/ntl-uri-map.c
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-05-09 06:35:59 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-05-09 06:35:59 +0000
commit52f6d41f724cb0b0ebb6261eb93d0693f94bc73d (patch)
tree63dfc8e6f6db36d1cc059538981db120556c5e31 /src/ntl-uri-map.c
parente7daedeeb5eddfb82490f01d931409e1afaa89d1 (diff)
downloadnautilus-52f6d41f724cb0b0ebb6261eb93d0693f94bc73d.tar.gz
Provide the language from either the LANGUAGE or LANG environment
* src/ntl-uri-map.c (get_lang_list), (nautilus_view_identifier_new_from_oaf_server_info): Provide the language from either the LANGUAGE or LANG environment variable, for proper l10n of OAF name attributes,
Diffstat (limited to 'src/ntl-uri-map.c')
-rw-r--r--src/ntl-uri-map.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ntl-uri-map.c b/src/ntl-uri-map.c
index 115c10554..d6e2295df 100644
--- a/src/ntl-uri-map.c
+++ b/src/ntl-uri-map.c
@@ -522,6 +522,7 @@ get_lang_list (void)
{
GSList *retval;
char *lang;
+ char * equal_char;
retval = NULL;
@@ -531,10 +532,16 @@ get_lang_list (void)
lang = getenv ("LANG");
}
+
if (lang) {
+ equal_char = strchr (lang, '=');
+ if (equal_char != NULL) {
+ lang = equal_char + 1;
+ }
+
retval = g_slist_prepend (retval, lang);
}
-
+
return retval;
}
@@ -546,17 +553,17 @@ nautilus_view_identifier_new_from_oaf_server_info (OAF_ServerInfo *server)
langs = get_lang_list ();
- 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);
+ g_slist_free (langs);
return nautilus_view_identifier_new (server->iid, view_as_name);
}
@@ -685,8 +692,6 @@ got_file_info_callback (GnomeVFSAsyncHandle *ah,
#endif
}
- /* add_components_from_metadata (navinfo); */
-
add_meta_view_iids_from_preferences (navinfo);
/* Now that all the content_identifiers are in place, we're ready to choose
@@ -699,6 +704,7 @@ got_file_info_callback (GnomeVFSAsyncHandle *ah,
(* notify_ready) (result_code, navinfo, notify_ready_data);
}
+/* The following routine uses metadata associated with the current url to add content view components specified in the metadata */
static void
add_meta_view_iids_from_preferences (NautilusNavigationInfo *navinfo)