+char *
+format_accel (char *input)
+{
+ char *output;
+ char *key,*test;
+
+ output = strdup("");
+
+ if( strstr(input, "<Ctrl>") )
+ {
+ output = realloc(output, strlen(output) + strlen(_("Ctrl"))+2);
+ strncat(output, _("Ctrl"), strlen(_("Ctrl")) +1);
+ strncat(output, "+", 1);
+ };
+ if( strstr(input, "<Alt>") )
+ {
+ output = realloc(output, strlen(output) + strlen(_("Alt"))+2);
+ strncat(output, _("Alt"), strlen(_("Alt")) +1);
+ strncat(output, "+", 1);
+ };
+ if( strstr(input, "<Shift>") )
+ {
+ output = realloc(output, strlen(output) + strlen(_("Shift"))+2);
+ strncat(output, _("Shift"), strlen(_("Shift")) +1);
+ strncat(output, "+", 1);
+ };
+
+ test = strrchr(input, '>');
+ if ( test==NULL )
+ key = strdup(input);
+ else
+ key = strdup(++test); // remove ">"
+
+ output = realloc(output, strlen(output) + strlen(_(key))+2);
+ strncat(output, _(key), strlen(key) +1);
+
+ free(key);
+ return output;
+}
+