"Add user buttons" button labels are not translatable

Created on 20 May 2025, 24 days ago

Problem/Motivation

On the Multiple Registration Settings, you can "Enable Add user buttons on People page" but that button labels cannot be localized.

Proposed resolution

In multiple_registration.module file, update the multiple_registration_views_pre_view() function:

before (line 556):

    foreach ($available_roles as $role) {
      $result[] = '<a class="button button-action button--primary button--small" href="' . $role["url"] . '">Add new ' . $role["role_name"] . '</a>';
    }

after:

    foreach ($available_roles as $role) {
      $link_label = t('Add new @role', ['@role' => $role['role_name']], ['context' => 'multiple_registration']);
      $result[] = '<a class="button button-action button--primary button--small" href="' . $role["url"] . '">' . $link_label . '</a>';
    }

Remaining tasks

MR is coming.

โœจ Feature request
Status

Active

Version

3.3

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance PhilY ๐Ÿ‡ช๐Ÿ‡บ๐Ÿ‡ซ๐Ÿ‡ท Paris, France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024