# `GettextTranslator.Util.Extractor`
[🔗](https://github.com/marmend-company/gettext_translator/blob/main/lib/gettext_translator/util/extractor.ex#L1)

Handles extraction and merging of gettext translations.

In development (Mix available), runs `mix gettext.extract --merge --no-fuzzy`.
In production (no Mix), falls back to merging .pot files into .po files using Expo.

# `extract_and_merge`

```elixir
@spec extract_and_merge(String.t()) :: {:ok, String.t()} | {:error, any()}
```

Extracts and merges gettext translations.

Uses `mix gettext.extract --merge` in dev, or merges .pot files directly in prod.

## Parameters

  - `gettext_path` - The path to the gettext directory

## Returns

  - `{:ok, message}` on success
  - `{:error, reason}` on failure

## Examples

    iex> Extractor.extract_and_merge("/path/to/priv/gettext")
    {:ok, "Extraction complete: ..."}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
