You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-12-25] [$250] Distance rate changes are not translated in non-English in admin room #75842
Version Number: v9.2.62-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#75518 Email or phone of affected tester (no customers):gocemate+b2155581@gmail.com Issue reported by: Applause Internal Team Device used: Lenovo 80ES / Windows 10 Pro App Component: Chat Report View
Action Performed:
Create a new workspace
Enable Distance rates
Add a Rate> Disable/enable, rename, delete the rate
Change the language to any Non-English
Open the admin room thread
Expected Result:
Distance rate actions should be translated in the thread and thread header
Actual Result:
Distance rate actions are not translated in the thread
All distance rate change actions like add, update, and remove action are not translated in the thread header because we don't handle this in getReportName function
Note: We can check other actions which have the same problem
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.
Please re-state the problem that we are trying to solve in this issue.
When distance rate actions (enable/disable, rename, delete) are performed in a workspace, the action messages displayed in the admin room thread and thread header are not translated when the language is set to a non-English language. The messages appear in English regardless of the selected language.
What is the root cause of that problem?
The getWorkspaceCustomUnitRateUpdatedMessage function in ReportActionsUtils.ts only handles specific updatedField values:
When these fields are updated, the function falls back to getReportActionText(action), which returns hardcoded English text from the backend instead of using translation keys. This causes the messages to appear in English even when a non-English language is selected.
What changes do you think we should make in order to solve the problem?
Add handling for 'enabled' and 'name' fields in the getWorkspaceCustomUnitRateUpdatedMessage function, similar to how other fields are handled. We need to add translation keys for these actions and use them when these specific fields are updated.
1. Add translation keys to en.ts (and other language files)
Add new translation keys in the workspaceActions section:
// In App/src/languages/en.ts around line 6220-6234updatedCustomUnitRateEnabled: ({customUnitName, customUnitRateName, enabled}: UpdatedPolicyCustomUnitRateEnabledParams)=>`${enabled ? 'enabled' : 'disabled'} the ${customUnitName} rate "${customUnitRateName}"`,updatedCustomUnitRateName: ({customUnitName, customUnitRateName, oldName, newName}: UpdatedPolicyCustomUnitRateNameParams)=>`renamed the ${customUnitName} rate "${oldName}" to "${newName}"`,
2. Update getWorkspaceCustomUnitRateUpdatedMessage function
Update the function in App/src/libs/ReportActionsUtils.ts to handle 'enabled' and 'name' fields:
// Around line 2670-2706functiongetWorkspaceCustomUnitRateUpdatedMessage(action: ReportAction): string{const{customUnitName, customUnitRateName, updatedField, oldValue, newValue, newTaxPercentage, oldTaxPercentage}=getOriginalMessage(actionasReportAction<typeofCONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CUSTOM_UNIT_RATE>)??{};// ... existing code for 'rate', 'taxRateExternalID', 'taxClaimablePercentage' ...// Add handling for 'enabled' fieldif(customUnitName&&customUnitRateName&&updatedField==='enabled'&&typeofnewValue==='boolean'){// eslint-disable-next-line @typescript-eslint/no-deprecatedreturntranslateLocal('workspaceActions.updatedCustomUnitRateEnabled',{
customUnitName,
customUnitRateName,enabled: newValue,});}// Add handling for 'name' fieldif(customUnitName&&customUnitRateName&&updatedField==='name'&&typeofoldValue==='string'&&typeofnewValue==='string'){// eslint-disable-next-line @typescript-eslint/no-deprecatedreturntranslateLocal('workspaceActions.updatedCustomUnitRateName',{
customUnitName,customUnitRateName: oldValue,// Use old name as the rate nameoldName: oldValue,newName: newValue,});}returngetReportActionText(action);}
3. Add TypeScript type definitions
Add parameter types for the new translation keys (similar to existing types like UpdatedPolicyCustomUnitRateParams):
// In the types file where other workspace action params are definedtypeUpdatedPolicyCustomUnitRateEnabledParams={customUnitName: string;customUnitRateName: string;enabled: boolean;};typeUpdatedPolicyCustomUnitRateNameParams={customUnitName: string;customUnitRateName: string;oldName: string;newName: string;};
What alternative solutions did you explore? (Optional)
An alternative would be to modify the backend to send translated messages, but this approach is less flexible and would require backend changes. The current approach of handling translations on the frontend is consistent with how other workspace actions are handled (e.g., tax updates, category updates) and provides better maintainability and consistency.
changed the title [-]Distance rate changes are not translated in non-English in admin room[/-][+][$250] Distance rate changes are not translated in non-English in admin room[/+]on Dec 1, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.81-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@abdulrahuman5196@dylanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: Not regression. Implementation miss.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Create a new workspace
Enable Distance rates
Add a Rate> Disable/enable, rename, delete the rate
Change the language to any Non-English
Open the admin room thread
Verify that the Distance rate actions is translated in the thread and thread header
Activity
melvin-bot commentedon Nov 24, 2025
Triggered auto assignment to @dylanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.nkdengineer commentedon Nov 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Distance rate actions are not translated in the thread
What is the root cause of that problem?
updatedFieldlikeindex,enabled,App/src/libs/ReportActionsUtils.ts
Lines 2674 to 2703 in 79ad1fc
getReportNamefunctionApp/src/libs/ReportUtils.ts
Line 5591 in 79ad1fc
What changes do you think we should make in order to solve the problem?
updatedField:index,enabledApp/src/libs/ReportActionsUtils.ts
Lines 2674 to 2703 in 79ad1fc
getReportNamefunction to return the correct translation when the parent action is distance rate changes actionApp/src/libs/ReportUtils.ts
Line 5591 in 79ad1fc
Note: We can check other actions which have the same problem
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.
abbasifaizan70 commentedon Nov 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When distance rate actions (enable/disable, rename, delete) are performed in a workspace, the action messages displayed in the admin room thread and thread header are not translated when the language is set to a non-English language. The messages appear in English regardless of the selected language.
What is the root cause of that problem?
The
getWorkspaceCustomUnitRateUpdatedMessagefunction inReportActionsUtils.tsonly handles specificupdatedFieldvalues:'rate'(for rate value changes)'taxRateExternalID'(for tax rate changes)'taxClaimablePercentage'(for tax claimable percentage changes)However, it does not handle:
'enabled'(for enable/disable actions)'name'(for rename actions)When these fields are updated, the function falls back to
getReportActionText(action), which returns hardcoded English text from the backend instead of using translation keys. This causes the messages to appear in English even when a non-English language is selected.What changes do you think we should make in order to solve the problem?
Add handling for
'enabled'and'name'fields in thegetWorkspaceCustomUnitRateUpdatedMessagefunction, similar to how other fields are handled. We need to add translation keys for these actions and use them when these specific fields are updated.1. Add translation keys to
en.ts(and other language files)Add new translation keys in the
workspaceActionssection:2. Update
getWorkspaceCustomUnitRateUpdatedMessagefunctionUpdate the function in
App/src/libs/ReportActionsUtils.tsto handle'enabled'and'name'fields:3. Add TypeScript type definitions
Add parameter types for the new translation keys (similar to existing types like
UpdatedPolicyCustomUnitRateParams):What alternative solutions did you explore? (Optional)
An alternative would be to modify the backend to send translated messages, but this approach is less flexible and would require backend changes. The current approach of handling translations on the frontend is consistent with how other workspace actions are handled (e.g., tax updates, category updates) and provides better maintainability and consistency.
melvin-bot commentedon Nov 28, 2025
@dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
[-]Distance rate changes are not translated in non-English in admin room[/-][+][$250] Distance rate changes are not translated in non-English in admin room[/+]melvin-bot commentedon Dec 1, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021995492043595795673
melvin-bot commentedon Dec 1, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)16 remaining items
melvin-bot commentedon Dec 18, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 18, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.81-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-12-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Dec 18, 2025
@abdulrahuman5196 @dylanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Dec 25, 2025
Payment Summary
Upwork Job
BugZero Checklist (@dylanexpensify)
abdulrahuman5196 commentedon Dec 29, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: Not regression. Implementation miss.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
@dylanexpensify
melvin-bot commentedon Dec 31, 2025
@dylanexpensify Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Jan 2, 2026
@dylanexpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
dylanexpensify commentedon Jan 5, 2026
Payment summary:
Contributor+: @abdulrahuman5196 $250 via NewDot
Contributor+: @nkdengineer $250 via NewDot
Please apply/request!
twisterdotcom commentedon Jan 12, 2026
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-c69f-a0f3-23b1-c4715ec38cf4trjExpensify commentedon Jan 21, 2026
approved $250 for @abdulrahuman5196