diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-11-08 16:28:22 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-12-19 12:45:51 -0500 |
commit | 1996a5edff919253632c1e26b706ab7373fbc8b9 (patch) | |
tree | d8da371c0c77437d3a5490a5fbe49a4a4a72ffa8 /tests | |
parent | f13083bf0da0213e2d2df0026cb126980a024093 (diff) | |
download | gtk+-1996a5edff919253632c1e26b706ab7373fbc8b9.tar.gz |
testgmenu: Demonstrate how translatable labels work
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testgmenu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 821daca514..1f8b0d79f3 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -387,7 +387,9 @@ menu_holder_get_menu (MenuHolder *holder) static const gchar menu_markup[] = "<menu id='edit-menu'>\n" " <section>\n" - " <item label='Undo' action='undo'/>\n" + " <item action='undo'>\n" + " <attribute name='label' translatable='yes' context='Stock label'>'_Undo'</attribute>\n" + " </item>\n" " <item label='Redo' action='redo'/>\n" " </section>\n" " <section></section>\n" @@ -415,7 +417,7 @@ start_element (GMarkupParseContext *context, GError **error) { if (strcmp (element_name, "menu") == 0) - g_menu_markup_parser_start_menu (context, NULL); + g_menu_markup_parser_start_menu (context, "gtk30", NULL); } static void @@ -453,7 +455,7 @@ get_model (void) return G_MENU_MODEL (menu); } -/* The example actions {{{1 */ + /* The example actions {{{1 */ static void activate_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) |