Skip to content
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

[$250] Language - Message of added or invited user to "#admins" chat, doesn't get translated #46960

Closed
2 of 11 tasks
izarutskaya opened this issue Aug 7, 2024 · 37 comments
Closed
2 of 11 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 7, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.17-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): bellicoignacio+30@hotmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal team

Action Performed:

  1. Open the https://staging.new.expensify.com/
    website.
  2. Tap on the avatar on the bottom of the screen.
  3. Tap on "Preferences"
  4. Tap on "Language"
  5. Tap on "Spanish"
  6. Tap on the arrow on the top left corner.
  7. Tap on the chats icon on the bottom of the screen.
  8. Check in the "#admins" chat preview, the language in which the invitation message is displayed.
  9. Open the "#admins" chat.
  10. Check the "New user added" message and the language in which is displayed.

Expected Result:

When choosing Spanish as language, all the sections and chats information should be changed to that language.

Things that need to be changed:
Invited 1 user to Chat Report
image

We already have a translation of the invited user to english into spanish but that doesn't match the screenshot (no number) so seems like we might have this phrase somewhere else.

  • update the LHN to use this English copy. Tbh neither I nor Ioni cannot find the copy in the screenshot in the database, maybe it was already updated?
  • update English copy to invited member ${to}
  • update Spanish copy to miembro invitado ${to}

added <email> as a user

  • English should be updated to added <email> as a member
  • Spanish translation should be set to agregó a <email> como miembro

Actual Result:

When choosing Spanish as language, the "#admins" chat, still displays information in English.
For example, the message "Invited 1 user to chat report", in the preview of the chat, is not translated as "Invitó a un usuario al chat."
And when opening the chat, the message "Added ignaciodbellico@gmail.com
as a user" is also missing translation. The correct translation of this last sentence, would be "Agregó a ignaciodbellico@gmail.com
como usuario."

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6554265_1722044595083!34c88d80-f5b7-4c49-97d9-d846bf71d22b

Bug6554265_1722044598304.b6441345-80cc-4a3b-95d3-c79f9de2da09.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010023a595aa275ac1
  • Upwork Job ID: 1823685163547735883
  • Last Price Increase: 2024-09-05
  • Automatic offers:
    • ZhenjaHorbach | Reviewer | 103526301
    • nkdengineer | Contributor | 103526302
Issue OwnerCurrent Issue Owner: @ZhenjaHorbach
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

Triggered auto assignment to @sonialiap (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb

@nkdengineer
Copy link
Contributor

I don't think it's a bug because almost policy change log actions aren't translated.

@sonialiap
Copy link
Contributor

@Expensify/design is this a feature or a bug?

@shawnborton
Copy link
Contributor

Hmm @dylanexpensify is your system message project covering system message translations? Otherwise I'm not too sure what the current expected behavior is for this.

@dylanexpensify
Copy link
Contributor

Ahh interesting, technically it was just for silencing them, but we did do some copy updates, and I wonder if maybe we missed this. @deetergp any ideas?

@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

@sonialiap Huh... This is 4 days overdue. Who can take care of this?

@sonialiap
Copy link
Contributor

@deetergp bumping Dylan's question. We're wondering if this is expected or a bug

@melvin-bot melvin-bot bot removed the Overdue label Aug 13, 2024
@deetergp
Copy link
Contributor

That is not one of the messages we made translatable as a part of the Enhanced System Messages project, so this is not a bug, it is new functionality. For future reference, these were the actions we localized for the project:

App/src/languages/en.ts

Lines 3770 to 3799 in 11af67b

changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} from ${oldValue} to ${newValue}`,
changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} to ${newValue}`,
changePolicy: ({fromPolicy, toPolicy}: ChangePolicyParams) => `changed workspace from ${fromPolicy} to ${toPolicy}`,
changeType: ({oldType, newType}: ChangeTypeParams) => `changed type from ${oldType} to ${newType}`,
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`,
exportedToCSV: `exported this report to CSV`,
exportedToIntegration: {
automatic: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}.`,
manual: ({label}: ExportedToIntegrationParams) => `marked this report as manually exported to ${label}.`,
reimburseableLink: 'View out-of-pocket expenses.',
nonReimbursableLink: 'View company card expenses.',
pending: ({label}: ExportedToIntegrationParams) => `started exporting this report to ${label}...`,
},
integrationsMessage: (errorMessage: string, label: string) => `failed to export this report to ${label} ("${errorMessage}").`,
managerAttachReceipt: `added a receipt`,
managerDetachReceipt: `removed a receipt`,
markedReimbursed: ({amount, currency}: MarkedReimbursedParams) => `paid ${currency}${amount} elsewhere`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `paid ${currency}${amount} via integration`,
outdatedBankAccount: `couldn’t process the payment due to a problem with the payer’s bank account`,
reimbursementACHBounce: `couldn’t process the payment, as the payer doesn’t have sufficient funds`,
reimbursementACHCancelled: `canceled the payment`,
reimbursementAccountChanged: `couldn’t process the payment, as the payer changed bank accounts`,
reimbursementDelayed: `processed the payment but it’s delayed by 1-2 more business days`,
selectedForRandomAudit: `randomly selected for review`,
selectedForRandomAuditMarkdown: `[randomly selected](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) for review`,
share: ({to}: ShareParams) => `invited user ${to}`,
unshare: ({to}: UnshareParams) => `removed user ${to}`,
stripePaid: ({amount, currency}: StripePaidParams) => `paid ${currency}${amount}`,
takeControl: `took control`,
unapproved: ({amount, currency}: UnapprovedParams) => `unapproved ${currency}${amount}`,

@sonialiap
Copy link
Contributor

Thanks Scott!

Ok, so this is not a "bug" but may be a new feature request. Asking in slack if we want to do something about this

@sonialiap
Copy link
Contributor

sonialiap commented Aug 14, 2024

Things that need to be changed:

  • English: change "user" to "member" in added <email> as a member
  • Spanish: add a translation of added <email> as a member as agregó a <email> como miembro
  • Spanish: add a translation of Invited 1 member to <chat name> as Invitó a 1 miembro al <chat name>

Confirmed translations in slack ✔️

@nkdengineer
Copy link
Contributor

nkdengineer commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2023-10-11 11:18:00.

Proposal

Please re-state the problem that we are trying to solve in this issue.

When choosing Spanish as language, the "#admins" chat, still displays information in English.
For example, the message "Invited 1 user to chat report", in the preview of the chat, is not translated as "Invitó a un usuario al chat."
And when opening the chat, the message "Added ignaciodbellico@gmail.com
as a user" is also missing translation. The correct translation of this last sentence, would be "Agregó a ignaciodbellico@gmail.com
como usuario."

What is the root cause of that problem?

This is a new feature request

What changes do you think we should make in order to solve the problem?

  • For invited user to, we need to add a case for this action here then the message can be translated in LHN
else if (ReportActionsUtils.isOldDotReportAction(lastAction)) { 
     result.alternateText = ReportActionsUtils.getMessageOfOldDotReportAction(action);
}

} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG) {

  • For add employee action: we need to add a new translation key for this action as here and
  1. We should have a util to get the translated message for POLICYCHANGELOG_ADD_EMPLOYEE action.
function isPolicyChangeLogAddEmployeeMessage(reportAction: OnyxInputOrEntry<ReportAction>): reportAction is ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE> {
    return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE);
}

function getPolicyChangeLogAddEmployeeMessage(reportAction: OnyxInputOrEntry<ReportAction>): string {
    if (!isPolicyChangeLogAddEmployeeMessage(reportAction)) {
        return '';
    }

    const {email, role, name} = getOriginalMessage(reportAction);
    return Localize.translateLocal('report.actions.type.addEmployee', {email, name, role});
}
  1. Then we will add a case in ReportActionItem to display the translated message for POLICYCHANGELOG_ADD_EMPLOYEE action
else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE) {
    children = <ReportActionItemBasicMessage message={ReportActionsUtils.getPolicyChangeLogAddEmployeeMessage(action)} />;
}

} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG) {
children = <ReportActionItemBasicMessage message={PolicyUtils.getCleanedTagName(ReportActionsUtils.getReportActionMessage(action)?.text ?? '')} />;

3. Add a case in SidebarUtils to display the translated message in LHN

else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE) { 
     result.alternateText = ReportActionsUtils.getPolicyChangeLogAddEmployeeMessage(action);
}

} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG) {
result.alternateText = PolicyUtils.getCleanedTagName(ReportActionsUtils.getReportActionMessage(lastAction)?.text ?? '');

  1. Add a case in ContextMenuActions to copy the translated message to clipboard
else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE) { 
     setClipboardMessage(ReportActionsUtils.getPolicyChangeLogAddEmployeeMessage(reportAction));
}

} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
setClipboardMessage(ReportActionsUtils.getUpdateRoomDescriptionMessage(reportAction));

We can do the same way for other system actions that we need

OPTIONAL: If the add employee is an old dot action, we can add this as a case in getMessageOfOldDotReportAction and isOldDotReportAction then we don't need to create a case in ReportActionItem, SidebarUtils and ContextMenuActions.

What alternative solutions did you explore? (Optional)

@sonialiap
Copy link
Contributor

Invited 1 user to Chat Report

image

We already have a translation of the invited user to english into spanish but that doesn't match the screenshot (no number) so seems like we might have this phrase somewhere else.

  • update the LHN to use this English copy. Tbh neither I nor Ioni cannot find the copy in the screenshot in the database, maybe it was already updated?
  • update English copy to invited member ${to}
  • update Spanish copy to miembro invitado ${to}

added <email> as a user

  • English should be updated to added <email> as a member
  • Spanish translation should be set to agregó a <email> como miembro

@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Aug 14, 2024
@melvin-bot melvin-bot bot changed the title Language - Message of added or invited user to "#admins" chat, doesn't get translated [$250] Language - Message of added or invited user to "#admins" chat, doesn't get translated Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Job added to Upwork: https://www.upwork.com/jobs/~010023a595aa275ac1

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External)

@sonialiap sonialiap changed the title [$250] Language - Message of added or invited user to "#admins" chat, doesn't get translated [$125] Language - Message of added or invited user to "#admins" chat, doesn't get translated Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Upwork job price has been updated to $125

@sonialiap
Copy link
Contributor

Decreasing price since this is a simple copy change, making sure a translation exists, and a little bit of searching to confirm where the old translation is coming from. Details here

@ZhenjaHorbach
Copy link
Contributor

@nkdengineer
Thanks for your proposal
Could you check this message and update your proposal ?

@nkdengineer
Copy link
Contributor

@ZhenjaHorbach I updated my proposal.

@ZhenjaHorbach
Copy link
Contributor

@nkdengineer
Thanks !
This proposal looks good to me !

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 14, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@ZhenjaHorbach
Copy link
Contributor

@sonialiap

In fact, we have more issues related to translation
At the moment I have already found 2 new issues (update role and remove participant )
I think we can cover it in one PR
Снимок экрана 2024-08-15 в 15 22 07

@sonialiap
Copy link
Contributor

@ZhenjaHorbach sounds good 👍

@nkdengineer
Copy link
Contributor

@sonialiap please give me translations for 2 cases above

@sonialiap
Copy link
Contributor

@nkdengineer
English - updated the role of <email> from "<role>" to "<role>"
Spanish - actualicé el rol de "<role>" a "<role>"

English - removed <role> <email>
Spanish - eliminado <role> <email>

user - should be changed to member in English. miembro in Spanish
admin - administrador in Spanish

@sonialiap sonialiap added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

Triggered auto assignment to @zanyrenney (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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 16, 2024
@sonialiap
Copy link
Contributor

@zanyrenney I'm OOO Aug 19-30, adding leave buddy.
Status: waiting for build

Copy link

melvin-bot bot commented Aug 23, 2024

@sonialiap, @srikarparsi, @zanyrenney, @ZhenjaHorbach, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Aug 27, 2024

@sonialiap, @srikarparsi, @zanyrenney, @ZhenjaHorbach, @nkdengineer Still overdue 6 days?! Let's take care of this!

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Aug 28, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ZhenjaHorbach] The PR that introduced the bug has been identified. Link to the PR:

New feature (Part of the Enhanced System Messages project)

  • [@ZhenjaHorbach] 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:

NA

  • [@ZhenjaHorbach] A discussion in #expensify-bugs 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

  • [@ZhenjaHorbach] Determine if we should create a regression test for this bug.
  • [@ZhenjaHorbach] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  • Open App
  • Tap on the Settings on the bottom of the screen.
  • Tap on "Preferences", open "Language" and choose "Spanish"
  • Tap on the arrow on the top left corner.
  • Tap on the chats icon on the bottom of the screen.
  • Check in the "#admins" chat preview, the language in which the invitation message is displayed.
  • Open the "#admins" chat.
  • Check the "New user added" message and the language in which is displayed.
  • Verify that system messages are translated into Spanish

Do we agree 👍 or 👎

@nkdengineer
Copy link
Contributor

nkdengineer commented Aug 28, 2024

Decreasing price since this is a simple copy change, making sure a translation exists, and a little bit of searching to confirm where the old translation is coming from. Details #46960 (comment)

@zanyrenney This issue not only did a simple change translation but also updated copy case, LHN case, and side bar util case and fixed for some other messages. See the PR for more details. Can you please update the price to the default price, thanks.

cc @sonialiap

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Aug 28, 2024

Decreasing price since this is a simple copy change, making sure a translation exists, and a little bit of searching to confirm where the old translation is coming from. Details #46960 (comment)

@zanyrenney This issue not only did a simple change translation but also updated copy case, LHN case, and side bar util case and fixed for some other messages. See the PR for more details. Can you please update the price to the default price, thanks.

cc @sonialiap

I just wanted to write about this 😅
I agree with this
Since we covered several additional cases

@zanyrenney
Copy link
Contributor

I'm unassigning as Sonia came back a few days ago, so you shouldn't need my help here! She has more context on the payment being changed so will leave that convo to her! :)

@zanyrenney zanyrenney removed their assignment Sep 4, 2024
@sonialiap sonialiap changed the title [$125] Language - Message of added or invited user to "#admins" chat, doesn't get translated [$250] Language - Message of added or invited user to "#admins" chat, doesn't get translated Sep 5, 2024
Copy link

melvin-bot bot commented Sep 5, 2024

Upwork job price has been updated to $250

@sonialiap
Copy link
Contributor

Hi team, I agree that it makes sense to update the price to the default since this issue ended up growing 👍

Automation didn't run, but the deploy happened 3 weeks ago so I'm issuing payment!

Payment summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

9 participants