From: Darren S. <ds...@us...> - 2005-09-15 21:54:22
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24563/src Modified Files: main.c mediamarks.c menu.c xml_widgets.c Log Message: Some translation bug fixes. In particular, work around an apparent GtkActionGroup "feature" which effectively does 'setlocale (LC_ALL, "C")'. Index: main.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/main.c,v retrieving revision 1.142 retrieving revision 1.143 diff -u -r1.142 -r1.143 --- main.c 7 Sep 2005 18:28:24 -0000 1.142 +++ main.c 15 Sep 2005 21:54:13 -0000 1.143 @@ -273,6 +273,7 @@ * text from UTF-8. */ bind_textdomain_codeset (PACKAGE, "UTF-8"); + bind_textdomain_codeset (PACKAGE".theme", "UTF-8"); bind_textdomain_codeset (LIB_PACKAGE, "UTF-8"); textdomain (PACKAGE); #endif Index: mediamarks.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/mediamarks.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- mediamarks.c 14 Aug 2005 16:40:36 -0000 1.58 +++ mediamarks.c 15 Sep 2005 21:54:14 -0000 1.59 @@ -103,6 +103,9 @@ static GtkActionGroup *gen_actions (GtkUIManager *ui, GtkTreeIter *iter) { GtkActionGroup *actions = gtk_action_group_new ("mediamarks"); +#ifdef ENABLE_NLS + gtk_action_group_set_translation_domain (actions, ""); +#endif gen_actions_sub (ui, actions, iter, 0); return actions; } Index: menu.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/menu.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- menu.c 1 Sep 2005 18:38:05 -0000 1.62 +++ menu.c 15 Sep 2005 21:54:14 -0000 1.63 @@ -137,6 +137,9 @@ } actions = gtk_action_group_new ("autoplay"); +#ifdef ENABLE_NLS + gtk_action_group_set_translate_func (actions, (GtkTranslateFunc)strstr, "", NULL); +#endif for (i = 0; autoplay_ids[i]; ++i) { @@ -174,6 +177,9 @@ return 0; actions = gtk_action_group_new ("vis"); +#ifdef ENABLE_NLS + gtk_action_group_set_translate_func (actions, (GtkTranslateFunc)strstr, "", NULL); +#endif vis = xine_config_lookup_entry (xine, "gui.post_plugins.audio_visualisation", &entry) ? entry.enum_values[entry.num_value] : NULL; @@ -637,6 +643,13 @@ } gtk_ui_manager_ensure_update (ui); +#ifdef ENABLE_NLS + /* For some reason (GtkActionGroup?), we need to reset our locale info here + * or translation may not happen correctly + */ + setlocale (LC_ALL, ""); +#endif + action_items.fullscreen = get_toggle ("Fullscreen"); action_items.resize_factor = get_toggle ("WindowDynamic"); gtk_action_set_visible (GTK_ACTION(action_items.resize_factor), FALSE); Index: xml_widgets.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/xml_widgets.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- xml_widgets.c 7 Sep 2005 18:28:24 -0000 1.5 +++ xml_widgets.c 15 Sep 2005 21:54:14 -0000 1.6 @@ -100,8 +100,7 @@ return ""; if (*src != '~') return src; - if (xml_domain) - src = dgettext (xml_domain ? : "gxine.theme", src); + src = dgettext (xml_domain ? : PACKAGE".theme", src); return src + (*src == '~'); } @@ -1034,7 +1033,7 @@ char *slash = strrchr (file, '/'); /* assert (slash && slash > file); */ *slash = 0; - xml_domain = g_strconcat ("gxine.theme.", xml_domain, NULL); + xml_domain = g_strconcat (PACKAGE".theme.", xml_domain, NULL); bindtextdomain (xml_domain, file); bind_textdomain_codeset (xml_domain, "UTF-8"); *slash = '/'; |