[sane-devel] "Well known" Colour mode strings

Henning Meier-Geinitz henning@meier-geinitz.de
Wed, 28 Apr 2004 19:44:23 +0200


Hi,

On Wed, Apr 28, 2004 at 03:08:02PM +1000, Matthew Duggan wrote:
> Worse, some backends initially define values as SANE_I18N, then do
> strcmps in other places without the SANE_I18N decoration.  This will
> surely cause trouble for people using translated versions of SANE.

As Mattias already daid: this is not a problem. If it had been a problem,
SANE users would have cried out loudly years ago :-)

> What brought this to my attention was a bug (#300689) filed against the
> canon_pp backend noting that it returns an error if you request Color or
> Gray modes.. the reason being that as a hangover from when I wrote a
> stand-alone test program, I've spelt them "Colour" and "Greyscale".. the
> former being the correct spelling in my part of the world (and anywhere
> outside of en.US for that matter).  This is also possibly a bug in
> scanimage for not giving the backend-provided stringlist options for the
> --mode option.

scanimage prints the backend-privided values. Try e.g.
scanimage -d test --help

As far as I can see, option mode is no special option in scanimage.

> So, my suggestion is that we also have VALUE strings defined in
> saneopts.h in a translatable fashion, to avoid the repetition of string
> constants, avoid the logical errors in translated versions, and avoid
> the inconsistancies that can develop between backends.

That's a good idea. There is already a proposal for this in the SANE 2
standard draft:
http://www.sane-project.org/sane2/0.08/doc014.html#s4.5.6

I'd just use these values and add them to saneopts.h (after the freeze).

Do we really need Color Lineart (or Lineart Color)? Better don't
mention that crazy mode anywhere :-)

Bye,
  Henning