summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gettext.py
Commit message (Collapse)AuthorAgeFilesLines
* Added a test for the fix of SF bug #658233, where continuation linesBarry Warsaw2003-05-201-12/+52
| | | | | | | | in .po metadata caused a crash. Also, removed some unnecessary code. Backport candidate.
* Make tests clean up after themselves better. This means:Brett Cannon2003-04-271-2/+18
| | | | | | | | * call tearDown when Setup is called * shutil.rmtree the root of the created directory instead of just the leaf directory * set the LANGUAGE environment variable to what it was originally and not assume 'en'.
* UnicodeTranslationsTest.setUp(): Removed the coerce flag to theBarry Warsaw2003-04-241-1/+1
| | | | GNUTranslations constructor.
* Whitespace normalization.Tim Peters2003-04-241-1/+1
|
* From http://mail.python.org/pipermail/i18n-sig/2003-April/001557.htmlBarry Warsaw2003-04-111-125/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Expose NullTranslations and GNUTranslations to __all__ - Set the default charset to iso-8859-1. It used to be None, which would cause problems with .ugettext() if the file had no charset parameter. Arguably, the po/mo file would be broken, but I still think iso-8859-1 is a reasonable default. - Add a "coerce" default argument to GNUTranslations's constructor. The reason for this is that in Zope, we want all msgids and msgstrs to be Unicode. For the latter, we could use .ugettext() but there isn't currently a mechanism for Unicode-ifying msgids. The plan then is that the charset parameter specifies the encoding for both the msgids and msgstrs, and both are decoded to Unicode when read. For example, we might encode po files with utf-8. I think the GNU gettext tools don't care. Since this could potentially break code [*] that wants to use the encoded interface .gettext(), the constructor flag is added, defaulting to False. Most code I suspect will want to set this to True and use .ugettext(). - A few other minor changes from the Zope project, including asserting that a zero-length msgid must have a Project-ID-Version header for it to be counted as the metadata record.
* Patch #633547: Support plural forms. Do TODOs in test suite.Martin v. Löwis2002-11-211-111/+248
|
* Move the setting of os.environ['LANGUAGE'] to setup(), and reset it toGuido van Rossum2002-07-201-1/+2
| | | | 'en' in teardown(). This way hopefully test_time.py won't fail.
* Update an email address.Barry Warsaw2001-08-281-10/+10
|
* Quick and dirty fix for test_extcall failures trigged by Guido'sBarry Warsaw2001-08-241-2/+2
| | | | | | | recent classobject.c change. When calling an unbound method with no instances as first argument, the error message has changed. The message now contains the class name, but the output text being compared to is too generic, so skip printing it.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-5/+5
|
* For current directory use os.curdir, not ".".Jack Jansen2000-09-151-2/+2
|
* Expand the test suite to test both the GNU gettext and translationBarry Warsaw2000-08-301-252/+128
| | | | class-based APIs.
* Open binary files in binary mode. Fixes test failure under Windows.Tim Peters2000-08-261-1/+1
|
* Group consensus is that supporting alternative locale categories isBarry Warsaw2000-08-251-6/+0
| | | | useless. So the test of the dcgettext() function is removed.
* Set this test up so that we don't have to create xx/LC_MESSAGES in theBarry Warsaw2000-08-251-66/+320
| | | | | cvs tree. It creates the directory and gettext.mo file on the fly, from the base64 encode binary data.
* Test suite for new gettext.py module.Barry Warsaw2000-08-251-0/+76