Skip to content

Commit 2fb4e1f

Browse files
authored
Merge pull request Expensify#77501 from software-mansion-labs/mrejdak/remove-unnecessary-types-single-param
2 parents c288636 + 143b03e commit 2fb4e1f

39 files changed

Lines changed: 469 additions & 855 deletions

src/components/AddressForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function AddressForm({
174174
<InputWrapper
175175
InputComponent={AddressSearch}
176176
inputID={INPUT_IDS.ADDRESS_LINE_1}
177-
label={translate('common.addressLine', {lineNumber: 1})}
177+
label={translate('common.addressLine', 1)}
178178
onValueChange={(data: unknown, key: unknown) => {
179179
onAddressChanged(data, key);
180180
}}
@@ -194,8 +194,8 @@ function AddressForm({
194194
<InputWrapper
195195
InputComponent={TextInput}
196196
inputID={INPUT_IDS.ADDRESS_LINE_2}
197-
label={translate('common.addressLine', {lineNumber: 2})}
198-
aria-label={translate('common.addressLine', {lineNumber: 2})}
197+
label={translate('common.addressLine', 2)}
198+
aria-label={translate('common.addressLine', 2)}
199199
role={CONST.ROLE.PRESENTATION}
200200
defaultValue={street2}
201201
spellCheck={false}

src/components/DelegateNoAccessModalProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function DelegateNoAccessModalProvider({children}: PropsWithChildren) {
3939

4040
const delegateNoAccessPrompt = (
4141
<View style={[styles.renderHTML, styles.flexRow]}>
42-
<RenderHTML html={translate('delegate.notAllowedMessage', {accountOwnerEmail: delegatorEmail})} />
42+
<RenderHTML html={translate('delegate.notAllowedMessage', delegatorEmail)} />
4343
</View>
4444
);
4545
const contextValue = useMemo(

src/components/SettlementButton/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,7 @@ function SettlementButton({
515515
if (lastPaymentMethod === CONST.IOU.PAYMENT_TYPE.EXPENSIFY || (hasIntentToPay && (isExpenseReport || isInvoiceReport))) {
516516
if (isInvoiceReport) {
517517
const isBusinessBankAccount = bankAccountToDisplay?.accountData?.type === CONST.BANK_ACCOUNT.TYPE.BUSINESS;
518-
return translate(isBusinessBankAccount ? 'iou.invoiceBusinessBank' : 'iou.invoicePersonalBank', {
519-
lastFour: bankAccountToDisplay?.accountData?.accountNumber?.slice(-4) ?? '',
520-
});
518+
return translate(isBusinessBankAccount ? 'iou.invoiceBusinessBank' : 'iou.invoicePersonalBank', bankAccountToDisplay?.accountData?.accountNumber?.slice(-4) ?? '');
521519
}
522520
if (!personalBankAccountList.length) {
523521
return;
@@ -528,18 +526,18 @@ function SettlementButton({
528526

529527
if ((lastPaymentMethod === CONST.IOU.PAYMENT_TYPE.VBBA || hasIntentToPay) && !!policy?.achAccount) {
530528
if (policy?.achAccount?.accountNumber) {
531-
return translate('paymentMethodList.bankAccountLastFour', {lastFour: policy?.achAccount?.accountNumber?.slice(-4)});
529+
return translate('paymentMethodList.bankAccountLastFour', policy?.achAccount?.accountNumber?.slice(-4));
532530
}
533531

534532
if (!bankAccountToDisplay?.accountData?.accountNumber) {
535533
return;
536534
}
537535

538-
return translate('paymentMethodList.bankAccountLastFour', {lastFour: bankAccountToDisplay?.accountData?.accountNumber?.slice(-4)});
536+
return translate('paymentMethodList.bankAccountLastFour', bankAccountToDisplay?.accountData?.accountNumber?.slice(-4));
539537
}
540538

541539
if (bankAccount?.accountData?.type === CONST.BANK_ACCOUNT.TYPE.BUSINESS && bankAccount?.methodID === policy?.achAccount?.bankAccountID && isExpenseReportUtil(iouReport)) {
542-
return translate('paymentMethodList.bankAccountLastFour', {lastFour: bankAccount?.accountData?.accountNumber?.slice(-4) ?? ''});
540+
return translate('paymentMethodList.bankAccountLastFour', bankAccount?.accountData?.accountNumber?.slice(-4) ?? '');
543541
}
544542

545543
return undefined;

src/components/SubStepForms/RegistrationNumberStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function RegistrationNumberStep<TFormID extends keyof OnyxFormValuesMapping>({
8080
style={[styles.mh5, styles.flexGrow1]}
8181
shouldHideFixErrorsAlert
8282
>
83-
<Text style={[styles.textHeadlineLineHeightXXL]}>{translate('businessInfoStep.whatsTheBusinessRegistrationNumber', {country})}</Text>
83+
<Text style={[styles.textHeadlineLineHeightXXL]}>{translate('businessInfoStep.whatsTheBusinessRegistrationNumber', country)}</Text>
8484
<InputWrapper
8585
InputComponent={TextInput}
8686
label={translate('businessInfoStep.registrationNumber')}

src/languages/de.ts

Lines changed: 42 additions & 74 deletions
Large diffs are not rendered by default.

src/languages/en.ts

Lines changed: 42 additions & 73 deletions
Large diffs are not rendered by default.

src/languages/es.ts

Lines changed: 42 additions & 42 deletions
Large diffs are not rendered by default.

src/languages/fr.ts

Lines changed: 42 additions & 74 deletions
Large diffs are not rendered by default.

src/languages/it.ts

Lines changed: 42 additions & 73 deletions
Large diffs are not rendered by default.

src/languages/ja.ts

Lines changed: 42 additions & 72 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)