Interpolation values
Keep named Elixir interpolation values aligned with the msgid.
Keep Gettext catalogs in priv/gettext and interpolation intact. Forthwith translates only new and changed messages, validates target catalogs, and writes PO updates ready for normal review.
$ forthwith check
[ERROR] Placeholder mismatch · Welcome, %{name}
priv/gettext/es/LC_MESSAGES/default.po:118 missing %{name}
Install path
Install Forthwith and run the local check from the umbrella or application root. It inspects supported Gettext catalogs without adding a Mix dependency or requiring a Forthwith project config.
Use Homebrew on macOS, the install script on Linux, or Scoop on Windows.
Keep the check beside your source code and existing localization resources.
Review actionable findings locally before creating an account or changing a file.
brew install Forthwith-LLC/forthwith/forthwith
cd path/to/your-project
forthwith check
Framework-aware validation
Validate the catalog details that can compile cleanly yet produce incomplete or broken localized output at runtime.
Keep named Elixir interpolation values aligned with the msgid.
Check the plural forms the target Gettext catalog can persist in its msgstr slots.
Find untranslated entries, empty msgstr values, and missing target messages.
Surface malformed PO syntax and duplicate messages with file locations.
Sample diff
Generated translations remain in the locale catalog alongside source references and interpolation syntax. No separate translation runtime or delivery layer is introduced.
--- a/priv/gettext/es/LC_MESSAGES/default.po+++ b/priv/gettext/es/LC_MESSAGES/default.po@@ -116,3 +116,3 @@ #: lib/example_web/live/account_live.ex:42 msgid "Welcome, %{name}"-msgstr ""+msgstr "Te damos la bienvenida, %{name}"
CI recipe
Run the local check beside compilation and tests to catch missing translations and interpolation drift with catalog-specific locations.
Validation needs no Forthwith token. Exit code 1 fails the job when errors are found; --warnings-as-errors also treats warnings as release blockers.
name: Phoenix Gettext localization
on: pull_request
jobs:
localization:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Forthwith
run: curl -fsSL https://raw.githubusercontent.com/Forthwith-LLC/forthwith-releases/main/install.sh | bash
- name: Validate localization files
run: forthwith check --warnings-as-errors
When you are ready to translate
After extracting messages with your normal Gettext workflow, initialize Forthwith and translate only new, changed, and missing entries. The resulting PO files stay ready for compilation and review.
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect