This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This package provides some facilities for extracting and managing i18n messages that occur in Zope software. More specifically, i18n messages can occur in Python code, in Page Templates and in ZCML declarations. zope.app.locales provides a utility that can extract messages from all three and write them to a standard gettext template (pot file).

Detailed Documentation

Internationalization (I18n) and Localization (L10n)

This document assumes that you have a Zope 3 checkout and the gettext utilities installed.

Creating/Updating Message Catalog Template (POT) Files

Whenever you’ve made a change to Zope that affects the i18n messages, you need to re-extract i18n messages from the code. To do that, execute i18nextract.py from the utilities directory of your Zope 3 checkout:

$ python utilities/i18nextract.py -d zope -p src/zope -o app/locales

This will update the zope.pot file. Make sure that the checkout’s src directory is part of your PYTHONPATH environment variable.

After that, you need to merge those changes to all existing translations. You can do that by executing the i18nmergeall.py script from the utilities directory of your Zope 3 checkout:

$ python utilities/i18nmergeall.py -l src/zope/app/locales

Translating

To translate messages you need to do the following steps:

  1. If a translation for your language is already present and you just want to update, skip ahead to step 2. If you want to start translation on a new language, you need to

    1. create a directory

      src/zope/app/locales/<lang_code>/LC_MESSAGES

      with the appropriate code for your language as <lang_code>. Note that the two letters specifying the language should always be lower case (e.g. ‘pt’); if you additionally specify a region, those letters should be upper case (e.g. ‘pt_BR’).

    2. copy the zope.pot template file to <lang_code>/LC_MESSAGES/zope.po.

    3. edit the PO header of the newly created zope.po file and fill in all the necessary information.

  2. Translate messages within the PO file. Make sure the gettext syntax stays intact. Tools like poEdit and KBabel can help you.

  3. Finally, when you’re done translating, compile the PO file to its binary equivalent using the msgfmt tool:

    $ cd <lang_code>/LC_MESSAGES $ msgfmt -o zope.mo zope.po

CHANGES

3.7.5 (2016-03-28)

  • Add a test for the zcml_extraction.
  • Remove zope.app.applicationcontrol and zope.app.appsetup dependencies.
  • Add list of supported Python versions to Trove classifiers.

3.7.4 (2012-05-14)

  • In version 3.7.2 msgids and default values were forced to be unicode. This was too strict because at least the TAL extractor returns UTF-8 encoded default values. Fixed this by allowing the default value to be a string again.

3.7.3 (2012-01-06)

  • i18nextract bugfix: _(“msgid”, mapping={…}) does not have a default, just like _(“msgid”). Previously it would get a #. Default: "" annotation in the .pot file.

3.7.2 (2011-12-12)

  • Handle Unicode msgids and default values.
  • Consistent sorting of source filenames for each msgid. Also sort line numbers numerically, not lexicographically.

3.7.1 (2011-12-07)

  • Fix nl translations.
  • Updated Brazilian Portuguese translation [erico_andrei]

3.7.0 (2011-03-02)

  • Include zcml dependencies in configure.zcml, require the necessary packages via a zcml extra, added tests for zcml.
  • Using Python’s doctest module instead of depreacted zope.testing.doctest.

3.6.2 (2010-07-31)

  • Updated copyright to Zope Foundation, even in pot template.
  • Updated e-mail address in pot template to current address of zope mailing list.
  • Added missing test dependency on zope.i18n.

3.6.1 (2010-05-17)

  • Updated Dutch and German translations.

3.6.0 (2009-12-28)

  • Added configure.zcml which registers the translations in the package. So the package contains its configuration. (Till now it was done in zope.app.zcmlfiles.)

3.5.2 (2009-12-22)

  • Updated tests to handle Unicode correctly.
  • Update Japanese Translation (thanks Takeshi Yamamoto).

3.5.1 (2009-01-27)

  • Added missing dependency (zope.tal) for tests.

3.5.0 (2009-01-26)

  • Moved the dependencies of the extract console script into an extract extras_require to avoid runtime dependencies.
  • Fixed bug #227582 (bad size in zh_CN locale)

3.4.5 (2008-07-16)

  • added filePattern parameter for tal_strings to be able to not only parse .pt files.
  • Updated Dutch translation

3.4.4 (2008-03-05)

  • Updated Spanish translation

3.4.3 (2008-02-20)

  • Updated Spanish translation
  • Updated Japanese translation

3.4.2 (2008-02-06)

  • Fixed and updated Russian translation. Fixed issue #186628 (Typos and errors in russian translation)

3.4.1 (2007-12-12)

  • Fixed and updated the french translation

3.4.0 (2007-10-25)

  • Folded the i18nextract script into zope.app.locales.extract and exposed it as a console script entry point.

3.4.0a1 (2007-04-22)

  • Initial release as a separate project, corresponds to zope.app.locales from Zope 3.4.0a1
Release History

Release History

3.7.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.7.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.7.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.7.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.7.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.7.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.6.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.6.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.6.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.5.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.5.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.5.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

3.4.0a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zope.app.locales-3.7.5.tar.gz (1.2 MB) Copy SHA256 Checksum SHA256 Source Mar 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting