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

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: Framework/TranslateUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions