Fix untranslated formatter labels

Created on 29 July 2025, 5 days ago

Problem/Motivation

A previous patch (issue #3536094) wrapped one set of column header labels (line 345) with `$this->t(...)`, but other internal label outputs remain untranslated. This patch extends translation support to those remaining labels at lines 475 and 509.

Steps to reproduce

1. Use the DataField table formatter in a View.
2. Enable another language and add interface translations.
3. Observe that some subfield headers or inline labels remain untranslated.

Proposed resolution

A previous patch (issue #3536094) added `$this->t(...)` around column header labels at line 345 of `DataFieldTable.php`, improving translation support for that part of the formatter.

However, additional label outputs at lines 475 and 509—used in horizontal and vertical rendering modes—are still unwrapped and therefore not translatable via the interface or `.po` files.

This patch extends translation coverage by wrapping those remaining label outputs in `$this->t(...)`, ensuring all visible subfield labels in Views follow Drupal's multilingual standards.

Remaining tasks

Apply the fix to the relevant lines

User interface changes

No visual UI changes, but labels that were previously stuck in English will now appear translated when available.

API changes

None

Data model changes

None

Feature request
Status

Active

Version

2.0

Component

Code

Created by

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