Skip to content

js-translation.json not picking up theme translations 2.1.3 / 2.1.4 #8508

@tadhgbowe

Description

@tadhgbowe

Hello. Apologies is reported before. I couldn't see it.

My theme translation file is not appearing in certain locations. For example the mini cart overlay and the cart is empty it says "You have no items in your shopping cart."

In my theme I have the translation "You have no items in your shopping basket.". When I go to the cart page I can see underneath the main content title "You have no items in your shopping basket.". So I know it's working. However when I hover over the mini cart in the header the overlay continues to say "You have no items in your shopping cart."

Tried on 2.1.3 and 2.1.4 community edition.

I have tried a static deploy, deleted the js-translation.json file itself. No joy.

Question: Does the js-translation.json not pick up theme translations?

Preconditions

Locale set to en_GB - English (United Kingdom)
Create a new theme. Enable this in the backend via Content > Design - Configuration.
Create a i18n/en_GB.csv file with the above translation:
"You have no items in your shopping cart.","You have no items in your shopping basket."
Refresh block, page and translation caches.

Steps to reproduce

Go to cart page /onepage/cart. In the main content area underneath Shopping Cart I can see my translation "You have no items in your shopping basket.". However the mini-cart overlay doesn't display the new translation.

Expected result

The empty mini-cart overlay should translate to "You have no items in your shopping basket."

Actual result

The empty mini-cart overlay continues to display the core translation "You have no items in your shopping cart."

OTHER NOTES/OBSERVATIONS/TESTS:

  • If I create a language pack it does work! Curious. So why does it not pick up theme translations? This could be a bug I guess?

Thanks
T

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions