-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: [Translation Migration] Fix split or incomplete translations in reportActionsView #75129
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…reportActionsView
aa3534e to
685df71
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
situchan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TaduJR Screenshots are missing on all platforms
…t-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…tion-Migration-Fix-split-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…lations-in-reportActionsView' of https://github.com/TaduJR/App into fix-Translation-Migration-Fix-split-or-incomplete-translations-in-reportActionsView
…tion-Migration-Fix-split-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
…t-or-incomplete-translations-in-reportActionsView
situchan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…t-or-incomplete-translations-in-reportActionsView
|
Oh Thanks @situchan |
| } | ||
|
|
||
| welcomeMessage.messageHtml = messageHtml; | ||
| welcomeMessage.messageText = Parser.htmlToText(welcomeMessage.messageHtml); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we make sure that messageText is exactly the same as before migration?
Line 1079 in f82a8db
| welcomeMessage.messageText = displayNamesWithTooltips.length ? ensureSingleSpacing(`${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}`) : ''; |
ensureSingleSpacing is no longer needed?
Can we add some unit tests to confirm no regression in messageText?
There should be no difference between Parser.htmlToText(welcomeMessage.messageHtml) and
displayNamesWithTooltips.length ? ensureSingleSpacing(`${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}`) : ''
I think test step is wrong. It's clickable Screen.Recording.2025-11-30.at.11.58.35.PM.mov |
Done. |
|
Job 8 is failing but I think it's expected as it's now 12/25. |



Explanation of Change
This PR fixes split or incomplete translations in reportActionsView.beginningOfChatHistory by migrating from string concatenation to a parameterized translation approach with HTML rendering.
Problem:
The current implementation uses an incomplete translation string "This chat is with " (with trailing space) and manually assembles the UI by mapping over participants to create individual UserDetailsTooltip components.
This violates translation best practices because:
Solution:
Following the established pattern from MentionUserRenderer
Fixed Issues
$ #72050
PROPOSAL: #72050 (comment)
Tests
Test Case 1: One Participant Chat
Test Case 2: Two Participant Chat
Test Case 3: Three+ Participant Chat (Group Chat)
Test Case 4: Optimistic Accounts (Unregistered Users)
Test Case 5: Concierge & Self-DM
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
Mac-Chrome-1.mp4
MacOS: Desktop
Mac-Desktop.1.mp4