This guide explains how to add new languages and translate content for cli-cheatsheet.
Choose your language / Выберите язык
| Language | Documentation |
|---|---|
| 🇺🇸 English | TRANSLATION_GUIDE.md (current) |
| 🇷🇺 Русский | docs/ru/TRANSLATION_GUIDE.md |
- Overview
- Adding a New Language
- Translation Process
- Translation Guidelines
- Testing Translations
- Common Issues
- Examples
cli-cheatsheet uses a modular translation system with JSON files organized by utility. Each language has its own directory containing translation files for each supported utility.
localizations/
├── en/ # English (base language)
│ ├── git.json # Git translations
│ ├── docker.json # Docker translations
│ ├── vim.json # Vim translations
│ └── ... # Other utilities
├── ru/ # Russian
│ ├── git.json # Git translations
│ ├── docker.json # Docker translations
│ ├── vim.json # Vim translations
│ └── ... # Other utilities
└── your_lang/ # Your new language
├── git.json # Git translations
├── docker.json # Docker translations
├── vim.json # Vim translations
└── ... # Other utilities
Templates use a simple substitution system with [[key]] placeholders:
# [[git_title]]
$ git status
> [[git_status_description]]
Create a new directory in localizations/:
mkdir localizations/your_langCopy all JSON files from localizations/en/ to your new directory:
cp localizations/en/*.json localizations/your_lang/For each utility file (e.g., git.json, docker.json), translate the values while keeping the keys unchanged:
{
"git_title": "Git Spickzettel",
"git_status_description": "Status des Arbeitsverzeichnisses anzeigen",
"git_add_description": "Alle Änderungen zum Staging hinzufügen"
}./cheat.sh lang your_lang
./cheat.sh list
./cheat.sh git- Add your language to the language selector in
README.md - Create translated documentation in
docs/
- Titles: Used as headers in cheat sheets (e.g.,
git_title) - Descriptions: Explain what commands do (e.g.,
git_status_description) - Commands: Usually kept in English (technical terms)
- High Priority: Titles and descriptions
- Medium Priority: Error messages and help text
- Low Priority: Technical terms (can remain in English)
- Use consistent terminology throughout all utility files
- Maintain the same tone and style across translations
- Keep translations concise but clear
- Keep keys unchanged - only translate values
- Use proper grammar - maintain sentence structure
- Be consistent - use the same terms for similar concepts across utilities
- Keep it concise - avoid overly long descriptions
- Commands: Usually kept in English (e.g.,
git,docker,vim) - File extensions: Keep as is (e.g.,
.txt,.json) - Paths: Keep as is (e.g.,
/usr/local/bin) - Flags and options: Keep as is (e.g.,
-m,--help)
- Date formats: Use local conventions if mentioned
- Number formats: Use local conventions if needed
- Examples: Adapt to local context when appropriate
{
"key_name": "Translation value",
"another_key": "Another translation"
}- Use 2-space indentation
- Sort keys alphabetically within each file
- Use descriptive key names
- Keep values on single lines when possible
# Switch to your language
./cheat.sh lang your_lang
# Test all utilities
./cheat.sh bash
./cheat.sh git
./cheat.sh docker
./cheat.sh vim
./cheat.sh curl
./cheat.sh find
./cheat.sh awk
./cheat.sh tmux
./cheat.sh ssh
./cheat.sh systemctl
./cheat.sh tar
./cheat.sh htop
# Test search functionality
./cheat.sh search test
# Test help
./cheat.sh help- All utilities display correctly
- No missing translations (shows
{key}) - Text fits well in terminal
- No broken characters or encoding issues
- Search works with translated content
- All utility files are translated
If you see {key_name} in output, the translation is missing:
{
"missing_key": "Add this translation"
}If a utility doesn't work, check if the translation file exists:
ls localizations/your_lang/- Use UTF-8 encoding for all files
- Test with different terminal encodings
- Avoid special characters that might not display properly
If translations are too long for terminal display:
- Make them more concise
- Use abbreviations where appropriate
- Consider breaking into multiple lines if needed
- Use a glossary of common terms
- Review all translations for consistency
- Ask native speakers to review
{
"git_title": "Git Spickzettel",
"git_status_description": "Status des Arbeitsverzeichnisses anzeigen",
"git_add_description": "Alle Änderungen zum Staging hinzufügen",
"git_commit_description": "Änderungen mit Nachricht committen"
}{
"git_status_description": "This command shows the current status of your git repository working tree and staging area with detailed information about tracked and untracked files",
"git_add_description": "Add all the changes that you have made to the files in your working directory to the staging area for the next commit"
}localizations/de/
├── git.json # Git translations
├── docker.json # Docker translations
├── vim.json # Vim translations
├── bash.json # Bash translations
├── curl.json # cURL translations
├── find.json # Find translations
├── awk.json # AWK translations
├── tmux.json # Tmux translations
├── ssh.json # SSH translations
├── systemctl.json # Systemctl translations
├── tar.json # Tar translations
└── htop.json # htop translations
- Keep command names in English
- Translate descriptions to be clear and concise
- Use consistent terminology for Git concepts
- Keep Docker-specific terms in English when appropriate
- Translate descriptions to explain container concepts clearly
- Keep Vim modes and commands in English
- Translate descriptions to explain what each command does
- Keep shell syntax in English
- Translate descriptions to explain shell concepts
- Issues: Create an issue for translation problems
- Discussions: Use GitHub Discussions for questions
- Review: Ask native speakers to review your translations
Thank you for helping make cli-cheatsheet available in more languages! Your contributions help users around the world.
- Please create a separate branch and pull request for each utility translation (e.g.,
bashinde). - Do not combine multiple translations in a single PR.
- Example branch name:
translation/bash-de - Example commit message:
feat(translation): add bash cheat sheet in German (de) - Use Conventional Commits for your commit messages.
- See translation issues for available tasks.
All contributors are listed in the README.md and updated automatically using all-contributors. Make a PR and see yourself in the list!