Skip Menu |

This queue is for tickets about the Gettext CPAN distribution.

Report information
The Basics
Id: 70633
Status: new
Priority: 0/
Queue: Gettext

People
Owner: Nobody in particular
Requestors: fschlich [...] cis.fu-berlin.de
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.05
Fixed in: (no value)



Subject: Please extend documentation
I'm forwarding a Debian bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=374301), where a user makes extensive suggestions for improvements to the documentation. Florian -- Helge Kreutzmann <debian@helgefjell.de> writes: I currently try to figure out how Locale::gettext 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 README in the man page or put at least README 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.