elixir-gettext/gettext
69.5
Adequate · 3 October 2026
4.2k
lines of production code
Elixir
primary language
2
measurements over time
What this system is
Gettext is an internationalization library for Elixir that manages the extraction, merging, and runtime handling of translation files. It provides a structured backend system for defining translation modules, supporting features like pluralization, string interpolation, and locale switching. The system relies on dedicated Mix tasks to process PO and POT files, ensuring robust management of localized content across different languages.
How it got here
2015 — Gettext v1.0.0 release and backend restructuring
10 changes.
This period focused on the v1.0.0 release of Gettext, introducing a new backend architecture that replaces the legacy macro usage with explicit backend modules. The work included restructuring core components like the extractor and merger into dedicated Mix tasks, integrating the Expo library for PO file parsing, and expanding the test suite to cover locale management and interpolation logic.
2021–2022 — Pluggable interpolation support
4 changes.
The project introduced a pluggable interpolation module to allow custom message formatting strategies while maintaining backward compatibility through a default implementation. This feature was supported by comprehensive test coverage for the new interpolation logic and the addition of internationalization test fixtures for various locales and message types.
Behavioural changes
Gettext backend API and architecture restructured for v0.26.0
The library introduces a new \Gettext.Backend\ module that must be used to define backends, replacing the previous \use Gettext\ approach. This change separates backend definition from function usage, which now requires \use Gettext, backend: MyApp.Gettext\. The internal architecture is refactored with new modules including \Gettext.Compiler\ for code generation, \Gettext.ExtractorAgent\ for managing extraction state, and \Gettext.Interpolation\ for pluggable string interpolation. Additionally, new error types like \Gettext.MissingBindingsError\ and \Gettext.PluralFormError\ are introduced to provide more specific feedback during translation and pluralization.
lib/gettext · high confidence
Gettext v1.0.0 release with parallelized merging and new API
This entry covers the v1.0.0 release of Gettext, which introduces parallelized locale merging in \mix gettext.merge\ for improved performance, support for compile-time concatenation of sigils, and a new \Gettext.put\_locale!/2\ function. The release also increases the timeout for \mix gettext.extract\ to two minutes and ensures manifest removal is skipped only on Elixir v1.19.3+. Documentation and configuration files have been updated to reflect these changes.
(repo-wide) · high confidence
Introduces pluggable interpolation module with default implementation
The library now supports a pluggable interpolation strategy via the \Gettext.Interpolation\ behaviour. A new \Gettext.Interpolation.Default\ module provides the standard implementation, replacing \%{binding\_name}\ patterns with corresponding binding values at both runtime and compile time. This change allows users to define custom interpolation modules to handle message formatting differently if needed, while maintaining backward compatibility through the default behavior.
lib/gettext/interpolation · high confidence
Major documentation overhaul and API clarification for Gettext usage
The \Gettext\ module now includes comprehensive documentation that clarifies the modern workflow for internationalization, specifically highlighting the shift from the legacy \use Gettext\ macro (which defined macros directly in the calling module and caused slow recompilation) to the recommended \use Gettext.Backend\ pattern for backend modules and \use Gettext, backend: ...\ for importing macros. The entry provides a detailed 'Basic Overview' explaining the extraction and merging of \.pot\ and \.po\ files, including how fuzzy matching works when message IDs change, and explicitly documents the structure of the \priv/gettext\ directory, the \:priv\ configuration option, and the runtime locale management functions (\put\_locale\/\get\_locale\).
lib · high confidence
New \`mix gettext.extract\` and \`mix gettext.merge\` tasks replace the old compiler
The \:gettext\ compiler has been removed from \mix.exs\ and replaced by dedicated Mix tasks. A new \Mix.Tasks.Compile.Gettext\ task now warns users to remove \:gettext\ from their \compilers\ list. Functionality is moved to \Mix.Tasks.Gettext.Extract\, which extracts messages from source code into POT files (supporting \--merge\ and \--check-up-to-date\), and \Mix.Tasks.Gettext.Merge\, which merges updated POT files with existing PO files (supporting fuzzy matching, obsolete message handling, and parallel processing).
lib/mix · high confidence
Test coverage
Add PO editor fixture files for testing; Added Italian and Japanese test fixtures for plural and interpolation handling; Added comprehensive test suite for Gettext backend, extraction, and merging logic; Added test fixtures for PO file parsing scenarios; Added test fixtures for i18n message parsing; Added tests for Gettext interpolation module; Added tests for mix gettext.extract and mix gettext.merge tasks; Expanded test suite for locale management, interpolation, and backend configuration.
Dependencies
Upgrade to Gettext v1.0.2 with Expo integration and Elixir 1.16 requirement
This release updates the Gettext library to version 1.0.2, raising the minimum Elixir requirement to 1.16. It integrates the Expo library (version 1.1.1) to handle plural forms and PO file parsing, replacing previous internal implementations. The dependency manifest also includes Castore 1.0.19 for test coverage, Jason 1.4.5 for JSON handling in tests, and ExDoc 0.40.3 for documentation generation.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 69 → 70 (+0.3)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 58 → 58 (+0.0)
- Readiness 67 → 67 (+0.0)
- Security 85 → 87 (+2.2)
Resolved (2)
- Documentation: no architecture or design documentation (README.md)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
elixir-gettext/gettext was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0006cec94a4af0f1a8785bb15e3ab401a83df885 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.