-
Notifications
You must be signed in to change notification settings - Fork 69
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
Emailed CSV reports (generated on server/transact platform async) should be localized to merchant/store language - CSV language modal only works first time #9737
Comments
To clarify, we have two different CSV rendering code paths depending on the number of rows – plugin and server/service. I suspect what's happening here is …
I think we should fix this (in server) since most merchants will have lots of rows to export. Long term, I think we should focus on server-generated CSVs and remove the plugin implementation. That will be less effort to maintain and more consistent user experience. |
@csmcneill Can you explain what this is or provide a screenshot of what you expect to see here. Are the server sent emails localized? |
Based on #7938, looks like yes :) FYI @brucealdridge there's good info and a screenshot of an csv language modal in the linked PR from @mordeth : (TIL!) |
@csmcneill I've tried reproducing this bug without success! Looking at the overall flow for this, it is IMO a little confusing, so I wouldn't be surprised if you hit an edge case. I'm keen to rework this code but before we do that we should confirm if there is an actual bug and ensure we can reproduce it. @jessy-p have you had any luck reproducing? Here are some notes from my investigation.
woocommerce-payments/client/transactions/list/index.tsx Lines 726 to 729 in 63376c3
woocommerce-payments/client/utils/index.js Lines 259 to 265 in 63376c3
woocommerce-payments/client/utils/index.js Lines 245 to 251 in 63376c3
I think we're overcomplicating this! Maybe we could simplify:
We could potentially keep the site setting – i.e. a preference for language to export CSVs in – and a version of the modal – but I'm not sure it's worthwhile. I would expect the majority of merchants want CSVs in the same language as UI. |
@haszari Thank you for digging into this! While I can't comment on how it should work, I can only confirm how it currently works on the Atomic sites I've tested this on vs. how it worked whenever the change was first introduced, especially since I was heavily involved in testing its implementation. It is possible that a value was set for Perhaps @aheckler can test this as well? |
Strange. I just had another crack at it.
So I'm still baffled! Or not … Note that I set (
So possibly the bug is…
I'll add this to the description/title, assuming that's reproducible :) |
I tried to repro using the steps in the OP but could not. The second time through I went to export the transactions, saw no modal, but the email and CSV were in German (the non-English language I'd chosen). |
The mystery deepens! |
This seems to be reliable way to replicate the bug. Dismiss the modal, after that, changing the option from settings seems to have no effect. Whatever was set at the time the modal was dismissed is stuck. Seems to be an interaction between option
It is set in |
@jessy-p perhaps we should explore radically simplifying this:
By default we'd have to fix the bugs in the current design, but I think it's better to zoom out and keep it super basic (or as a fallback, adjust the existing design so it's simpler). If you think that's worth pursuing, could you P2 a proposal? Also include:
|
Published here: pdjTHR-4sV-p2 |
Describe the bug
#7938 introduced localized CSV information. Currently, if a site's language is not set to
English (United States)
:I tried reverting to older versions of WooPayments and WooCommerce core without success. This leads me to believe that recent changes in WordPress 6.7 and how it handles localization might be the underlying cause.
Note
CSVs downloaded directly from wp-admin (e.g., fewer than 25 items) are localized as expected.
cc @mordeth
To Reproduce
Update: localisation seems to only work for the CSV generated immediately after modal flow - i.e. it only works once
How to reproduce
Download
.Remember the language settings.
should be checked, leave it checked (assuming this matters – maybe not relevant).Download
.Download
againOriginal reproduce steps
Español
.Update languages
button (which may appear asActualizar las traducciones
).Reporting
section is visible.Download
option to trigger a CSV report sent via email.Actual behavior
Emailed CSVs are not localized, and the process for generating localized CSV reports does not work as documented here.
Expected behavior
Downloading reports that are 25+ items prompt the user to select their preferred language, and CSV files are delivered via email
Additional context
No user reports AFAIK. Found this issue while performing other tests.
The text was updated successfully, but these errors were encountered: