Make item/items translatable in line item summary of shopping cart

Created on 11 March 2012, over 12 years ago
Updated 12 January 2017, over 7 years ago

It is displayed at the shopping cart block and summary.
I can deactivate/activate to print this in the corresponding Views (Footer: "Commerce Line Item: Line item summary" → "Item quantity").
It prints as "1 item", "2 items", "3 items" and so on.

I'm not sure which string is the right one. To test it I translated all strings that look like the right one, but none of them worked. It always prints as "item"/"items" for all languages.

Feature request
Status

Needs work

Version

1.0

Component

Internationalization

Created by

🇩🇪Germany no2e

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany thomas.wardin

    Same applies to the summary block. Currently it relies on "item" or "items" translated elsewhere. But in order for it to be specifically translatable, line 173 of commerce/modules/cart/src/Plugin/Block/CartBlock.php should read
    '#count_text' => $this->formatPlural($count, t('@count item'), t('@count items')),

Production build 0.71.5 2024