mix gettext_ops.list_untranslated (gettext_ops v0.1.1)

View Source

List all entries with empty translations in .po files.

This is one of the most frequently used commands for developers and LLMs. It shows what needs translation without loading entire .po files, making it extremely token-efficient for AI agent workflows.

Usage

mix gettext_ops.list_untranslated [options]

Options

  • --locale - (required) Locale to list untranslated entries from (e.g., "sv", "en")
  • --domain - Domain to search in (defaults to configured default_domain)
  • --limit - Maximum number of results to return (useful for LLMs)
  • --json - Output in JSON format (line-delimited)

Examples

# List all untranslated Swedish entries
mix gettext_ops.list_untranslated --locale sv

# Get first 10 as JSON (perfect for LLMs)
mix gettext_ops.list_untranslated --locale sv --json --limit 10

# Count untranslated entries
mix gettext_ops.list_untranslated --locale sv | grep "msgid" | wc -l

# Save to file for translation
mix gettext_ops.list_untranslated --locale sv --json --limit 20 > to_translate.json

Token Efficiency

Instead of reading a 5000-line .po file (~15k tokens), this command returns only the untranslated entries (e.g., 10 entries ~500 tokens), making it ideal for LLM workflows.