Skip to main content

A hatch build-hook for compiling babel .po files to .mo files.

Project description

hatch-babel

A hatch build-hook to compile Babel *.po files to *.mo files at build time.

Usage

[build-system]
requires = ["hatchling", "hatch-babel"]
build-backend = "hatchling.build"

[tool.hatch.build.hooks.babel]
locale_dir = "pytr/locale"
include_po = false

Configuration

locale_dir: str

Relative path to the directory that contains the *.po files. Example layout:

mypkg/
    locale/
        de/LC_MESSAGES/messages.po
        en/LC_MESSAGES/messages.po
        fr/LC_MESSAGES/messages.po
        es/LC_MESSAGES/messages.po
pyproject.toml

Your locale_dir would be mypkg/locale.

include_po: bool

Whether to include the *.po files in the build artifact. Default is false.

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

hatch_babel-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

hatch_babel-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file hatch_babel-0.1.0.tar.gz.

File metadata

  • Download URL: hatch_babel-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hatch_babel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5fec09b5d1956d4227548320187c53c1876473a79986ae16eaf72012f8c7017a
MD5 1eb7d9cb4f530177b48f5ce41ce8d227
BLAKE2b-256 16caaadcb2b8a7c034e5601b2cd8a08993ffba612f1b0022c3c6ca730f868f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_babel-0.1.0.tar.gz:

Publisher: python.yaml on NiklasRosenstein/hatch-babel

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

File details

Details for the file hatch_babel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hatch_babel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hatch_babel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 965a6e85a4bfe7a42b30a78cfb24b57a59e2a065e81265dde27f0172b2770706
MD5 e0f6158fa8d51292384a6bdbcb440d90
BLAKE2b-256 426faaafa6f8ef83e62de8c4d9e68e2e03eaa7e1e5f9bd8227e49bcba66efd98

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_babel-0.1.0-py3-none-any.whl:

Publisher: python.yaml on NiklasRosenstein/hatch-babel

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