[Python-bugs-list] [ python-Bugs-463572 ] Misleading documentation for gettext (original) (raw)
noreply@sourceforge.net noreply@sourceforge.net
Thu, 18 Oct 2001 12:41:49 -0700
- Previous message: [Python-bugs-list] [ python-Bugs-441409 ] re.compile of non-string misleading
- Next message: [Python-bugs-list] [ python-Bugs-456504 ] Memory leak in PyString_FromString
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bugs item #463572, was opened at 2001-09-21 07:43 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=463572&group_id=5470
Category: Documentation Group: Python 2.1.1
Status: Closed Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Barry Warsaw (bwarsaw) Summary: Misleading documentation for gettext
Initial Comment: in location: http://www.python.org/doc/2.1.1/lib/node187.html
there are docs for translation(), but there is no indication or link to mappings between the supplied language and the subdirectory actually searched. A link to the relevant information would help people considerably, or rather an NB mentioning that the 'languages' in the translation() docs is not the plural of the 'language' in the find() docs.
Once I'd renamed my French resource directores fr -> fr_FR it all worked, of course, but I only discovered this from debugging gettext :(
kind regards,
-Simon Harrison.
On a side note, I have an alternative pygettext.py
that inserts the English as the translated text when
the "-t" option is supplied (test). This has been
fairly useful since it allows me to run the code, and
test for correct operation prior to real translation.
I can supply the new version if useful.
Comment By: Barry Warsaw (bwarsaw) Date: 2001-10-18 12:41
Message: Logged In: YES user_id=12800
Hmm, I think there is are some misunderstandings. First, both find() and translation() take a list of strings as their languages argument. In fact, the first three arguments to translation() are passed straight through to find()!
Second, the documentation for find() clearly describes how the arguments map to the search directories. I'm not sure how that could be any clearer.
There is one mistake in find() though: it claims that all arguments are strings, but that's not the case for the languages argument, which in fact should be a list of strings. I will clarify that in the docs.
Your pygettext.py addition sounds interesting. If you'd like me to look at it and perhaps add it to the tool, please send it directly to me: barry@zope.com
Comment By: Fred L. Drake, Jr. (fdrake) Date: 2001-09-21 08:06
Message: Logged In: YES user_id=3066
Assigned to Barry.
You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=463572&group_id=5470
- Previous message: [Python-bugs-list] [ python-Bugs-441409 ] re.compile of non-string misleading
- Next message: [Python-bugs-list] [ python-Bugs-456504 ] Memory leak in PyString_FromString
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]