Utility library for i18n relied on by various Repoze and Pyramid packages
A library used by various Pylons Project packages for internationalization (i18n) duties related to translation.
This package provides a translation string class, a translation string factory class, translation and pluralization primitives, and a utility that helps Chameleon templates use translation facilities of this package. It does not depend on Babel, but its translation and pluralization services are meant to work best when provided with an instance of the babel.support.Translations class.
Please see http://docs.pylonsproject.org/projects/translationstring/dev/ or the docs/index.rst file in this package for the documentation.
- Fix Python 3-specific test failures.
- Restore compatibility with Python 3.2.
- Add support for message contexts.
- If the object passed to a TranslationStringFactory __call__ method is itself a translation string, use the passed object’s domain instead of the domain passed to the factory’s contstructor. See https://github.com/Pylons/translationstring/pull/12 .
- Add MANIFEST to make sure all files are present in a release. This fixes ticket 8.
- coerce non-string values to a string during translation, except for None.
- Honour mapping information passed to the translator, combining it with mapping data already part of the translation string.
- Support formatting of translation strings with %-operator.
- Python 3 compatibility (thanks to Joe Dallago, GSOC student).
- Remove testing dependency on Babel.
- Moved to GitHub (https://github.com/Pylons/translationstring).
- Added tox.ini for testing purposes.
- Preserve default translations even if they are an empty string. This fixes problems with Chameleon being unable to determine if a translation is present or not.
- Add __getstate__ and __reduce__ methods to translation string to allow for pickling.
- Fix bug in ChameleonTranslate. When i18n:translate was used in templates, a translation string was inappropriately created with a default value of the empty string. Symptom: template text would “disappear” rather than being returned untranslated.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size translationstring-1.3-py2.py3-none-any.whl (15.9 kB)||File type Wheel||Python version 2.7||Upload date||Hashes View hashes|
|Filename, size translationstring-1.3.tar.gz (29.3 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for translationstring-1.3-py2.py3-none-any.whl