[sane-devel] help with improving text scans

abel deuring adeuring at gmx.net
Sun Dec 21 12:14:22 UTC 2008


On 20.12.2008 23:15, Jeffrey Ratcliffe wrote:
> 2008/12/20 abel deuring <adeuring at gmx.net>:
>> Just open sane's .mo file with gettext :) (OK, I'm more involved with
>> the "competition" -- Python --, so I don't know if a gettext
>> implementation for Perl exists, but I would be really suprised if it
>> doesn't.)
> 
> Locale::gettext is the Perl module, which gscan2pdf uses for its own
> localisation.
> 
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Locale::gettext;
> use POSIX;     # Needed for setlocale()
> setlocale(LC_MESSAGES, "");
> my $d = Locale::gettext->domain("sane-backends");
> print $d->get("Preview"), "\n";
> 
> works.
> 
> What I really meant is that scanimage doesn't seem to use SANE's
> translations, which makes it difficult to provide a consistent
> interface for the different frontends scanimage/scanadf/libsane-perl.

Ah, I missed that point.

> 
> But you are right - I can get the English strings from scanimage, and
> feed them through gettext. Unfortunately scanimage --help only gives
> the option titles for the groups.
> 
> Can the backends be induced to give the option titles in some debug mode?

Well, since you have now libsane-perl -- do you really need to call
scanimage or scanadf from gscan2pdf anymore ;) ?

Abel



More information about the sane-devel mailing list