-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] Desktop - error message should show in Spanish #19651
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Bug0 Triage Checklist (Main S/O)
|
Not sure if it's related, but this bug seems similar to this other one: LHN Attachment taking some to to translate into Spanish |
I took a lot of tests. Please check |
Job added to Upwork: https://www.upwork.com/jobs/~01fdc96c68b8a156b6 |
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
Triggered auto assignment to @cead22 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The error messages are shown in Spanish when the user change the language to English and set online mode. What is the root cause of that problem?The root cause is, even if the user change the language to English, the app's language will be set to Spanish after change to online mode. In offline mode, all UpdatePreferredLocale API request does not send immediately to the server, and are pushed to the Assume that the initial language is English. If user changes the language from English to Spanish and again from Spanish to English, then 2 UpdatePreferredLocale APIs are pushed to the queue and will be sent with en and then es language value. And the responses from the server are processed in reverse order, so finally the app process the first API's response, and language is set to Spanish. If user change language to English again at this time, then three APIs are pushed to the queue. App/src/libs/Network/SequentialQueue.js Lines 32 to 57 in 37163b0
App/src/libs/actions/PersistedRequests.js Lines 31 to 37 in a6e6fe9
And the app process the first API's response, and the language is set to es, that is Spanish. If user change to Spanish again, then 4 APIs are pushed, but the final language is set to es for the same reason. That is, when user changes the language in offline mode, one or two API will be sent to the server, and the app language is set to the first changed language, that is Spanish. The same is true if the language is initially set to Spanish. That is, when change to online mode, the language is set to the first API's language. What changes do you think we should make in order to solve the problem?We should only send the last UpdatePreferredLocale API to the server once.
Now we can send the last one API to the server, so the app language is set correctly when changes from offline mode to online mode. What alternative solutions did you explore? (Optional)None. |
@fedirjh Thank you for pointing out. @Christinadobrzyn Could you check this #19651 (comment) Are we thinking that, And the proposals here is also trying to fix the issue of "app language should directly change to the last choosen language, instead of switching through the previous selections" |
@s-alves10 Not sure if this #19651 (comment) is a proposal or general rootcause comment. If it is a proposal, kindly update the proposal as per our guidelines. https://github.com/Expensify/App/blob/main/contributingGuides/PROPOSAL_TEMPLATE.md |
ProposalPlease re-state the problem that we are trying to solve in this issue.After forcing offline, changing language to Spanish, sending messages to an invalid number, then again changing language to English, then going online shows errors for the messages in Spanish. What is the root cause of that problem?Lines 39 to 71 of App/src/libs/API.js
These requests are pushed to Lines 105 to 121 of App/src/libs/Network/SequentialQueue.js
Once network is online Line 32 to 57 of App/src/libs/Network/SequentialQueue.js
Language change, and adding comments after forcing offline get added to In this case Offline requests are saved in PersistedRequests which are then processed sequentially in process of SequentialQueue and then they are updated with Onyx.update(QueuedOnyxUpdates.getQueuedUpdates()) here App/src/libs/Network/SequentialQueue.js Line 86 in f4f89a0 These are updated with this When different updates happen to same element like preferredLocale or for same reportID and reportingActionID, order in which the updates happen cannot be ensured. What changes do you think we should make in order to solve the problem?In Onyx.js instead of Promise.all we should use _.reduce(promises, (promiseChain, currentPromise) => { What other solutions did you explore?
What alternative solutions did you explore? (Optional)
|
@abdulrahuman5196 - great question
The issue was that the error message was in Spanish after you changed the language to English (and enabled online). So "app language should directly change to the last choosen language, instead of switching through the previous selections" is what I would expect to happen here. But I'm not able to reproduce this Spanish error anymore - going to reach out to QA to see if they can test again. https://expensify.slack.com/archives/C9YU7BX5M/p1685475025261219 cc @mvtglobally |
@Christinadobrzyn I'm able to reproduce this error. Please change the language an even number of times, and change to online mode. |
@abdulrahuman5196 - finally I was able to reproduce this again! I updated the steps in the OP on how I was able to do this. What is expected: when switching preferences from Spanish to English, all messages (including errors) should be in English. What is happening: when switching preferences from Spanish to English, all messages (including errors) are in Spanish. |
I started a discussion about how to move this forward here https://expensify.slack.com/archives/C01GTK53T8Q/p1687808610323569. We're leaning towards closing this issue |
I'll check on that thread, not sure if we got to a conclusion. |
I think we're moving forward with this, right @cead22? |
I agree that my proposal is for a special case, not a general one. API.write(
'UpdatePreferredLocale',
{
value: locale,
removePreviousRequests: NetworkStore.isOffline(),
},
{optimisticData},
); function save(requestsToPersist) {
HttpUtils.cancelPendingReconnectAppRequest();
persistedRequests = _.chain(persistedRequests)
.concat(requestsToPersist)
.partition((request) => request.command !== CONST.NETWORK.COMMAND.RECONNECT_APP)
.flatten()
.value();
if (requestsToPersist[0].data.removePreviousRequests && requestsToPersist[0].data.removePreviousRequests === true) {
persistedRequests = _.reject(persistedRequests, (persistedRequest) => (persistedRequest.command === requestsToPersist[0].command && persistedRequest !== requestsToPersist[0]));
}
Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequests);
} For the general solution, there are not enough cases to consider, and I think the above solution is sufficient for some preference settings in offline mode. |
In this thread we identified the following two situations, and agreed that the first one isn't a bug, and that we'll use this issue to fix the second one, does that make sense?
|
Yes. @cead22 Fine by me. I think the message is received from backend. |
Correct me if I'm wrong but now that we're switching gears to solve only problem number 2 above, I don't think we have any proposals for that specifically right now. If that's the case, @StevenKKC @c3024 @s-alves10 would you like to submit a proposal for this? Thanks |
Still waiting for proposals |
@cead22 / @Christinadobrzyn The bug is still marked internal? Could we change it to external and update the bug title and description as per the new requirement from here - #19651 (comment) |
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new. |
Current assignee @abdulrahuman5196 is eligible for the External assigner, not assigning anyone new. |
@abdulrahuman5196 should I raise the bounty to get more proposals? |
That error is a back-end error, it cannot be fixed as we don't support handling translations for back-end errors yet. I would say that we can close this issue as we have done with many other instances when this was brought up. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@cead22 @abdulrahuman5196 should we close based on #19651 (comment)? |
Agree with Rocío, let's close |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Error should be in English now that the account language is English
Actual Result:
The error messages is shown in Spanish when the language was already changed to English.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.18-2
Reproducible in staging?: Y
Reproducible in production?: N/A the toggle is not present in PROD app
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Found when executing PR #19324
Bug6068770_19324_Desktop.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: