[PATCH v2b 1/2][BZ #13853] Use printf for all translatable output
Dmitry V. Levin
ldv@altlinux.org
Mon Nov 26 21:12:00 GMT 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121126/6b716980/attachment.sig>
More information about the Libc-alpha
mailing list