All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH 01/10] mount.nfs: Support double-wide characters in printed	strings
Date: Sat, 4 Aug 2007 07:50:27 +1000	[thread overview]
Message-ID: <18099.41763.912573.736088@notabene.brown> (raw)
In-Reply-To: message from Chuck Lever on Friday August 3

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 <chuck.lever@oracle.com>
....
> --- 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.

> --- 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?

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-08-03 21:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 17:23 [PATCH 01/10] mount.nfs: Support double-wide characters in printed strings Chuck Lever
2007-08-03 21:50 ` Neil Brown [this message]
2007-08-04  0:04   ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18099.41763.912573.736088@notabene.brown \
    --to=neilb@suse.de \
    --cc=chuck.lever@oracle.com \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.