diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-30 21:14:43 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-30 21:56:22 +0000 |
| commit | bcec10178c7642ab5781df898fcf1347b1ee6222 (patch) | |
| tree | ee41c058f2dfa1d7b240023fc07116c5c59c5334 /src/ui/interface.cpp | |
| parent | More icon clean up (boundingbox). (diff) | |
| download | inkscape-bcec10178c7642ab5781df898fcf1347b1ee6222.tar.gz inkscape-bcec10178c7642ab5781df898fcf1347b1ee6222.zip | |
Fix translation of menus.xml
- prefix with underscores to make detectable by intltool-update
(was lost with 78cebbf91af8d91681d4ff18b7c1a8b25f2c431a)
- fix 'sp_ui_build_dyn_menus()' to account for this and stick with
current project standards: translate '_name' but not 'name'
Diffstat (limited to 'src/ui/interface.cpp')
| -rw-r--r-- | src/ui/interface.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index bbbd71ab8..0223b2b3b 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -838,7 +838,12 @@ static void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, I menu_pntr != NULL; menu_pntr = menu_pntr->next()) { if (!strcmp(menu_pntr->name(), "submenu")) { - GtkWidget *mitem = gtk_menu_item_new_with_mnemonic(_(menu_pntr->attribute("name"))); + GtkWidget *mitem; + if (menu_pntr->attribute("_name") != NULL) { + mitem = gtk_menu_item_new_with_mnemonic(_(menu_pntr->attribute("_name"))); + } else { + mitem = gtk_menu_item_new_with_mnemonic(menu_pntr->attribute("name")); + } GtkWidget *submenu = gtk_menu_new(); sp_ui_build_dyn_menus(menu_pntr->firstChild(), submenu, view); gtk_menu_item_set_submenu(GTK_MENU_ITEM(mitem), GTK_WIDGET(submenu)); |
