What the module does:
Project Browser Localizer translates the Drupal Project Browser: it fetches
localized module metadata (titles, summaries, descriptions, categories) from
a central Translation Hub and overlays the drupal.org JSON:API results with
reviewed translations, so non-English site builders can browse modules in
their language. Translated cards are marked with a language-flag badge,
and code samples in descriptions get self-hosted (no CDN) syntax highlighting.
How it differs from similar projects:
There is no other module providing localized Project Browser metadata.
The module does not replace the Project Browser source plugin UI-visibly —
it transparently decorates the existing drupalorg_jsonapi source, and it is a
pure consumer of translations (editing/reviewing happens in the separate
Translation Hub application). A quality gate ensures only explicitly
reviewed translations (is_reviewed: true) are shown by default.
Security-relevant design points:
- All hub-provided HTML passes through Xss::filterAdmin() before rendering.
- Hub URLs are validated against SSRF (scheme allow-list, public-IP check).
- Machine names are sanitized against path traversal before filesystem use.
- The codebase passes phpcs --standard=Drupal,DrupalPractice with zero
errors and warnings; services use dependency injection; config has a
schema; unit tests cover the HTML-escaping and patch-applicability logic.
See the module in action:
- Install Drupal CMS and select German as the default language during
- installation.
- composer require 'drupal/pb_localizer:^3.0'
- Enable the module: drush en pb_localizer — no configuration needed.
- Open /admin/modules/browse: module titles, summaries, descriptions and
category names now appear in German, translated cards show a language-flag
badge, and code samples in the descriptions are syntax-highlighted.
For multilingual sites there is a required patch for project_browser shipped
in patches/3589327-fix-multilingual-cache-collision.patch (upstream issue:
https://www.drupal.org/node/3589327). It is applied automatically via
cweagans/composer-patches; see the README for setup. Without it, Project
Browser caches the first-requested language for all users.
To test multi language sites support, we recommend installing French after applying the patch.
Single language sites do not need the patch.
Comments
Comment #2
joachim namysloComment #3
vishal.kadamComment #4
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review. See also Policy on the use of AI when contributing to Drupal, which is valid when contributing to Drupal, either by committing code in a project, or by creating a merge request for an existing project.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #5
avpadernoRemember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
Comment #6
joachim namysloComment #7
vishal.kadam1. FILE: pb_localizer.info.yml
The dependencies follow the format
<project name>:<module name>.2. FILE: pb_localizer.module
For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
It would require increasing the minimum Drupal 10 version supported, but Drupal 10.1 is no longer supported.
3. FILE: src/EventSubscriber/ProjectBrowserCacheSubscriber.php
FILE: src/Form/SettingsForm.php
FILE: src/Service/ProxyManager.php
Modules which are compatible with Drupal 10 and higher versions are expected to use constructor property promotion.
4. FILE: src/Form/SettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
For this change, it is necessary to require at least Drupal 10.3, but that is not an issue, since Drupal 10.2.x is no longer supported.
Comment #8
joachim namysloThank you for the feedback. I fiexed all named issues and created a pipeline that is green. https://git.drupalcode.org/project/pb_localizer/-/pipelines/888376
Comment #9
joachim namysloComment #10
joachim namysloComment #11
vishal.kadamRest seems fine to me.
Please wait for other reviewers and Project Moderator to take a look and if everything goes fine, you will get the role.