Neil Brown wrote: > On Friday August 3, chuck.lever@oracle.com wrote: >> Previous NLS changes missed a spot or two. This patch tries to get >> most of them, but probably misses a few more. >> >> In errors.c:mount_errors() I've removed a period at the end of the error >> messages; this is consistent with other error messages I've examined. >> >> Signed-off-by: Chuck Lever > .... >> --- a/utils/mount/nfs4mount.c >> +++ b/utils/mount/nfs4mount.c >> @@ -321,8 +321,8 @@ int nfs4mount(const char *spec, const char *node, int flags, >> else if (!strcmp(opt, "sharecache")) >> unshared = !val; >> else if (!sloppy) { >> - printf(_("unknown nfs mount option: " >> - "%s%s\n"), val ? "" : "no", opt); >> + printf(_("unknown nfs mount option: %s%s\n"), >> + val ? "" : _("no"), opt); >> goto fail; > > I removed the _() around the "no". Translating the 'no' without > translating the option doesn't make any sense to me. > You would run > mount -o nocoffee ..... > and get an error > Option inconnue de mount du nfs: noncoffee > > (or something - my French non-existent, I just played with > google-translate). Which is wrong. 'noncoffee' isn't the bad > option. 'nocoffee' is. OK. >> --- a/utils/mount/nfsumount.c >> +++ b/utils/mount/nfsumount.c >> @@ -67,7 +67,7 @@ static int del_mtab(const char *spec, const char *node) >> res = umount2 (node, MNT_FORCE); >> if (res == -1) { >> int errsv = errno; >> - perror("umount2"); >> + perror(_("umount2")); >> errno = errsv; >> if (errno == ENOSYS) { >> if (verbose) >> @@ -93,7 +93,7 @@ static int del_mtab(const char *spec, const char *node) >> update_mtab(node, &remnt); >> return 0; >> } else if (errno != EBUSY) { /* hmm ... */ >> - perror("remount"); >> + perror(_("remount")); >> nfs_error(_("%s: could not remount %s read-only"), >> progname, spec); >> } > > And I'm not at all convinced about the _() in perror - In the first > case it is a syscall name. How would you translate that? The second > is possibly less doubtful, but it would probably be best to discard > the perror calls and pass strerror(errno) to nfs_error with an > appropriate format - What do you think? Adding _() for perror is consistent with the other perror calls already in the code. I suppose if those are objectionable, you should remove them all.