menu i18n
Andreas Köhler
andi5.py at gmx.net
Wed Nov 9 13:05:45 EST 2005
Hi,
this is my first patch, i hope it is ok.
It simply sets the translation domain of some(all?) GtkActionGroup's
used in gnucash. That way the menus and icon bars should be
translatable again.
-- andi5
-------------- next part --------------
Index: gnome-utils/gnc-embedded-window.c
===================================================================
--- gnome-utils/gnc-embedded-window.c (Revision 11887)
+++ gnome-utils/gnc-embedded-window.c (Arbeitskopie)
@@ -311,6 +311,7 @@
/* Create menu and toolbar information */
priv->action_group = gtk_action_group_new (action_group_name);
+ gtk_action_group_set_translation_domain(priv->action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions (priv->action_group, action_entries,
n_action_entries, user_data);
gtk_ui_manager_insert_action_group (window->ui_merge, priv->action_group, 0);
Index: gnome-utils/gnc-plugin-menu-additions.c
===================================================================
--- gnome-utils/gnc-plugin-menu-additions.c (Revision 11887)
+++ gnome-utils/gnc-plugin-menu-additions.c (Arbeitskopie)
@@ -277,6 +277,7 @@
per_window.window = window;
per_window.ui_manager = window->ui_merge;
per_window.group = gtk_action_group_new ("MenuAdditions" );
+ gtk_action_group_set_translation_domain (per_window.group, GETTEXT_PACKAGE);
per_window.merge_id = gtk_ui_manager_new_merge_id(window->ui_merge);
gtk_ui_manager_insert_action_group(window->ui_merge, per_window.group, 0);
Index: gnome-utils/gnc-main-window.c
===================================================================
--- gnome-utils/gnc-main-window.c (Revision 11887)
+++ gnome-utils/gnc-main-window.c (Arbeitskopie)
@@ -1454,6 +1454,7 @@
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
entry = g_new0 (MergedActionEntry, 1);
entry->action_group = gtk_action_group_new (group_name);
+ gtk_action_group_set_translation_domain (entry->action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions (entry->action_group, actions, n_actions, data);
gtk_ui_manager_insert_action_group (window->ui_merge, entry->action_group, 0);
entry->merge_id = gtk_ui_manager_add_ui_from_file (window->ui_merge, pathname, &error);
@@ -1653,6 +1654,7 @@
/* Create menu and toolbar information */
priv->action_group = gtk_action_group_new ("MainWindowActions");
+ gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions (priv->action_group, gnc_menu_actions,
gnc_menu_n_actions, window);
gtk_action_group_add_toggle_actions (priv->action_group,
Index: gnome-utils/gnc-plugin-page.c
===================================================================
--- gnome-utils/gnc-plugin-page.c (Revision 11887)
+++ gnome-utils/gnc-plugin-page.c (Arbeitskopie)
@@ -730,10 +730,13 @@
gnc_plugin_page_create_action_group (GncPluginPage *page, const gchar *group_name)
{
GncPluginPagePrivate *priv;
+ GtkActionGroup *group;
priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
- priv->action_group = gtk_action_group_new(group_name);
- return priv->action_group;
+ group = gtk_action_group_new(group_name);
+ gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE);
+ priv->action_group = group;
+ return group;
}
/** @} */
More information about the gnucash-patches
mailing list