-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CP Staging] Fix translating you
#80973
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
Conversation
|
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| callback: (value) => { | ||
| if (value ?? true) { | ||
| return; | ||
| } |
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.
❌ CONSISTENCY-5
ESLint rule disables must include a comment explaining why the rule is being disabled. This helps team members understand the exception and ensures code quality is maintained.
Suggested fix:
// translateLocal is deprecated in favor of useLocalize hook, but this is a module-level
// initialization that cannot use hooks, so we must use the deprecated function
// eslint-disable-next-line @typescript-eslint/no-deprecated
youTranslation = translateLocal('common.you').toLowerCase();Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
src/libs/PersonalDetailsUtils.ts
Outdated
| if (!youTranslation) { | ||
| // eslint-disable-next-line @typescript-eslint/no-deprecated | ||
| youTranslation = translateLocal('common.you').toLowerCase(); | ||
| } |
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.
❌ CONSISTENCY-5
ESLint rule disables must include a comment explaining why the rule is being disabled. This helps team members understand the exception and ensures code quality is maintained.
Suggested fix:
// translateLocal is deprecated in favor of useLocalize hook, but this is a module-level
// initialization that cannot use hooks, so we must use the deprecated function
// eslint-disable-next-line @typescript-eslint/no-deprecated
hiddenTranslation = translateLocal('common.hidden');Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62d0adb060
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
[CP Staging] Fix translating `you` (cherry picked from commit ece75f4) (cherry-picked to staging by francoisl)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.3.11-13 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.3.11-16 🚀
|
Explanation of Change
I think there is a race condition going on where if translations are loaded before we connect to it we will never update the
youtransalation.This PR aims to fix that, not sure what changed recently that this is more prominent, but it is.
Fixed Issues
$ #80836
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
(you)when seeing yourself in the contacts listPR 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
Screen.Recording.2026-01-29.at.17.44.39.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari