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
[HOLD for payment 2024-08-26][$250] Workspace – System message for changed workspace name is not translated to Spanish #46219
Version Number: 9.0.12-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):gocemate+a706@gmail.com Issue reported by: Applause - Internal Team
Please re-state the problem that we are trying to solve in this issue.
Workspace – System message for changed workspace name is not translated to Spanish
What is the root cause of that problem?
We are not displaying the action POLICYCHANGELOG_UPDATE_NAME translating the message but instead display the action with ReportActionItemMessage which only displays the message fragments without translation
What changes do you think we should make in order to solve the problem?
We need to include a translation first for policy changed text that takes new and old policy name as params then we will display the action here by creating an else if for POLICYCHANGELOG_UPDATE_NAME type action and pass the translated text as the message of ReportActionItemBasicMessage
We can of course create a util that returns the translated text. And also we can apply the same for other type of actions too that do not support translation yet.
What alternative solutions did you explore? (Optional)
changed the title [-]Workspace – System message for changed workspace name is not translated to Spanish[/-][+][$250] Workspace – System message for changed workspace name is not translated to Spanish[/+]on Jul 29, 2024
returnactionMessage.filter((item): item is Message=>!!item);
}
returnactionMessage ? [actionMessage] : [];
}
We’ve added a function to translate system messages, but we haven't included the POLICYCHANGELOG_UPDATE_NAME action. We need to incorporate logic to handle the translation for the POLICYCHANGELOG_UPDATE_NAME action.
if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_NAME)) {
const oldName = getOriginalMessage(action)?.oldName ?? '';
const newName = getOriginalMessage(action)?.newName ?? '';
const message = `${Localize.translateLocal('workspace.renamedPolicyAction.renamedPolicyAction', {oldName, newName})}`; // NEED TO CREATE A NEW TRANSLATION KEY renamedPolicyAction
return [{text: message, html: `<muted-text>${message}</muted-text>`, type: 'COMMENT'}];
}
For example, en.ts (need to confirm Spanish translation in es.ts)
renamedPolicyAction: {
renamedPolicyAction: ({oldName, newName}: RenamedRoomActionParams) => ` updated the name of this workspace from ${oldName} to ${newName}`,
},
I've observed that other update log messages, such as POLICYCHANGELOG_UPDATE_FIELD, also aren't translated into Spanish. We should apply the same approach to address these cases as well.
What alternative solutions did you explore? (Optional)
Sorry about that! I process my "Hold for payment" issues every morning (by way of filtering specifically for those issue titles), and I missed this since the automation didn't seem to change the title. I'll get this sorted!
changed the title [-][$250] Workspace – System message for changed workspace name is not translated to Spanish[/-][+][HOLD for payment 2024-08-26][$250] Workspace – System message for changed workspace name is not translated to Spanish[/+]on Sep 3, 2024
Activity
melvin-bot commentedon Jul 25, 2024
Triggered auto assignment to @johncschuster (
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.FitseTLT commentedon Jul 25, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace – System message for changed workspace name is not translated to Spanish
What is the root cause of that problem?
We are not displaying the action
POLICYCHANGELOG_UPDATE_NAMEtranslating the message but instead display the action withReportActionItemMessagewhich only displays themessagefragments without translationWhat changes do you think we should make in order to solve the problem?
We need to include a translation first for policy changed text that takes new and old policy name as params then we will display the action here by creating an else if for
POLICYCHANGELOG_UPDATE_NAMEtype action and pass the translated text as the message ofReportActionItemBasicMessageApp/src/pages/home/report/ReportActionItem.tsx
Lines 655 to 656 in b0f810d
We can of course create a util that returns the translated text. And also we can apply the same for other type of actions too that do not support translation yet.
What alternative solutions did you explore? (Optional)
[-]Workspace – System message for changed workspace name is not translated to Spanish[/-][+][$250] Workspace – System message for changed workspace name is not translated to Spanish[/+]melvin-bot commentedon Jul 29, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01cff222f969263a52
melvin-bot commentedon Jul 29, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)cretadn22 commentedon Jul 30, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
System message for changed workspace name is not translated to Spanish
What is the root cause of that problem?
For update log messages in admin room, we don't translate to Spanish
What changes do you think we should make in order to solve the problem?
App/src/libs/ReportActionsUtils.ts
Lines 1298 to 1315 in df69c80
We’ve added a function to translate system messages, but we haven't included the
POLICYCHANGELOG_UPDATE_NAMEaction. We need to incorporate logic to handle the translation for thePOLICYCHANGELOG_UPDATE_NAMEaction.For example, en.ts (need to confirm Spanish translation in es.ts)
I've observed that other update log messages, such as POLICYCHANGELOG_UPDATE_FIELD, also aren't translated into Spanish. We should apply the same approach to address these cases as well.
What alternative solutions did you explore? (Optional)
47 remaining items
melvin-bot commentedon Sep 2, 2024
@danielrvidal, @robertjchen, @johncschuster, @suneox, @FitseTLT Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
suneox commentedon Sep 3, 2024
This issue has been deployed to production 2 weeks ago. We're waiting for payment
johncschuster commentedon Sep 3, 2024
Sorry about that! I process my "Hold for payment" issues every morning (by way of filtering specifically for those issue titles), and I missed this since the automation didn't seem to change the title. I'll get this sorted!
johncschuster commentedon Sep 3, 2024
Payment Summary:
Contributor: @FitseTLT paid $250 via Upwork
Contributor+: @suneox owed $250 via Upwork
[-][$250] Workspace – System message for changed workspace name is not translated to Spanish[/-][+][HOLD for payment 2024-08-26][$250] Workspace – System message for changed workspace name is not translated to Spanish[/+]johncschuster commentedon Sep 3, 2024
(I've updated the title to make sure I see this when I action my payment issues in the morning)
suneox commentedon Sep 4, 2024
@johncschuster I've accepted the offer
FitseTLT commentedon Sep 4, 2024
@johncschuster There is already an offer that I have already accepted.
johncschuster commentedon Sep 4, 2024
Thanks for clarifying that, @FitseTLT! I'll use the offer you've already accepted and will close the new one I made.
johncschuster commentedon Sep 4, 2024
I've issued payment! Thank you both for your contributions! 🎉
robertjchen commentedon Sep 4, 2024
thanks!