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

Expense - Hourglass message and report header title is not displayed in Spanish #51167

Closed
4 of 8 tasks
IuliiaHerets opened this issue Oct 21, 2024 · 7 comments
Closed
4 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@IuliiaHerets
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: V9. 0.51-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

Pre-condition:

  1. Set app language to spanish
  2. Have a workspace created
  3. Open workspace chat
  4. Create an expense

Steps:

  1. Go to https://staging.new.expensify.com/home
  2. Open the workspace chat
  3. Open the expense
  4. Note the hourglass message and report header title

Expected Result:

Hourglass message and report header title must be displayed in Spanish.

Actual Result:

Hourglass message and report header title is not displayed in Spanish.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6640789_1729501044962!Screenshot_2024-10-21-14-16-27-027_com android chrome-edit

Bug6640789_1729501044975.Screenrecorder-2024-10-21-14-16-09-637_compress_1.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 21, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

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

@IuliiaHerets
Copy link
Author

@OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@ChavdaSachin
Copy link
Contributor

ChavdaSachin commented Oct 21, 2024

Proposal

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

Hourglass message and report header title is not displayed in Spanish

What is the root cause of that problem?

It is handled from here

optimisticNextStep = {
type,
icon: CONST.NEXT_STEP.ICONS.HOURGLASS,
message: [
{
text: 'Waiting for ',
},
reimburserAccountID === -1
? {
text: 'an admin',
}
: {
text: ReportUtils.getDisplayNameForParticipant(reimburserAccountID),
type: 'strong',
},
{
text: ' to ',
},
{
text: hasValidAccount ? 'pay' : 'finish setting up',
},
{
text: hasValidAccount ? ' %expenses.' : ' a business bank account.',
},
],
};
break;

The whole NextStepUtils file is hard coded in English.

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

Make use of translate function for the whole NextStepUtils file to tackle current and all the future similar issues.

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.

@FitseTLT
Copy link
Contributor

Proposal

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

Expense - Hourglass message and report header title is not displayed in Spanish

What is the root cause of that problem?

  1. Header title:
    We are displaying the reportName of the report directly which lacks translation
    return report.reportName;
  2. Next Steps:
    We are directly displaying (without translation) the next steps here
    <RenderHTML html={messageContent} />

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

We should add the necessary copys for these cases and display them

  1. Here
    return report.reportName;

    We can translate the reportName we can do that in the general case for both invoice and money request report we can separate the Expense (Invoice) part of the text and pass the type expense or invoice and also the id of the report to a translateLocal as params and translate it accordingly
  2. For next steps we will need to create a copy for the different types of next step messages we have got, and we can get the m from here (and also from BE in case there are next steps for which we are not creating an optimistic data)
    but we will need to first identify the type of next message we have got from the nextStep.message array so that we can translate meaningfully as a sentence. Then we will pass the type of next step and the necessary params like the email and then translate Local will return us the next step HTML in text just similar to what NextStepUtils.parseMessage is doing now.

What alternative solutions did you explore? (Optional)

@OfstadC
Copy link
Contributor

OfstadC commented Oct 22, 2024

Will hopefully get to this today

@melvin-bot melvin-bot bot added the Overdue label Oct 24, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 25, 2024

Posting in Slack

@melvin-bot melvin-bot bot removed the Overdue label Oct 25, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 25, 2024

This isn't supported currently and we don't have immediate plans to change this - closing

@OfstadC OfstadC closed this as completed Oct 25, 2024
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
Projects
None yet
Development

No branches or pull requests

4 participants