Skip to main content

zope.i18n

Latest release Supported Python versions https://travis-ci.org/zopefoundation/zope.i18n.svg?branch=master https://coveralls.io/repos/github/zopefoundation/zope.i18n/badge.svg?branch=master Documentation Status

This package implements several APIs related to internationalization and localization.

  • Locale objects for all locales maintained by the ICU project.

  • Gettext-based message catalogs for message strings.

  • Locale discovery for Web-based requests.

CHANGES

4.3.0 (2017-12-18)

  • Ensure that all files are properly closed when compiling .mo files, such as when the registerTranslations ZCML directive is used.

  • Remove the private _compat module and its utility function _u in favor of Unicode literals.

  • TranslationDomain no longer extends SimpleTranslationDomain. It overrode every method and didn’t properly initialize the super class. TranslationDomain continues to implement ITranslationDomain.

  • TranslationDomain and GettextMessageCatalog now ensure that their domain and language attributes are text in order to match their respective interfaces. Byte strings (such as native string literals on Python 2) are decoded using UTF-8.

  • Fix LocaleCalendar.getFirstWeekDayName. Previously it raised a KeyError when the week mapping contained an integer for firstDay as documented.

  • Reach 100% test coverage and maintain in through tox.ini and coveralls.io.

  • Override values in InheritingDictionary. Previously it implemented a separate value method by mistake.

  • Fix parsing times with a timezone. Previously it could raise a TypeError.

4.2.0 (2017-05-23)

  • Better error message on PO-File Syntax Errors. [SyZn]

  • Add support for Python 3.5 and 3.6.

  • Drop support for Python 2.6, 3.2 and 3.3.

  • Support for formatting really small numbers, e.g. 1e-9. These numbers needs special treatment, because standard str(x) collapses them to scientific representation.

  • Support for specifying rounding in NumberFormatter. This is required in some cases, e.g. when you format a Decimal(‘0.9999’) that sould not be rounded. Currently, formatting Decimal(‘0.99999’) will raise a TypeError if rounding is not set to False

4.1.0 (2015-11-06)

  • interpolate() now works recursively, if the mapping has a value which is a zope.i18nmessageid.Message itself.

4.0.1 (2015-06-05)

  • Add support for Python 3.2 and PyPy3.

4.0.0 (2014-12-20)

  • Add support for testing with Travis.

  • Add explicit support for Python 3.4 and PyPy.

4.0.0a4 (2013-02-18)

  • Restore zope.i18n.testing.{setUp,PlacelessSetup} that got lost in 4.0.0a3. These require zope.publisher, which is not ported to Python 3 yet, so I haven’t added it back to install_requires in setup.py. User beware.

4.0.0a3 (2013-02-15)

  • Add support for Python 3.3.

  • Log DEBUG when loading translations from directories.

  • Replace zope.interface.implements usage with equivalent zope.interface.implementer decorator.

  • Drop support for Python 2.4 and 2.5.

3.8.0 (2012-03-15)

  • Add optional domain attribute to registerTranslations directive to only load the specified translation domain. Allows to move catalogs to /usr/share/locale and avoid loading hundreds of unrelated domains.

  • Include meta.zcml files in our own zcml configuration as needed, added a test for our configure.zcml.

  • Update zope.i18n.NAME_RE to be identical to zope.tal as required by the comment next to it. Fixes #611746.

3.7.4 (2010-07-08)

  • Add missing test dependency on zope.testing.

3.7.3 (2010-04-30)

  • Remove of ‘zope.testing.doctestunit’ in favor of stdlib’s ‘doctest.

3.7.2 (2009-12-14)

  • It’s a critical error when the GetText library is unavailable and compilation is required.

  • Use getSiteManager rather than getGlobalSiteManager in ZCML (these should be one in the same in any non-fancy setup, however if you’ve hooked getSiteManager, you want the ZCML handler to use the hooked version).

3.7.1 (2009-08-07)

  • Fix the interpackage translation domain merging feature to actually work. We need to defer the merging into the ZCML handler execution phase, as the utilities don’t exist yet during the ZCML parsing phase. Thx to Andreas Zeidler for finding and fixing the issue in PlacelessTranslationService in the first place.

  • Fix translation domains translating a message for a different domain. In the process, fix testMessageIDTranslateForDifferentDomain which seemed to work by mistake as the “other” and “default” domains used the same catalog. This is basically a reversion of 39991.

3.7.0 (2009-03-18)

  • Update data to CLDR 1.1. This introduces contextual month and day names and different month/day name widths. More CLDR updates are expected, see the “nadako-cldr” branch of zope.i18n.

  • Add configure.zcml that registers standard negotiator utility and includes zope.i18n.locales configuration. This was previously done by zope.app.i18n.

3.6.0 (2008-10-26)

  • Fix a test failure in the compile mo file support.

  • Move the zcml support into an extra. This reduces the dependencies of a standard zope.i18n install by half a dozen packages.

3.5.0 (2008-07-10)

  • Feature: Add new top-level negotiate function, which can be used to negotiate the language when the available languages are set globally via zope_i18n_allowed_languages.

  • Feature: Add support for restricting the available languages. We support an environment variable called zope_i18n_allowed_languages now, which is a list of comma or space separated language codes. If the environment variable is set, the ZCML registration will only process those folders which are in the allowed languages list.

  • Feature: Add optional automatic compilation of mo files from po files. You need to depend on the zope.i18n [compile] extra and set an environment variable called zope_i18n_compile_mo_files to any True value to enable this option.

  • Feature: Re-use existing translation domains when registering new ones. This allows multiple packages to register translations in the same domain. If the same message exists in multiple catalogs the one registered first will take precedence.

  • Feature: Recursive translations of message strings with mappings (https://bugs.launchpad.net/zope3/+bug/210177), thanks to Hermann Himmelbauer for the inital patch.

  • Bug: When parsing a date, the parsing pattern did not ensure that the line started and ended with the matching pattern, so that ‘1/1/2007’ parsed into ‘1/1/20’ for example.

3.4.0 (2007-10-02)

  • Update meta-data. No code changes.

3.4.0b5 (2007-08-15)

  • Bug: Fix dependency on zope.component to require it with the ‘zcml’ extra instead of requiring zope.security directly.

3.4.0b4 (2007-07-19)

  • Bug: Number parsing was too forgiving, allowing non-numerical and/or formatting characters before, after and within the number. The parsing is more strict now.

3.4.0b3 (2007-06-28)

  • Bug: There was a bug in the parser that if no decimal place is given you still had to type the decimal symbol. Corrected this problem (one character ;-) and provided a test.

3.4.0b2 (2007-06-25)

  • Feature: Add ability to change the output type when parsing a number.

3.4.0b1 (?)

  • Bug: Fix dependency on zope.security to require a version that does not have the hidden dependency on zope.testing.

Note: Releases between 3.2.0 and 3.4.0b1 were not tracked as individual packages. The changes can be reconstructed from the Zope 3 changelog.

3.2.0 (2006-01-05)

  • Corresponds to the verison of the zope.i18n package shipped as part of the Zope 3.2.0 release.

  • Add a picklable offset-based timezone to ‘pytz’, a la zope.app.datetimeutils’. Added tests in ‘zope.i18n’ to show that we need something like it, and then actually use it in ‘zope.18n.format’.

  • Add support for parsing / formatting timezones using ‘pytz’ (new external dependency).

  • Implement remaining date/time formatters, including adding week information to the calendar.

3.0.0 (2004-11-07)

  • Corresponds to the version of the zope.i18n package shipped as part of the Zope X3.0.0 release.

Metadata

Release files for zope.i18n 4.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zope.i18n 4.3.0
File Size Uploaded Provenance Actions
zope.i18n-4.3.0.tar.gz 617.9 kB Without provenance Details for zope.i18n-4.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zope.i18n 4.3.0
File Interpreter ABI Platform Actions
zope.i18n-4.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for zope.i18n-4.3.0-py2.py3-none-any.whl

Total release size: 1.4 MB

Release files / zope.i18n-4.3.0.tar.gz

Download URL zope.i18n-4.3.0.tar.gz
Size 617.9 kB
Tags Source
SHA-256 checksum
How to use checksums
42a373cfcc1fc9e028a27804f765dcc6de9ff0c88e60f2263bfa1ab23e2dcfe9
BLAKE2b-256 checksum
How to use checksums
b6f6188278536d798b663ba9a664ead65e542e9013a2603c8d0d7689b3543d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zope.i18n-4.3.0-py2.py3-none-any.whl

Download URL zope.i18n-4.3.0-py2.py3-none-any.whl
Size 791.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a8b87442854886da30476746d3412e3749b0979614b193376f41c1e6c2f14c8b
BLAKE2b-256 checksum
How to use checksums
899ff94dcd9f0bd93b9bd016d30844fa3d845f9f29f35ba40bffa7c222b1de3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for zope.i18n 4.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page