Skip to main content

Translate en/messages.json to other locales.

Project description

> translate-messages

Translate en/messages.json to other locales automatically.

Installation

pip install translate-messages

Usage

Run the CLI:

translate-msgs

If no options are provided, the CLI will:

  1. Prompt for en/messages.json keys to ignore
  2. Search for closest _locales directory
  3. Translate en/messages.json to target languages

Options

Options can be set using command-line arguments:

Option Description
--include-langs Comma-separated list of languages to include (e.g. `en,es,fr")
--exclude-langs Comma-separated list of languages to exclude (e.g. en,es)
--ignore-keys Comma-separated list of keys to ignore (e.g. appName,author)
--locales-dir Name of the folder containing locale files (default: _locales)
--provider Translation provider to use
--init Create a .config.json file to store your defaults
--no-wizard Skip interactive prompts during start-up

Config file

  • Use --init to create translate-messages.config.json in your project root to set default options
  • CLI arguments always override config file

Example

translate-msgs --include-langs=fr,es --ignore-keys=appName,author

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

translate_messages-1.0.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

translate_messages-1.0.4-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file translate_messages-1.0.4.tar.gz.

File metadata

  • Download URL: translate_messages-1.0.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for translate_messages-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ebc5ed92f00e59ae7789d57d172070a84b9a4f07d9dfe8904ccac81f21964914
MD5 f26d0b98ead6b2962e45aa72d78ed997
BLAKE2b-256 98d9a76948f0446a3170bcf6d8e88da970cd425e4efa0dbf126cc0960b8ee8c1

See more details on using hashes here.

File details

Details for the file translate_messages-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for translate_messages-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f85f25e3e6f0454f0f58db7e24ba84804c29e65caf7db68b06874f1ff723ca10
MD5 804ef0f773e956120c5a53c8446cf17a
BLAKE2b-256 deaed2a366e261c66a8c524e95b2d6f4a751da72a2aa54ce7753ac35bf5d9975

See more details on using hashes here.

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