commit 3925c137a493888c4bf5770a19b064846e3ee5db
parent 97fa42c82bc26b23bec36dccd845c6c5311f0652
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 31 Aug 2022 16:49:48 +0200
tweaks: make two error messages more succinct and easier to translate
"Cannot map name %s to <thing>..." was unnecessarily verbose and vague.
I have kept these strings unchanged all these years because I didn't
want to invalidate the existing translations. But now it's time to
harmonize things and simply say "Unknown <thing>: %s" for an invalid
function name, menu name, option name, and syntax name.
("No such <thing>: %s" is nice and snappy, but its translations often
are clumsy and longer and unclear.)
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1285,7 +1285,7 @@ void unbound_key(int code)
else if (code == MISSING_BRACE)
statusline(AHEM, _("Missing }"));
else if (code == NO_SUCH_FUNCTION)
- statusline(AHEM, _("No such function: %s"), commandname);
+ statusline(AHEM, _("Unknown function: %s"), commandname);
#endif
#ifndef NANO_TINY
else if (code > KEY_F0 && code < KEY_F0 + 25)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -789,7 +789,7 @@ void parse_binding(char *ptr, bool dobind)
menu = name_to_menu(menuptr);
if (menu < 1) {
- jot_error(N_("Cannot map name \"%s\" to a menu"), menuptr);
+ jot_error(N_("Unknown menu: %s"), menuptr);
goto free_things;
}
@@ -807,7 +807,7 @@ void parse_binding(char *ptr, bool dobind)
newsc = strtosc(funcptr);
if (newsc == NULL) {
- jot_error(N_("Cannot map name \"%s\" to a function"), funcptr);
+ jot_error(N_("Unknown function: %s"), funcptr);
goto free_things;
}
}
@@ -1532,7 +1532,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
}
if (rcopts[i].name == NULL) {
- jot_error(N_("Unknown option \"%s\""), option);
+ jot_error(N_("Unknown option: %s"), option);
continue;
}