From e8eb30cad68132ba080a093fab4d937c0a7866cc Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 15 Jun 2019 14:11:23 +0200 Subject: [PATCH] tweaks: just mark four rcfile errors for translation, like the others The messages get translated when they get stored in the linked list. This is to economize on the number of actual calls of gettext(). --- src/rcfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rcfile.c b/src/rcfile.c index 1a088855..9b15c111 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -540,8 +540,8 @@ bool is_good_file(char *file) /* If the thing exists, it may be neither a directory nor a device. */ if (stat(file, &rcinfo) != -1 && (S_ISDIR(rcinfo.st_mode) || S_ISCHR(rcinfo.st_mode) || S_ISBLK(rcinfo.st_mode))) { - jot_error(S_ISDIR(rcinfo.st_mode) ? _("\"%s\" is a directory") : - _("\"%s\" is a device file"), file); + jot_error(S_ISDIR(rcinfo.st_mode) ? N_("\"%s\" is a directory") : + N_("\"%s\" is a device file"), file); return FALSE; } else return TRUE; @@ -562,7 +562,7 @@ void parse_one_include(char *file, syntaxtype *syntax) rcstream = fopen(file, "rb"); if (rcstream == NULL) { - jot_error(_("Error reading %s: %s"), file, strerror(errno)); + jot_error(N_("Error reading %s: %s"), file, strerror(errno)); return; } @@ -630,7 +630,7 @@ void parse_includes(char *ptr) for (size_t i = 0; i < files.gl_pathc; ++i) parse_one_include(files.gl_pathv[i], NULL); } else if (result != GLOB_NOMATCH) - jot_error(_("Error expanding %s: %s"), pattern, strerror(errno)); + jot_error(N_("Error expanding %s: %s"), pattern, strerror(errno)); globfree(&files); free(expanded);