remove unneccesary custom types from translations batch15 - #96605
Conversation
…ccesary-custom-types-from-translations-batch15_at2
|
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 |
|
@mjasikowski 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] |
|
please don't review yet, pr was created automatically being open and it has triggered the review, sorry! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78e7d53c9f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
| description: "Choose a plan that's right for you.", | ||
| subscriptionLink: 'Learn more', | ||
| lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ | ||
| lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ |
There was a problem hiding this comment.
object type left here on purpose, lockedPlanDescription returns PluralForm which requires an object with count as first param.
|
I left a few NAB, but overall it looks good to me. LGTM 🚀 |
|
opened for review. previous batches were reviewed by @QichenZhu, so I think we could reassign him here! 😁 |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
@QichenZhu can you comment here, so I can assign you as a reviewer? |
|
@mjasikowski, sorry for the late reply. I'm back from OOO and I'll start reviewing this asap. |
Reviewer Checklist
Screenshots/Videos |
|
@jakubstec, please merge main. Thanks! |
…neccesary-custom-types-from-translations-batch15_at2
|
done! @QichenZhu |
| const oldDisplayNameHtml = `<strong>${oldDisplayName}</strong>`; | ||
| const policyNameHtml = `<strong>${policyName}</strong>`; | ||
| const shouldUseYou = actorPersonalDetails?.accountID === currentUserAccountID; | ||
| switch (archiveReason) { |
There was a problem hiding this comment.
I see this one and another above that we are replacing the single line version with a switch, which is more verbose and less flexible (as we need to add a case for every new version).
Could we keep the non switch version if we made the params be an object (that does not require a type, but instead we document each type separately using string, number, etc)?
There was a problem hiding this comment.
yeah, we can make an exception for that, look's much simpler. Then I'll refactor other cases of translations like this (probably just a few)
There was a problem hiding this comment.
done, @QichenZhu could you take a look at 45e285b? Thanks!
| [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: {displayName: string}) => `Este chat está desactivado porque ${displayName} ha cerrado tu cuenta.`, | ||
| [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {displayName: string; oldDisplayName: string}) => | ||
| `Este chat está desactivado porque ${oldDisplayName} ha combinado tu cuenta con ${displayName}`, | ||
| [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => | ||
| shouldUseYou | ||
| ? `Este chat ya no está activo porque <strong>tu</strong> ya no eres miembro del espacio de trabajo ${policyName}.` | ||
| : `Este chat está desactivado porque ${displayName} ha dejado de ser miembro del espacio de trabajo ${policyName}.`, | ||
| [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}) => `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, | ||
| [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}) => `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, | ||
| [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: {policyName: string}) => `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, | ||
| [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {policyName: string}) => | ||
| `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, |
There was a problem hiding this comment.
NAB: es.ts usually doesn't specify types.
| @@ -32,8 +32,6 @@ function AvatarPageFooter({validationError, phraseParam = {}, isDirty, onSave}: | |||
| {!!validationError && ( | |||
| <DotIndicatorMessage | |||
| style={styles.mv5} | |||
| // `phraseParam` is an open record but `translate` accepts only the params shape for the | |||
| // given key; the cast is safe because callers always pass params matching `validationError`. | |||
There was a problem hiding this comment.
NAB: this change is no longer needed.
|
@jakubstec there is a new Greek translation now, so we need to merge our changes or regenerate it. |
|
CI failed @jakubstec |









Explanation of Change
Continue the work of removing unnecessary custom types from translations. Last PR:
#84399.
This is the last batch.
Fixed Issues
$ #76429
PROPOSAL: #76429 (comment)
Tests
Testing every modified component is not necessary since the changes are all related to types only, and TypeScript already checks types and enforces correct parameter usage.
Below is an example place where the changes can be observed in the UI.
1.3.1 Upload small resolution photo (below 80x80) and verify that error message is visible correctly.
3.2 Upload wrong format image (e.g webp) and verify that error message is visible correctly.
2.Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
MacOS: Chrome / Safari
Screen.Recording.2026-07-21.at.12.46.11.mov
Screen.Recording.2026-07-21.at.12.54.30.mov