This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2b 1/2][BZ #13853] Use printf for all translatable output


On Mon, Nov 26, 2012 at 12:48:30AM -0500, P. J. McDermott wrote:
> 2012-11-25  P. J. McDermott  <pj@nac.net>
> 
> 	* elf/ldd.bash.in: Use printf instead of echo for all translatable
> 	output.
> 	* elf/sotruss.ksh: Likewise.
> 	* malloc/memusage.sh: Likewise.
> 
> 	* debug/xtrace.sh: Add script and year variables.
> 	* elf/ldd.bash.in: Likewise.
> 	* elf/sotruss.ksh: Likewise.
> 	* malloc/memusage.sh: Likewise.

Looks OK to me, with one exception:

>       ;;
>    esac
>    if test ! -e "$file"; then
> -    echo "ldd: ${file}:" $"No such file or directory" >&2
> +    printf $"%s: %s: No such file or directory\n" "$script" "$file" >&2
>      result=1

I suppose there was an intention to reuse standard ENOENT error message
translations, otherwise the error message would be all in lowercase like
others:

>    elif test ! -f "$file"; then
> -    echo "ldd: ${file}:" $"not regular file" >&2
> +    printf $"%s: %s: not regular file\n" "$script" "$file" >&2
>      result=1

I suggest to either leave this exception as
    printf "%s: %s: %s\n" "$script" "$file" $"No such file or directory" >&2
so that with the upcoming $msgid change it would be
    printf "%s: %s: %s\n" "$script" "$file" $(_gettext "No such file or directory") >&2
or change it to lowercase.


-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]