Skip to content

[Due for payment 2026-02-19] [$250] Report - "Waiting for you to add expenses" in empty report is not translated #79619

Closed

Description

@lanitochka17

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: v9.3.2-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #75261
Email or phone of affected tester (no customers): Any new account
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Macbook Pro 2023 / Sequoia 15.2
App Component: Chat Report View

Action Performed:

Precond: Users device is set to Spanish

  1. Access www.staging.new.expensify.com
  2. Go to Reports > Reports > Create an empty Report and click on it
  3. Observe the "Waiting for you to add expenses" text

Expected Result:

User expects this line to be translated

Actual Result:

Appears in English

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7049455_1768430286918.Text_not_translated.mp4
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022011593758031610412
  • Upwork Job ID: 2011593758031610412
  • Last Price Increase: 2026-01-15
  • Automatic offers:
    • aimane-chnaif | Reviewer | 110237575
    • MobileMage | Contributor | 110237576
Issue OwnerCurrent Issue Owner: @brianlee-expensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 14, 2026
  2. melvin-bot commented on Jan 14, 2026

    @melvin-bot

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

  3. MobileMage commented on Jan 14, 2026

    @MobileMage
    Contributor

    Proposal

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

    "Waiting for you to add expenses" message in empty reports is not translated when device is set to Spanish (or any non-English language).

    What is the root cause of that problem?

    There are two next step systems in the codebase:

    1. New system (ReportNextStep with messageKey) - uses translation keys like CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_ADD_TRANSACTIONS that get translated via buildNextStepMessage() with translate()

    2. Deprecated system (ReportNextStepDeprecated with message array) - builds hardcoded English strings directly in buildNextStepNew() at src/libs/NextStepUtils.ts

    The MoneyReportHeaderStatusBar component receives the deprecated format from Onyx (ONYXKEYS.COLLECTION.NEXT_STEP) and uses parseMessage() which just renders the English text as-is - no translation happens.

    Looking at buildNextStepNew() lines 507-529:

    optimisticNextStep = {
        type,
        icon: CONST.NEXT_STEP.ICONS.HOURGLASS,
        message: [
            { text: 'Waiting for ' },  // <- hardcoded English
            { text: `${ownerDisplayName}`, type: 'strong' },
            { text: ' to ' },          // <- hardcoded English
            { text: 'add' },           // <- hardcoded English
            { text: ' %expenses.' },   // <- hardcoded English
        ],
    };

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

    Modify MoneyReportHeaderStatusBar to use the new translation system:

    1. Accept both nextStep (deprecated) and nextStepNew (new format with messageKey) props
    2. When nextStepNew is available, use buildNextStepMessage() with translate() to get translated text
    3. Fall back to parseMessage() for deprecated format

    In src/components/MoneyReportHeaderStatusBar.tsx:

    import {buildNextStepMessage} from '@libs/NextStepUtils';
    import useLocalize from '@hooks/useLocalize';
    
    function MoneyReportHeaderStatusBar({nextStep, nextStepNew}) {
        const {translate} = useLocalize();
        const currentUserAccountID = useCurrentUserPersonalDetails().accountID;
        
        const messageContent = useMemo(() => {
            if (nextStepNew?.messageKey) {
                return buildNextStepMessage(nextStepNew, translate, currentUserAccountID);
            }
            return parseMessage(nextStep?.message, currentUserEmail);
        }, [nextStep, nextStepNew, translate, currentUserAccountID]);
        // ...
    }

    Then update callers to pass both formats during migration.

    What alternative solutions did you explore? (Optional)

    Could modify buildNextStepNew() to use translate() directly when building message arrays, but that would require passing translate through many call sites. Using the new messageKey system is the intended migration path.

  4. duckemiah commented on Jan 14, 2026

    @duckemiah

    Proposal

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

    "Waiting for you to add expenses" in empty reports is not translated when device language is set to Spanish/other languages.

    What is the root cause of that problem?

    MoneyReportHeader reads from deprecated ONYXKEYS.COLLECTION.NEXT_STEP which contains hardcoded English strings built by buildNextStepNew() in src/libs/NextStepUtils.ts:

    message: [
        { text: 'Waiting for ' },  // hardcoded
        { text: `${ownerDisplayName}`, type: 'strong' },
        { text: ' to ' },
        { text: isReportContainingTransactions ? 'submit' : 'add' },
        { text: ' %expenses.' },
    ],

    A new translation-aware system already exists:

    • buildOptimisticNextStep() generates Report.nextStep with messageKey for translations
    • buildNextStepMessage() translates using translate()
    • Translations exist in all language files (es.ts has them at lines 1263-1272)

    The new format is stored on Report.nextStep but the UI never reads it.

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

    Update MoneyReportHeaderStatusBar.tsx to use the new translatable format:

    1. Add nextStepNew prop for the new Report.nextStep format
    2. In the messageContent useMemo, check for nextStepNew?.messageKey first and use buildNextStepMessage() with translate()
    3. Fall back to deprecated format if new one isn't available

    In MoneyReportHeader.tsx, pass the new format:

    -<MoneyReportHeaderStatusBar nextStep={optimisticNextStep} />
    +<MoneyReportHeaderStatusBar nextStep={optimisticNextStep} nextStepNew={moneyRequestReport?.nextStep} />

    What alternative solutions did you explore? (Optional)

    Could modify buildNextStepNew() to accept a translate function, but that would require threading it through many call sites. The new messageKey system already exists for exactly this purpose - just need to wire it up.

  5. changed the title [-]Report - "Waiting for you to add expenses" in empty report is not translated[/-] [+][$250] Report - "Waiting for you to add expenses" in empty report is not translated[/+] on Jan 15, 2026
  6. melvin-bot commented on Jan 15, 2026

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 15, 2026
  8. melvin-bot commented on Jan 15, 2026

    @melvin-bot

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

  9. yatin-italy commented on Jan 15, 2026

    @yatin-italy

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  10. github-actions commented on Jan 15, 2026

    @github-actions
    Contributor

    ⚠️ @yatin-italy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  11. abdul-samad-91 commented on Jan 15, 2026

    @abdul-samad-91

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  12. 21 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 10, 2026
  14. changed the title [-][$250] Report - "Waiting for you to add expenses" in empty report is not translated[/-] [+][Due for payment 2026-02-19] [$250] Report - "Waiting for you to add expenses" in empty report is not translated[/+] on Feb 12, 2026
  15. melvin-bot commented on Feb 12, 2026

    @melvin-bot

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

  16. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.17-9 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 2026-02-19. 🎊

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

  17. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    @aimane-chnaif @brianlee-expensify 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]

  18. brianlee-expensify commented on Feb 14, 2026

    @brianlee-expensify
    Contributor

    @aimane-chnaif can you fill out the bugzero checklist and confirm whether a regression test is needed? thanks in advance!

  19. aimane-chnaif commented on Feb 15, 2026

    @aimane-chnaif
    Contributor

    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: The localization wasn't originally supported for this next step message.

    • [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:

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/601202

    Regression Test Proposal

    Precondition:

    Users device is set to other language

    Test:

    1. Go to Reports > Reports > Create an empty Report and click on it
    2. Observe the "Waiting for you to add expenses" text
    3. Verify that this line is translated

    Do we agree 👍 or 👎

  20. brianlee-expensify commented on Feb 19, 2026

    @brianlee-expensify
    Contributor

    Payment Summary

    Contributor: @MobileMage paid $250 via Upwork
    Contributor+: @aimane-chnaif paid $250 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions