You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat - Text (archived) is not translated in Spanish after switch language setting #9018
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:
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.
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.
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.
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?
Activity
melvin-bot commentedon May 14, 2022
Triggered auto assignment to @cead22 (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.roryabraham commentedon May 15, 2022
The solution to this issue should use
ReportUtils.getReportNameto populate the report names inSidebarLinksstitesExpensify commentedon May 16, 2022
@cead22 I'm going to hand this over to @srikarparsi to take on!
cead22 commentedon May 17, 2022
Thanks!
srikarparsi commentedon May 19, 2022
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.
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.
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.
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?
2 remaining items
srikarparsi commentedon May 23, 2022
Stuck on understanding which methods are outdated. Messaged to setup a call.
melvin-bot commentedon May 26, 2022
@srikarparsi Whoops! This issue is 2 days overdue. Let's get this updated quick!
roryabraham commentedon May 26, 2022
@srikarparsi – anything I can do to help get this over the finish line? I'm here to help + review when you need 🙂
melvin-bot commentedon Jun 3, 2022
@srikarparsi Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jun 7, 2022
@srikarparsi Still overdue 6 days?! Let's take care of this!
srikarparsi commentedon Jun 7, 2022
looked at test cases but believe we might have to change the test cases and not the code so messaged Rory
srikarparsi commentedon Jun 9, 2022
Fixed by this pr: #8569