Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Translation Guide

This document provides guidelines for contributing translations to scoop.

Current Status

For the latest translation status, see:


Contribution Process

Step 1: Fork and Clone

git clone https://github.com/YOUR_USERNAME/scoop-uv.git
cd scoop-uv

Step 2: Add Translations

Edit locales/app.yml and add your language to every key:

create.success:
  en: "Created '%{name}' environment"
  ko: "'%{name}' 환경 생성됨"
  pt-BR: "Ambiente '%{name}' criado"
  { lang }: "Your translation here"  # Add your language code and translation

Important:

  • Add translations to ALL ~106 keys
  • Keep placeholder syntax exactly: %{name}, %{version}, etc.
  • Preserve special characters: , quotes, backticks

Step 3: Register Language

Edit src/i18n.rs and add your language to SUPPORTED_LANGS:

#![allow(unused)]
fn main() {
pub const SUPPORTED_LANGS: &[(&str, &str)] = &[
    ("en", "English"),
    ("ko", "한국어"),
    ("pt-BR", "Português (Brasil)"),
    ("{lang}", "Your Language Name"),  // Add your language
];
}

Language Code Format:

  • Use BCP 47 format
  • Simple languages: ja, fr, es, de, it
  • Regional variants: pt-BR, zh-CN, zh-TW, es-MX

Step 4: Test Locally

# Build and test
cargo build
cargo test

# Test your language (replace {lang} with your language code)
SCOOP_LANG={lang} ./target/debug/scoop --help
SCOOP_LANG={lang} ./target/debug/scoop lang

Step 5: Create Pull Request

Required files in PR:

  • locales/app.yml - All 106 keys translated
  • src/i18n.rs - Language registered in SUPPORTED_LANGS

PR Title Format:

docs(i18n): add {Language Name} translation

Style Guidelines

Philosophy: Your Language, Your Style

We trust translators. You know your language and community best.

  • Word choice is yours — Pick terms that feel natural to native speakers
  • Creativity welcome — Witty expressions are fine if they’re clear and widely understood
  • Casual over formal — scoop is a friendly CLI tool, not enterprise software

General Principles

  1. Concise: CLI messages should be short and clear
  2. Natural: Use natural phrasing, not word-for-word translation
  3. Casual: Friendly, approachable tone — like talking to a colleague
  4. Clear: Wit is great, but clarity comes first

Tone Examples

# Too formal (avoid)
"The environment has been successfully created."

# Too robotic (avoid)
"Environment creation: complete."

# Good - casual and clear
"Created 'myenv' — ready to go!"
"'myenv' is ready"

Message Types

TypeEnglish ExampleGuidance
Progress“Installing…”Use progressive/ongoing form
Success“Created ‘myenv’”Completion — feel free to add flair
Error“Can’t find ‘myenv’”Clear and actionable
Hint“→ Create: scoop create…”Helpful, not lecturing

Translator’s Discretion

These decisions are up to you:

  • Vocabulary: Choose words that resonate with your community
  • Idioms: Use local expressions if they fit naturally
  • Humor: Light wit is welcome (e.g., ice cream puns if appropriate)
  • Formality level: Lean casual, but match your culture’s CLI norms

Only requirement: The meaning must be clear to users.

Technical Terms

For technical vocabulary:

  1. Check your community — What do Python developers in your language use?
  2. Consistency — Pick one term and stick with it throughout
  3. Loanwords OK — If your community uses English terms (e.g., “install”), that’s fine

Tip: Study existing translations in locales/app.yml for reference, but don’t feel bound by them.


Glossary

Do NOT Translate

These terms should remain in English in all languages:

TermReason
scoopBrand name
uvTool name
pyenvTool name
condaTool name
virtualenvTechnical term
virtualenvwrapperTool name
PythonLanguage name
shellTechnical term (bash, zsh, fish)
JSONFormat name
PATHEnvironment variable
pipTool name

Commands - Never Translate

All commands and code examples must stay in English:

# WRONG - Command translated
hint: "→ Create: {translated_command} myenv 3.12"

# CORRECT - Only description translated
hint: "→ {translated_word}: scoop create myenv 3.12"

Common Terms to Translate

These are core concepts you’ll need to translate. Reference existing translations for consistency:

EnglishWhat to look for
environmentYour language’s term for “environment”
createCommon verb for “make/create”
remove/deleteCommon verb for “delete/remove”
installStandard software installation term
uninstallStandard software removal term
activateTerm for “enable/turn on”
deactivateTerm for “disable/turn off”
migrateIT term for migration (often kept as loanword)
versionYour language’s term for “version”
pathYour language’s term for file path
errorYour language’s term for “error”
successYour language’s term for “success”

Tip: Check how these terms are translated in existing translations for reference.

Ice Cream Metaphor (README only)

scoop uses ice cream metaphors in documentation:

TermMeaningGuidance
scoopThe toolAlways keep as “scoop”
flavorvirtualenvTranslate if the metaphor works in your language
freezer~/.scoop/ directoryTranslate if the metaphor works

Note: The metaphor is mainly in README.md, not in CLI messages (locales/app.yml).


File Structure

locales/app.yml

# Categories in order:
# 1. lang.*        - Language command messages
# 2. create.*      - Create command messages
# 3. remove.*      - Remove command messages
# 4. list.*        - List command messages
# 5. use.*         - Use command messages
# 6. install.*     - Install command messages
# 7. uninstall.*   - Uninstall command messages
# 8. migrate.*     - Migrate command messages
# 9. error.*       - Error messages
# 10. suggestion.* - Suggestion/hint messages

src/i18n.rs

#![allow(unused)]
fn main() {
// Language detection priority:
// 1. SCOOP_LANG environment variable
// 2. Config file (~/.config/scoop/config.toml)
// 3. System locale
// 4. Default: "en"

pub const SUPPORTED_LANGS: &[(&str, &str)] = &[
    ("en", "English"),
    // ... existing languages
    // Add new languages here
];
}

Common Mistakes

1. Missing SUPPORTED_LANGS Registration

Symptom: Translation exists but scoop lang {code} doesn’t work

Fix: Add language to src/i18n.rs SUPPORTED_LANGS

2. Broken Placeholders

# WRONG - Missing placeholder
error: "Cannot find environment"

# CORRECT - Placeholder preserved
error: "Cannot find '%{name}' environment"

3. Translating Commands

# WRONG - Command translated
hint: "→ List: {translated} list"

# CORRECT - Only label translated
hint: "→ {Translated Label}: scoop list"

4. Inconsistent Key Coverage

All languages must have ALL keys. Missing keys fall back to English.


Testing Checklist

Before submitting PR:

  • All 106 keys translated
  • All placeholders preserved (%{name}, %{version}, etc.)
  • Language registered in SUPPORTED_LANGS
  • cargo build succeeds
  • cargo test passes
  • SCOOP_LANG={code} scoop lang shows your language
  • Messages display correctly in terminal

Questions?

  • Open an issue: GitHub Issues
  • See existing translations for reference: locales/app.yml