Drupal Translation Extractor 3 Alpha Fixes Longstanding String Extraction Gaps

Expanded Test Coverage Ahead of Drupal's Localize Upgrade
Discover Drupal graphic titled "The First Step in Translation Happens Inside the Code" with abstract code extraction illustrations. Explains how Drupal identifies translatable strings before localisation.

Developers working on Drupal's translation infrastructure have released Translation Template Extractor (potx) 3.0.0-alpha1, replacing the module's architecture and correcting longstanding problems with identifying translatable strings. Maintainer Gábor Hojtsy detailed the changes in a blog post published on 14 October 2026. The alpha supports Drupal 10, 11 and 12 and includes a redesigned interface and expanded automated tests.

The Translation Template Extractor module identifies interface text in Drupal core and contributed projects so that it can be made available for translation. It supplies the extraction process used by localize.drupal.org, where community members translate Drupal software into different languages. Errors in extraction can leave strings out of translation templates or prevent an entire project release from being processed. The new version addresses documented cases of both problems, although the improvements have not yet been deployed to the live localisation service.

Recovering Strings Missed by Earlier Extractors

One of the fixes concerns JavaScript translation calls that the previous extractor failed to recognise. According to Drupal.org issue #3630552, the earlier parsing rules overlooked strings when calls contained trailing commas, null arguments in certain positions or particular forms of JavaScript template literals. These patterns occur in Drupal core, including code used by administrative interfaces and CKEditor 5.

Tests against Drupal 11.4.9 core identified 26 additional strings after correcting the handling of trailing commas. Fixes involving null arguments and template literals identified two additional strings each. The affected text includes AJAX error messages, editor toolbar instructions and permission descriptions. The issue also references historical localisation data showing that some strings available in earlier Drupal releases were absent from later extraction results.

Another correction addresses failures while processing configuration files. A bug report involving the Diff module documented how an unexpected configuration schema value could stop extraction for an entire project release. With the corrected implementation, tests using Diff 2.1.1 generated a translation template containing 209 strings, including 153 from PHP and 56 from YAML. The extractor now records diagnostic information and continues processing instead of terminating the operation.

These results demonstrate that the revised code can identify strings missed by the previous implementation. They do not establish that the recovered strings are already available to translators through localize.drupal.org. That depends on the updated extractor being integrated into the localisation service and the relevant project releases being processed.

The release also incorporates fixes for older reports involving Twig translation contexts, plural forms, configuration schemas and other extraction cases. Some of these problems were first documented in 2016 and 2018. The official release notes list 19 resolved issues, covering changes across PHP, JavaScript, Twig and YAML processing.

Rebuilding the Extractor and Expanding Tests

Beyond these corrections, potx 3 replaces an implementation built around shared global functions and arrays. The earlier architecture relied on approximately 70 global functions and 16 global arrays, according to the architecture rewrite issue. This required callers to reset shared extraction state between operations. The rewritten module instead uses object-oriented services and separates individual extraction runs, allowing each operation to manage its own strings, diagnostics and configuration data.

The test suite has expanded from 24 to 107 test methods, covering Drupal 10, 11 and 12. Hojtsy also compared extraction output against earlier implementations using 51 project inputs, including Drupal core, widely used contributed projects and older Drupal releases. He reported that the new implementation retained the baseline strings identified by the previous extractor while adding strings attributable to verified bug fixes. The comparison provides regression-testing evidence for the rewrite, although it is not an independent assessment of every supported extraction pattern.

A New Interface and the Localize Upgrade

The module's interface has also been redesigned. Projects and submodules appear in grouped tables, with filtering and multiple-selection options replacing the previous nested selection controls. Export summaries have been revised, and the interface supports Claro and Drupal 12's Default Admin theme, including dark mode. These changes affect developers and maintainers who use the extractor directly rather than the translation interface on localize.drupal.org.

The release forms part of the wider effort to modernise Drupal's localisation infrastructure. Felip Manyer i Ballester and other contributors have been working on the upgrade of localize.drupal.org from its older Drupal implementation. The Localize Server 3.0.x roadmap documents migration, integration and testing tasks associated with that transition. Hojtsy's account identifies potx 3 as the intended extractor for the upgraded service, but does not establish a confirmed production deployment date.

The release remains 3.0.0-alpha1, making it an early version for testing rather than a stable production milestone. Developers can examine the changes and report problems through the project issue queue. Hojtsy credited more than 30 contributors for reports, patches, reviews and testing. Further integration work will determine when the revised extractor becomes part of Drupal's live community translation process and whether previously processed releases will be revisited to recover omitted strings.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related People

Upcoming Events