Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disappearing products in Admin Panel when translation for current locale is missing #13724

Merged
merged 6 commits into from
Mar 24, 2022
Merged

Fix disappearing products in Admin Panel when translation for current locale is missing #13724

merged 6 commits into from
Mar 24, 2022

Conversation

jakubtobiasz
Copy link
Contributor

Previous PR (#13721) was based on a master branch so I've created a new branch based on the 1.10 one, cherry-picked changes and applied suggestions from CR :).

Q A
Branch? 1.10
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #13296
License MIT

Description
Hi 🙋🏻‍♂️!

Let's say our products has translations for Polish (Poland) and English (United States) locales. Currently if we switch to Polish or English or any other "non-supported" locale we can't see any product in Admin Panel.

This PR fixes it by displaying all the products and in case of missing name's translation displays missing translation info.
CleanShot 2022-03-03 at 7 53 16

Cases covered by tests:

  • Products with missing translations sorted by name ascending should be displayed as first
  • Products with missing translations sorted by name descending should be displayed as last

These two cases also covers implicitly:

  • If product has missing translation display missing translation as a product name

In case any change needed just let me know ✌🏻.

@lchrusciel lchrusciel merged commit 8f5ec0a into Sylius:1.10 Mar 24, 2022
@lchrusciel
Copy link
Member

Thanks, Jakub! 🎉

@loevgaard
Copy link
Contributor

This is awesome 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants