[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Translation of init scripts



> > A third approach is to come up with a "printf"-like
> > internationalized program and package it in base/required. The
> > "whys" are in layer 4.
> 
> If we decide to use this, it's a matter of using the source from
> printf(1), as Macan pointed out. Perhaps it could be contributed
> back to the upstream gettext mainainers, and once it gets in the
> upstream gettext distribution we could move ours into the
> gettext-base package.

I'm not particularly keen on rewriting the printf program to do this.
I think it's important to be able to see clearly which strings will
and won't be translated.  For example, would the modified printf
translate all arguments?

How about this shell function instead?

printf-i18n(){
  local trans
  trans="`gettext -s $1`"
  shift
  printf "$trans" "$@"
}

Similar things can be done as and where necessary for other functions.

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg


Reply to: