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 = "mypkg/locale"

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.2.tar.gz (3.4 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.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hatch_babel-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hatch_babel-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ae6c18dffd460d1a08650949338212880c025a3ff36e95b49b62bbe1dd9f3b87
MD5 19268ad1198ee5426f81cc753d826097
BLAKE2b-256 4ae97ccde937bcf8179d50402c950d0b50734d4deb100469f40c7f515008164a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_babel-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: hatch_babel-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hatch_babel-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34f6930b0dd65681e1a61be7317d44dbec313cdc0059c5237a6971fbb7eaca6a
MD5 7350624cb2dd234cc19a67f24faef2a2
BLAKE2b-256 23e488fd3db60bed0e2e044fae71bf820216872155ee3dea799ec82f8626a64f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_babel-0.1.2-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