You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -359,6 +359,41 @@ date = Date.new(2023, 8, 15)
359
359
=> ["1,000 $", "1.000 €", "1.000 €"]
360
360
```
361
361
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
+
362
397
## Development
363
398
364
399
Feedback, bug reports, ideas, and enhancements are welcome!
0 commit comments