(c) 2005-2008, Hanno Schlichting (firstname.lastname@example.org)
Products.i18ntestcase is build on top of the ZopeTestCase package. It has
been developed to simplify testing of gettext i18n files for Zope products.
The Products.i18ntestcase package provides:
- The class ‘I18NTestCase’ of which you can derive your own test cases.
- The classes ‘PoTestCase.py’ and ‘PotTestCase.py’ which include a set
of common tests for po and pot files.
- The ‘test_i18n.py’ script, which you can put in your tests folder to
easily use all these already written tests.
Copying the test_i18n.py to your tests folder is the preferred way.
Changelog for i18ntestcase
- Allow laquo and raquo HTML entities in translations.
- Moved to a real package layout.
- Extended support for locales folder. Now both a locales folder and an
i18n folder are supported at the same time.
- Added ® to the allowed HTML entities and removed ™.
- Implemented support for locales folder layout as used by Zope3. If
there’s an i18n folder inside a product this is used however.
- Finally made running tests via ‘zopectl test’ work.
- Got rid of the last external binary dependency. Provided much nicer error
messages for missing or additional messages in comparision of pot and po
files. At least on Windows this results in a major speed improvement
(16 sec now, 150 sec before)!
- Lower-cased package name, to conform to Zope3/Python style
- Fixed an issue with getPoFiles not being strict enough on product
matching, resulting in plonelanguagetool po’s found for the plone product
- Move to new default comments (#. Default: “”) instead of old original
comments (# Original: “”).
- Adopted syntax for i18ndude 2.0. From this point forward i18ndude 1.x
is not supported anymore.
- Optimized slightly for speed (approx. 5% faster)
- Got rid of a bunch of external binary dependencies by replacing the
testNoDuplicateMsgId() test by the Python-only version taken from CPS.
- Reordered the “if __name__ == ‘__main__’:” magic calls in a way that
calling the test_i18n.py script directly also works.
- Tagged and released v0.1
TODO: Brief introduction on what you do with files - including link to relevant help section.