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.16.tar.gz (16.8 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.16-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for setuptools_gettext-0.1.16.tar.gz
Algorithm Hash digest
SHA256 aeae31fbf701e1a45e7e245867a07701e33ebe463994f105f496e832f6393f91
MD5 9b3da8a4f0b9bd52b4de84ae1b43e4eb
BLAKE2b-256 7fe69b5d065dd3ab416a00350f5321653e3b31bc56c104ad6d45fcc1c8c090bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gettext-0.1.16.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.16-py3-none-any.whl.

File metadata

File hashes

Hashes for setuptools_gettext-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 9240da0e77937390aa0a45432d9dc2635f61b298c2ca5178bd36ebe6fcdbf345
MD5 b08cb93604fe43634bbc96bebc5a4c58
BLAKE2b-256 fc19b1335ba439133281a9dd0bcc7df10486d7f8af71401672f5a3adc2c6aaa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gettext-0.1.16-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