#374301 liblocale-gettext-perl: Please extend documentation

Package:
liblocale-gettext-perl
Source:
liblocale-gettext-perl
Description:
module using libc functions for internationalization in Perl
Submitter:
Helge Kreutzmann
Date:
2011-08-31 09:00:45 UTC
Severity:
wishlist
#374301#5
Date:
2006-06-18 13:38:17 UTC
From:
To:
I currently try to figure out how liblocale-gettext-perl works, so I
started reading the man page, however, it just gives you a summary of
the options.

1. Please either add the "quick tutorial" of
  /usr/share/doc/liblocale-gettext-perl/README.gz in the man page or
  put at least /usr/share/doc/liblocale-gettext-perl/README.gz in SEE
  ALSO.

2. So I marked up a test string in the source to see how it works. So
   I am at Step 4 in the tutorial. Now this is the point where
   additional information would be highly welcome. First, why do you
   mention msgfmt(1) here? At this step it is not needed and you
   actually refer to it again in Step 5.

    Then I don't think the suggestion to hand-write the .po-file is
    not very sensible as it causes lots of (unnecessary) work and is
    error prone.

    As an (sensible) alternative you write:
    You can use the xgettext(1) utility to initially construct this
    file from all of the gettext() calls in your source code. It was
    designed for C but it works OK with perl.

    I was (so far, still reading the xgettext man and info pages)
    unsucessful to create a useful .po-file. (So I don't know how you
    define "OK")

    The main problem is how I tell xgettext which are my strings.
    First it seems to not like non-ASCII characters (I have some
    german comments atm) (got that working --from-code=ISO-8859-1).

    Then the file is almost empty, only the string in
    my $d = Locale::gettext->domain("rechnung");
    i.e. "rechnung" is offered for translation. (Which is of course
    wrong, as it is the gettext-domain, not a string in the programm).
    I tried playing with the "-k" option, unsucessfully. The only way
    to get all strings (and many more, unfortunately) is the "-a"
    option (and it gives a ton of warnings as well).

    Next I started reading the gettext info pages. They have a section
    regarding perl and even some examples (in
    /usr/share/doc/gettext-doc/examples/hello-perl) but those look
    differently from the documentation in this package.

    Finally I found, that
    -k --keyword="get"
    seems to be the proper options (I could not get $d->get to work).

3. To aid along this, a small example (with a Makfile, like in the
    gettext docu above) should be included.

#374301#10
Date:
2009-06-25 13:35:11 UTC
From:
To:
Hello,
did you have a chance to evaluate my suggestions for the
documentation?

Greetings

         Helge