Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[HOLD for payment 2024-09-26] Expense - Bad grammar "You's expense(s)" instead of "Your expense(s)" in report banner #49466

Closed IuliiaHerets closed 1 month ago

IuliiaHerets commented 1 month ago

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.38-0 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit an expense and avoid all the violations.
  4. Go to expense report.

Expected Result:

The banner should display "Waiting for expense(s) to automatically submit on Sunday".

Actual Result:

The banner displays "Waiting for <You's> expense(s) to automatically submit on Sunday".

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/e8fbf049-7c97-44dd-b024-bdf91ef47b84

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @anmurali
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @AndrewGable (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 1 month ago

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

github-actions[bot] commented 1 month ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
MuaazArshad commented 1 month ago

Proposal

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

Bad grammar "You's expense(s)" instead of "Your expense(s)" in report banner

What is the root cause of that problem?

This is what we are implementing

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

If we do not want to add the name of use then we have to remove this

{ 
     text: `${ownerDisplayName}'s`, 
     type: 'strong', 
 }, 

form here

https://github.com/Expensify/App/blob/040c8017219d4ca3650e41d41660c04d6b5a2d64/src/libs/NextStepUtils.ts#L138-L141

What alternative solutions did you explore? (Optional)

If we want to remove 's then we will remove it https://github.com/Expensify/App/blob/040c8017219d4ca3650e41d41660c04d6b5a2d64/src/libs/NextStepUtils.ts#L138-L141

abzokhattab commented 1 month ago

Edited by proposal-police: This proposal was edited at 2024-09-19 14:17:12 UTC.

Proposal

Bad grammar "You's expense(s)" instead of "Your expense(s)" in report banner

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

What is the root cause of that problem?

here we dont handle the case where the ownerDisplayName resolves to "You" https://github.com/Expensify/App/blob/18ce38bf425d5e0bb37bd1e81ca127abec15addf/src/libs/NextStepUtils.ts#L138-L141

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

suggested change: import translate from useLocalize

    const {translate} = useLocalize();

optionally also we need to define the languages translations for your

then use it here:

text:  ownerDisplayName === translate('common.you')? `${translate('common.your')}`: `${ownerDisplayName }'s`,

What alternative solutions did you explore? (Optional)

nyomanjyotisa commented 1 month ago

Proposal

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

Bad grammar "You's expense(s)" instead of "Your expense(s)" in report banner

What is the root cause of that problem?

We always add 's to the ownerDisplayName here https://github.com/Expensify/App/blob/040c8017219d4ca3650e41d41660c04d6b5a2d64/src/libs/NextStepUtils.ts#L138-L141

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

set the text to "Your" if the the owner name is "You"

const isOwnerYou = ownerDisplayName === Localize.translateLocal('common.you');
...
            {
                text: isOwnerYou ? 'Your' : `${ownerDisplayName}'s`,
                type: 'strong',
            },

What alternative solutions did you explore? (Optional)

Base on expected result we should display "Waiting for expense(s) to automatically submit on Sunday", so we need change this to the following

    ...(!isOwnerYou ? [
        {
            text: `${ownerDisplayName}'s`,
            type: 'strong',
        },
    ] : []),
abzokhattab commented 1 month ago

Proposal updated

made the translation step of your as optional

grgia commented 1 month ago

Looking at this

grgia commented 1 month ago

Caused by https://github.com/Expensify/App/pull/49315

grgia commented 1 month ago

https://expensify.slack.com/archives/C01GTK53T8Q/p1726754452736749

melvin-bot[bot] commented 1 month ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

allgandalf commented 1 month ago

Please assign me here, i reviewed the linked PR , thanks :) 🙏

aldo-expensify commented 1 month ago

Summary:

Assigned @allgandalf in the role of C+ reviewing https://github.com/Expensify/App/pull/49482 @ishpaul777 is the author of https://github.com/Expensify/App/pull/49482 fixing this deploy blocker

@ishpaul777 was the C+ of https://github.com/Expensify/App/pull/49315 that introduced the regression @aldo-expensify is the author of https://github.com/Expensify/App/pull/49315 that introduced the regression

melvin-bot[bot] commented 1 month ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 month ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.38-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-09-26. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 1 month ago

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:

allgandalf commented 1 month ago

[!NOTE] No checklist here as this was a regression from some other recent PR

Only payment remaining

melvin-bot[bot] commented 1 month ago

Payment Summary

[Upwork Job]()

BugZero Checklist (@anmurali)

allgandalf commented 1 month ago

not overdue waiting for payment

melvin-bot[bot] commented 1 month ago

@anmurali, @grgia, @aldo-expensify, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

anmurali commented 1 month ago

Offer is here

anmurali commented 1 month ago

Paid.