Describe your bug or feature request.

The commerce-order-receipt.html.twig template contains two hardcoded strings that are not passed through the |t (translation) filter, which prevents them from being translated into other languages.

If a bug, provide steps to reproduce it from a clean install.

Actual behaviour: The labels always render in English regardless of the active language.

If a bug, provide steps to reproduce it from a clean install.

  1. Install and enable a second language (e.g. French) via Configuration - Regional and language - Languages.
  2. Enable content/interface translation.
  3. Configure a store and complete a test checkout to generate an order.
  4. View the order receipt (/admin/commerce/orders/{order}/receipt or the emailed receipt) with the interface language switched to the non-English language.
  5. Observe that "Order Confirmation", "Shipping Information", etc. are translated, but "Order number:" and "Order date:" remain in English.
  6. Attempt to translate the strings via Configuration - Regional and language - User interface translation - the strings cannot be found because they are never registered with the translation system.

Proposed fix: Add the |t filter to both strings.

Issue fork commerce-3585713

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

foxy-vikvik created an issue. See original summary.

foxy-vikvik’s picture

Issue summary: View changes

foxy-vikvik’s picture

Status: Active » Needs review
StatusFileSize
new1.56 KB
jsacksick’s picture

Status: Needs review » Closed (won't fix)

8.x-2.x is no longer maintained. This has been fixed in 3.x already.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.