smartstore / Smartstore

A modular, scalable and ultra-fast open-source all-in-one eCommerce platform built on ASP.NET Core 7
http://www.smartstore.com/
GNU Affero General Public License v3.0
1.16k stars 427 forks source link

Admin website is not working with Czech translation #1041

Closed jakubsenk closed 6 months ago

jakubsenk commented 6 months ago

Describe the bug Hello, I am looking for decent eshop template to use so I don't have to build entire eshop myself from scratch. Smartstore looks very promising. However, I forked the repository and run the project locally, but first problem I have encountered was with translations. I downloaded Czech translation from admin panel and made it as a default. Suddenly, basically entire admin website stoped working as the application crashes on:

ArgumentException: The resource object with key 'DateHumanize_MultipleMonthsAgo' was not found (Parameter 'resourceKey')

I looked up the problem a bit more and it seems the problem is in external library Humanizer. I checked the resources in Czech and it seems that all of them are there as they shoud be. The project Smartstore contains the package Humanizer in which is also the Humanizer.Core.cs with the required resource file. So I am not really sure why is this error happening as the required resources should be there.

To Reproduce Steps to reproduce the behavior:

  1. Go to Admin > Configuration > Regional Settings > Languages
  2. Find Czech language and download it
  3. From installed languages, click edit Czech language
  4. Set published and save
  5. Now in top right corner click the globe and change language to Czech
  6. See error ArgumentException: The resource object with key 'DateHumanize_MultipleMinutesAgo' was not found (Parameter 'resourceKey') If you navigate to admin dashboard you'll get the MultipleMonthsAgo instead of minutes

Expected behavior A clear and concise description of what you expected to happen. It is expected to not crash and display Czech language correctly.

Screenshots If applicable, add screenshots to help explain your problem. obrazek

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

mgesing commented 6 months ago

Unfortunately, this is caused by an external component, not by Smartstore code.

I have added a wrapper method that catches the error. After reading several issues about this, I see no better solution to solve this in a timely manner and to get control over it again, especially as other languages are also affected. Otherwise there is a risk that this error will regularly reappear elsewhere.

At the relevant places you will see the text in the backend in English, not in Czech, until the external component has fixed the source of the error.