Skip to main content

Setuptools gettext extension plugin

Project description

setuptools plugin for gettext

Compile .po files into .mo files.

This plugin adds build_mo, clean_mo and install_mo subcommands for setup.py as well as hooking those into standard commands.

Usage

By default, setuptools_gettext compiles and installs mo files when there is a po directory present that contains .po files.

The .mo files are installed adjacent to your package as package data in a subdirectory called locale.

You can override these settings in pyproject.toml:

[build-system]
requires = ["setuptools", "setuptools-gettext"]
...

[tool.setuptools-gettext]
# directory in which the .po files can be found 
source_dir = "po"
# directory in which the generated .mo files are placed when building
build_dir = "breezy/locale"

Compilation tool

By default, either msgfmt or the translate-toolkit package is used to compile the .po files into .mo files - whichever is available.

The --msgfmt option can be used to force the use of msgfmt, and the --translate-toolkit option can be used to force the use of the translate-toolkit.

At the moment, msgfmt is preferred. In the future, the translate-toolkit will become the default.

You can use the translate-toolkit extra to install the translate-toolkit package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

setuptools_gettext-0.1.17.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

setuptools_gettext-0.1.17-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file setuptools_gettext-0.1.17.tar.gz.

File metadata

  • Download URL: setuptools_gettext-0.1.17.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for setuptools_gettext-0.1.17.tar.gz
Algorithm Hash digest
SHA256 9d292ec6fd6f567c226c8ea35440c7cbd8a51be44c8f87423bcda07eec26fe59
MD5 b174543f67ff064c445cab011c8047ca
BLAKE2b-256 6d3fce92daf54545d66a9efb3217e8a5d111b3bd7ab5da6b35b5ff521ce7df23

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gettext-0.1.17.tar.gz:

Publisher: python-distributions.yml on breezy-team/setuptools-gettext

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file setuptools_gettext-0.1.17-py3-none-any.whl.

File metadata

File hashes

Hashes for setuptools_gettext-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c45724b387ad41f71e960767b96e28dc41b50e179b1c29991ea3273f8c204f
MD5 4e4508bf4f81f03b04877d451bb5c735
BLAKE2b-256 eff9ca65e5308bc319d91cb7edd6979d5411f1b49567ac5a07d35daed8a8ebfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gettext-0.1.17-py3-none-any.whl:

Publisher: python-distributions.yml on breezy-team/setuptools-gettext

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page