app: better synthesized short_label for gegl menu actions

For all the test-ops thus far in gegl, gimp:menu-label has been
the same as title + "..", to keep the number of duplicate strings
that need to be translated and the number of needed boiler-plate
lines of meta-data in GEGL down, this is the default behavior when
a title key exists.
This commit is contained in:
Øyvind Kolås 2023-06-17 22:38:53 +02:00
parent addc37880e
commit 5b129f891a
1 changed files with 9 additions and 0 deletions

View File

@ -838,6 +838,15 @@ filters_actions_setup (GimpActionGroup *group)
gegl_operation_class_get_key (op_class,
"gimp:menu-label"));
}
else if (title)
{
GimpAction *action;
gchar *short_label = g_strdup_printf ("%s..", title);
action = gimp_action_group_get_action (group, action_name);
gimp_action_set_short_label (action, short_label);
g_free (short_label);
}
g_strv_builder_add (gegl_actions, action_name);