Skip to content

Commit 20389ac

Browse files
Copilotmarkets
andcommitted
Update README with CLI tool documentation
Co-authored-by: markets <[email protected]>
1 parent eae8320 commit 20389ac

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,41 @@ date = Date.new(2023, 8, 15)
359359
=> ["1,000 $", "1.000 €", "1.000 €"]
360360
```
361361

362+
## CLI Tool
363+
364+
`MiniI18n` includes a CLI tool for managing translations between developers and translators. The tool provides a simple workflow: export all translations to a single CSV file, send it to translators, and import the updated translations back to the original YAML files.
365+
366+
```
367+
Usage: mi18n [command] [options]
368+
369+
Commands:
370+
stats Show translation statistics
371+
missing [--locale=LOCALE] Show missing translation keys
372+
import [--file=FILE] Import translations from CSV file
373+
export [--file=FILE] Export translations to CSV file
374+
version Show version
375+
help Show this help message
376+
377+
Export/Import Workflow:
378+
1. Run 'mi18n export' to create a single CSV file from all YAML translation files
379+
2. Send CSV file to translators for translation/review
380+
3. Run 'mi18n import' to update original YAML files with translated content
381+
382+
Key Features:
383+
- Single CSV file contains all translations with clean, readable keys
384+
- Import automatically finds and updates the correct YAML files
385+
- Preserves original file structure and organization
386+
- Clean translation keys without file path information
387+
388+
Examples:
389+
mi18n stats
390+
mi18n missing --locale=es
391+
mi18n export # Creates translations.csv with all translations
392+
mi18n export --file=custom.csv # Creates custom.csv with all translations
393+
mi18n import # Updates YAML files from translations.csv
394+
mi18n import --file=custom.csv # Updates YAML files from custom.csv
395+
```
396+
362397
## Development
363398

364399
Feedback, bug reports, ideas, and enhancements are welcome!

0 commit comments

Comments
 (0)