Skip to content
CAI
Software that uses CAICheck a score

elixir-gettext/gettext

66.0

Adequate · 15 November 2026

4.6k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 66 (-0.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 97 → 96 (-0.5)
  • Architecture 100 → 99 (-0.2)
  • Maturity 53 → 53 (-0.5)
  • Readiness 67 → 67 (+0.0)
  • Security 83 → 81 (-2.2)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (3)

  • Edited copy of a member (14 corresponding lines) (lib/gettext/compiler.ex)
  • Edited copy of a member (8 corresponding lines) (lib/gettext/extractor.ex)
  • Off-boarding risk: anonymized user #1

Written by cca.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 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b2c62ff9dff4dade26a3428d7d6b8761b063b6d4 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.