Skip to content

Whitespace Characters in Translatable Phrases #40127

@RubenJ01

Description

@RubenJ01

Preconditions and environment

While developing a module that expands on the translation process, I realized that some phrases have empty whitespace characters saved in them. I'm referring to the following phrases. The whitespace is indicated by the pink dots in the screenshot:

Image

Im referring to the following lines of code:
vendor/magento/module-indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php line: 44
vendor/magento/module-indexer/Controller/Adminhtml/Indexer/MassChangelog.php line 44

Steps to reproduce

  1. Open the Magento 2 codebase on version 2.4.8.
  2. Navigate to vendor/magento/module-indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php and check line 44.
  3. Navigate to vendor/magento/module-indexer/Controller/Adminhtml/Indexer/MassChangelog.php and check line 44.
  4. Observe that the phrases contain leading or trailing whitespace characters.

Expected result

Phrases should be saved without any leading or trailing whitespace.

Actual result

Phrases contain extra whitespace, such as spaces before or after the phrase,

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Type

No type

Projects

Status

Ready for Confirmation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions