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.3.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.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: translate_messages-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ffae597ee1ff6cd1310a09620bf65e966da98d3fc248e4920058b809a039473c
MD5 64f9f2561d039912aac2887170ddd726
BLAKE2b-256 083e5cca8a420f6ca89b5f13c0b3f3d83676b5108feaf6c8fdeb3f942803e827

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for translate_messages-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0358cffc50f9ddf8f2e24507cac58244c3fa83e7d71ad38f9908b725b46802e6
MD5 dcf0a4a7bbc80d304b73744df4bc35c2
BLAKE2b-256 5fd4afe3fbdcc65b50508d415b7a494f5f83f5a010ed51f9c30bb04241079713

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