mix gettext_ops.search_value (gettext_ops v0.1.1)

View Source

Search for translation entries by msgstr (translated text) in .po files.

Usage

mix gettext_ops.search_value PATTERN [options]

Arguments

  • PATTERN - The search pattern (substring or regex)

Options

  • --locale - (required) Locale to search in (e.g., "sv", "en")
  • --domain - Domain to search in (defaults to configured default_domain)
  • --regex - Treat pattern as regex instead of substring
  • --limit - Maximum number of results to return
  • --json - Output in JSON format (line-delimited)

Examples

# Substring search (case-insensitive)
mix gettext_ops.search_value "Välkommen" --locale sv

# Regex search for translations starting with "Fel"
mix gettext_ops.search_value "^Fel" --locale sv --regex

# JSON output with limit
mix gettext_ops.search_value "knapp" --locale sv --json --limit 5