babbleon - Manage your app translations with ease.
Project description
babbleon
Manage your app translations with ease. babbleon is a command-line tool that helps you manage, validate, and generate translations for your applications.
Features
- 🚀 Quick Setup: Initialize translation configs with a single command
- ✅ Validation: Ensure translation references are valid and documented
- 🌍 Multi-language: Generate translations for multiple languages
- 📝 Documentation: Keep translation contexts organized
Installation
pip install babbleon-cli
Quick Start
- Initialize babbleon in your project:
babbleon init
- Add languages to your configuration:
babbleon config --add-language fr
- Generate translations:
babbleon translate all -o ./translations
Configuration
When you run babbleon init, it creates a .babbleon directory with three files:
1. babbleon.config.yaml
files:
reference: reference.yaml # Source translations file
docs: docs.md # Documentation file
languages:
- en # Default languages
- ko
- vi
2. reference.yaml
Your source translations in YAML format:
# Example structure
welcome:
title: "Welcome to our app!"
subtitle: "Get started by..."
errors:
not_found: "Page not found"
3. docs.md
Documentation for translators:
# Translation Documentation
## Welcome Screen
- `welcome.title`: Main welcome message on the landing page
- `welcome.subtitle`: Secondary text below the welcome message
## Error Messages
- `errors.not_found`: Shown when a page cannot be found
Commands
Config Management
# Add a language
babbleon config --add-language fr
# Remove a language
babbleon config --remove-language fr
# List configured languages
babbleon config --list-languages
Validation
# Validate all documentation references
babbleon validate docs
# Validate specific reference
babbleon validate ref welcome.title
Translation Generation
# Generate for specific language
babbleon translate generate fr -o fr.json
# Generate for all languages
babbleon translate all -o ./translations
CLI Reference
babbleon init
Initializes the babbleon configuration in your project.
babbleon config
| Option | Description |
|---|---|
--add-language CODE |
Add a language code |
--remove-language CODE |
Remove a language code |
--list-languages |
Show configured languages |
babbleon validate
| Command | Description |
|---|---|
docs |
Validate all docs references |
ref PATH |
Validate specific reference path |
babbleon translate
| Command | Description |
|---|---|
generate LANG [-o FILE] |
Generate translation for language |
all -o DIR |
Generate all translations |
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file babbleon-0.1.1.tar.gz.
File metadata
- Download URL: babbleon-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
850b5adc832131ddabf2c68cd4195e8c61545b18bb8106f70162d2ef0f592aa1
|
|
| MD5 |
73ce8a8951867c521eb6136230be4f37
|
|
| BLAKE2b-256 |
05ef3efa0e50ca6c969bf7c3700a823c57d7a83e1e369dc3d741c287441ed0b1
|
File details
Details for the file babbleon-0.1.1-py3-none-any.whl.
File metadata
- Download URL: babbleon-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c1665f4dd8b06fe5a681b966537525b545a1c6c0ff8bd2b4df43358f3d95402
|
|
| MD5 |
a199791b500a48ab0bdc50993622c89c
|
|
| BLAKE2b-256 |
cdc5df8554c630fc672527b858cf6e9ab949d4d3190584fe51174f7be72476f8
|