Skip to content

Chat - Text (archived) is not translated in Spanish after switch language setting #9018

Closed

Description

@kavimuru

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


Issue is found when executing the PR #8436

Action Performed:

  1. Go https://staging.new.expensify.com/

  2. Log in with expensifail account A

  3. Create a Workspace

  4. Invite another user B to workspace

  5. Go to OldDot and delete the Workspace

  6. Log in with account B

  7. Go to Setting - Preferences

  8. Change language to Spanish

  9. Go back to LHN and find your Workspace

Expected Result:

Text (archived) is translated in Spanish after switch the langue settings

Actual Result:

Text (archived) is not translated in Spanish after switch the language setting

Workaround:

After refresh it gets updated

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1-60-1
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Bug5571379_Screenshot_20220514-112416_Chrome

Bug5571379_Screen_Recording_20220514-113124_Chrome.mp4

https://user-images.githubusercontent.com/43996225/168439290-9819d992-c1e4-4749-aa3b-630caee60c04.mp4
Expensify/Expensify Issue URL:

Issue reported by: Applause

Slack conversation:

View all open jobs on GitHub

Activity

  1. melvin-bot commented on May 14, 2022

    @melvin-bot

    Triggered auto assignment to @cead22 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. roryabraham commented on May 15, 2022

    @roryabraham
    Contributor

    The solution to this issue should use ReportUtils.getReportName to populate the report names in SidebarLinks

  3. stitesExpensify commented on May 16, 2022

    @stitesExpensify
    Contributor

    @cead22 I'm going to hand this over to @srikarparsi to take on!

  4. cead22 commented on May 17, 2022

    @cead22
    Contributor

    Thanks!

  5. srikarparsi commented on May 19, 2022

    @srikarparsi
    Contributor

    I've been working on this issue and currently have a question regarding code practices and have also ran into a problem with getting data from Onyx.

    Currently, when you change the language preference, most of the text in the chat is changing because it is listening for changes made to the locale setting in Onyx and updates the text based on that.

    However, the title which includes "(archived)" is different because it only fetches data from Onyx at the beginning and doesn't update based on changes to locale. A fix could be to listen to these changes similar to the text but the problem is that the title text occurs in multiple places and it would just be better to update the title in Onyx directly.

    Screen Shot 2022-05-19 at 2 07 54 AM

    As shown in the screenshot above, the language is English, but the title says "archivado" since in Onyx, report_16 also has archivado appended to the end. When the page is refreshed from this state, the text changes from archivado to archived which is good, but in Onyx the report name still has (archivado) appended to the end since changing the locale doesn't update Onyx's individual reports.

    Screen Shot 2022-05-19 at 2 27 36 AM

    To fix this issue, we need to update each report in Onyx to have the right title name when the language preference is changed. A possible solution is below.

    Screen Shot 2022-05-19 at 2 15 12 AM

    First, I wanted to ask if it was an ok coding practice to update Onyx's reports in the setLocale method as shown above since the other text that changes based on language does it by listening to the language preference setting in Onyx.

    Second, I'm running into an issue with the above code. I tried running the commented code but after not finding a way to get all the reports and iterate through them, I wanted to try and get just report_16. When I run that code, it logs undefined which I think means it did not find "report_16" as a key even though it is in Onyx as shown in the first two screenshots. I was thinking this is because that key isn't registered as one of the ones you can get data from but I'm not completely sure. Would anyone happen to know a workaround for this problem?

  6. 2 remaining items

  7. srikarparsi commented on May 23, 2022

    @srikarparsi
    Contributor

    Stuck on understanding which methods are outdated. Messaged to setup a call.

  8. melvin-bot commented on May 26, 2022

    @melvin-bot

    @srikarparsi Whoops! This issue is 2 days overdue. Let's get this updated quick!

  9. roryabraham commented on May 26, 2022

    @roryabraham
    Contributor

    @srikarparsi – anything I can do to help get this over the finish line? I'm here to help + review when you need 🙂

  10. melvin-bot commented on Jun 3, 2022

    @melvin-bot

    @srikarparsi Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. melvin-bot commented on Jun 7, 2022

    @melvin-bot

    @srikarparsi Still overdue 6 days?! Let's take care of this!

  12. srikarparsi commented on Jun 7, 2022

    @srikarparsi
    Contributor

    looked at test cases but believe we might have to change the test cases and not the code so messaged Rory

  13. srikarparsi commented on Jun 9, 2022

    @srikarparsi
    Contributor

    Fixed by this pr: #8569

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

Metadata

Metadata

Assignees

Labels

DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions