A CLI tool to translate PO files using https://pofile.io/.
Project description
CLI for POFile.io
An easy-to-use CLI tool for translating PO files with POFile.io.
Description
This CLI tool automatically locates .po
files in your project and fills in missing translations using the POFile.io API service. It's designed to streamline the process of managing translations in software projects.
Getting Started
Prerequisites
- Python 3.7 or later
Installation
-
Activate your project's virtual environment.
-
Install the CLI with:
pip install pofile-cli
This will make the
pofile
command available. -
Create an account at POFile.io, log in, and copy your API key from the dashboard.
-
Set your API key by exporting it as an environment variable (recommended) or passing it directly with each command:
export POFILE_API_KEY=<your_api_key>
Usage
To populate all .po
files in the current project with translations, use:
pofile populate
Additional Options
Specify a Directory: To search for .po files in a specific directory, provide the path:
pofile populate <directory>
Set Maximum Directory Depth: Control how deep the tool searches within nested directories:
pofile populate --dir-depth <depth>
Skip Confirmation Prompt: Automatically proceed without a confirmation prompt:
pofile populate -y
Use an API Key Directly: If you prefer not to use an environment variable, you can specify your API key:
pofile populate --api-key <your_api_key>
Version History
- 0.1
- Initial Release
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pofile_cli-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f88493178724ed709e3d1a5c03e987f352b126e7f20578daa04efdb3af0020d2 |
|
MD5 | fb2a9dee95508eb1747affaace75b190 |
|
BLAKE2b-256 | baac9d1ec9df257d30ffa85969393192fa025d85d40dc6a6e2cd7dc1b0a3c330 |