-
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
[HOLD #55436][$250] Wrong system message when updating role in Spanish #55781
Comments
Triggered auto assignment to @MitchExpensify ( |
Propopsal from @shubham1206agra ProposalPlease re-state the problem that we are trying to solve in this issue.Wrong system message when updating role in Spanish What is the root cause of that problem?In Lines 4970 to 4975 in b59f23b
We do not cover the case of auditor role of the workspace user. That causes the wrong translation to occur. What changes do you think we should make in order to solve the problem?Let's simplify these translations Change Lines 4970 to 4975 in b59f23b
to addEmployee: ({email, role}: AddEmployeeParams) => `agregó a ${email} como ${role}`,
updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `actualicé el rol ${email} de ${currentRole} a ${newRole}`,
removeMember: ({email, role}: AddEmployeeParams) => `eliminado ${role} ${email}`, Now, let's update the reference of these (utilizing translation of Change App/src/libs/ReportActionsUtils.ts Lines 1755 to 1757 in b59f23b
to const newRole = translateLocal('workspace.common.roleName', {role: originalMessage?.newValue ?? ''}).toLowerCase();
const oldRole = translateLocal('workspace.common.roleName', {role: originalMessage?.oldValue ?? ''}).toLowerCase();
return translateLocal('report.actions.type.updateRole', {email, newRole, currentRole: oldRole}); Change App/src/libs/ReportActionsUtils.ts Lines 1740 to 1742 in b59f23b
to const role = translateLocal('workspace.common.roleName', {role: originalMessage?.role ?? ''}).toLowerCase();
const formattedEmail = formatPhoneNumber(email);
return translateLocal('report.actions.type.addEmployee', {email: formattedEmail, role}); And change App/src/libs/ReportActionsUtils.ts Lines 1772 to 1773 in b59f23b
to const role = translateLocal('workspace.common.roleName', {role: originalMessage?.role ?? ''}).toLowerCase();
return translateLocal('report.actions.type.removeMember', {email, role}); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA since this is a simple translation change What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Wrong system message when updating role in Spanish What is the root cause of that problem?Lines 4971 to 4974 in b59f23b
In the condition above we are using What changes do you think we should make in order to solve the problem?We should update all 'miembro' in the condition to 'auditor' Lines 4971 to 4974 in b59f23b
We should do the same way with What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Job added to Upwork: https://www.upwork.com/jobs/~021884096456183632431 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil ( |
I can take a look at this once it's ready for an internal engineer! |
Will pick this up for proposal review today |
Thanks for the proposals @daledah Replacing 'miembro' with 'auditor' may work but it is better to do a clean up as suggested in @shubham1206agra proposal. @shubham1206agra I like the idea of simplifying the translations using the translation of |
Current assignee @dangrous is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@rojiphil We can modify this if we found some edge case in the PR itself. |
Current assignee @dangrous is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Hi! This looks good, I think However, can we be sure to add some unit tests for the new behavior (translated) of |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
yep "member" is expected! |
Hi again! I think we might want to hold our PR on #55596, which will change that logic slightly. Should be essentially the same solution, though. |
Updated title to hold on that other issue. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.89-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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
Expensify/Expensify Issue URL:
Issue reported by: @dukenv0307
Slack conversation (hyperlinked to channel name): expensify_bugs
Action Performed:
Expected Result:
System message of update role show correct
Actual Result:
System message of update role shows wrong
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
bug-resize.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rojiphilThe text was updated successfully, but these errors were encountered: