From 622c80446bbd80c0d2ca6374d3d6a1661ee1e2ff Mon Sep 17 00:00:00 2001 From: jakubstec Date: Tue, 21 Jul 2026 10:58:32 +0200 Subject: [PATCH 1/5] refactor: remove types from tranlations and update callsites part 1 --- src/components/AccountSwitcher.tsx | 2 +- .../AccountingConnectionConfirmationModal.tsx | 4 +- src/components/ArchivedReportFooter.tsx | 36 ++++- src/components/AvatarWithImagePicker.tsx | 22 +-- src/components/HeaderWithBackButton/index.tsx | 4 +- src/components/InteractiveStepSubHeader.tsx | 6 +- .../InteractiveStepSubPageHeader.tsx | 6 +- .../ExportPrimaryAction.tsx | 6 +- src/components/ParentNavigationSubtitle.tsx | 2 +- .../ExportWithDropdownMenu.tsx | 4 +- src/hooks/useExportActions.ts | 5 +- src/hooks/useExportAgainModal.ts | 5 +- src/hooks/useLifecycleActions.tsx | 6 +- src/hooks/useSearchBulkActions.ts | 5 +- src/languages/de.ts | 152 +++++++----------- src/languages/en.ts | 151 +++++++---------- src/languages/es.ts | 107 ++++++------ src/languages/fr.ts | 152 +++++++----------- src/languages/it.ts | 152 +++++++----------- src/languages/ja.ts | 152 +++++++----------- src/languages/nl.ts | 152 +++++++----------- src/languages/params.ts | 137 ---------------- src/languages/pl.ts | 152 +++++++----------- src/languages/pt-BR.ts | 152 +++++++----------- src/languages/zh-hans.ts | 152 +++++++----------- src/libs/AvatarUtils.ts | 17 +- src/libs/ModifiedExpenseMessage.ts | 2 +- src/libs/OptionsListUtils/index.ts | 17 +- src/libs/ReportActionsUtils.ts | 32 ++-- src/libs/Violations/ViolationsUtils.ts | 4 +- src/pages/Debug/DebugDetails.tsx | 14 +- src/pages/DynamicReportDetailsPage.tsx | 2 +- .../BaseReportActionContextMenu.tsx | 3 +- .../PopoverReportActionContextMenu.tsx | 4 +- .../report/DynamicReportDetailsExportPage.tsx | 4 +- .../Agents/Fields/EditAgentAvatarPage.tsx | 10 +- src/pages/settings/Copilot/CopilotPage.tsx | 4 +- .../settings/Profile/Avatar/AvatarPreview.tsx | 10 +- .../Profile/Avatar/EditUserAvatarContent.tsx | 8 +- src/pages/settings/Profile/Avatar/types.ts | 2 +- .../AddDelegate/ConfirmDelegatePage.tsx | 4 +- .../AddDelegate/SelectDelegateRolePage.tsx | 4 +- .../UpdateDelegateRolePage.tsx | 4 +- .../Subscription/PaymentCard/index.tsx | 9 +- .../SubscriptionSettings/index.native.tsx | 9 +- .../SubscriptionSettings/index.tsx | 9 +- .../DynamicWorkspaceOverviewPlanTypePage.tsx | 5 +- .../accounting/PolicyAccountingPage.tsx | 6 +- .../CertiniaExistingConnectionsPage.tsx | 4 +- .../intacct/ExistingConnectionsPage.tsx | 4 +- .../intacct/import/SageIntacctImportPage.tsx | 2 +- .../import/SageIntacctToggleMappingsPage.tsx | 6 +- ...ickbooksDesktopExistingConnectionsPage.tsx | 4 +- src/pages/workspace/accounting/utils.tsx | 2 +- src/pages/workspace/hr/HRProviderCard.tsx | 2 +- .../reports/CreateReportFieldsPage.tsx | 4 +- .../reports/ReportFieldsInitialValuePage.tsx | 4 +- tests/ui/ReportActionItemTest.tsx | 2 +- tests/unit/ModifiedExpenseMessageTest.ts | 37 +++-- tests/unit/OptionsListUtilsTest.tsx | 14 +- tests/unit/ReportActionsUtilsTest.ts | 7 +- 61 files changed, 757 insertions(+), 1242 deletions(-) diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index ddba936e443e..0792870de043 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -195,7 +195,7 @@ function AccountSwitcher({isScreenFocused}: AccountSwitcherProps) { const error = getLatestError(errorFields?.connect?.[email]); const personalDetails = getPersonalDetailByEmail(email); return createBaseMenuItem(personalDetails, error, { - badgeText: translate('delegate.role', {role}), + badgeText: translate('delegate.role', role), onSelected: () => { if (isOffline) { close(showOfflineModal); diff --git a/src/components/AccountingConnectionConfirmationModal.tsx b/src/components/AccountingConnectionConfirmationModal.tsx index eead707e8406..53111121de96 100644 --- a/src/components/AccountingConnectionConfirmationModal.tsx +++ b/src/components/AccountingConnectionConfirmationModal.tsx @@ -14,11 +14,11 @@ function AccountingConnectionConfirmationModal({integrationToConnect, onCancel, return ( ${displayName}`, - oldDisplayName: `${oldDisplayName}`, - policyName: `${policyName}`, - shouldUseYou: actorPersonalDetails?.accountID === currentUserAccountID, - }) - : translate(`reportArchiveReasons.${archiveReason}`); + let text: string; + if (shouldRenderHTML) { + const displayNameHtml = `${displayName}`; + const oldDisplayNameHtml = `${oldDisplayName}`; + const policyNameHtml = `${policyName}`; + const shouldUseYou = actorPersonalDetails?.accountID === currentUserAccountID; + switch (archiveReason) { + case CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED: + text = translate('reportArchiveReasons.accountClosed', displayNameHtml); + break; + case CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED: + text = translate('reportArchiveReasons.accountMerged', displayNameHtml, oldDisplayNameHtml); + break; + case CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY: + text = translate('reportArchiveReasons.removedFromPolicy', displayNameHtml, policyNameHtml, shouldUseYou); + break; + case CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED: + text = translate('reportArchiveReasons.policyDeleted', policyNameHtml); + break; + case CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED: + text = translate('reportArchiveReasons.invoiceReceiverPolicyDeleted', policyNameHtml); + break; + default: + text = translate('reportArchiveReasons.default'); + } + } else { + text = translate(`reportArchiveReasons.${archiveReason}`); + } return ( ; + phraseArgs: unknown[]; }; type OpenPickerParams = { @@ -107,7 +107,7 @@ function AvatarWithImagePicker({ const isFocused = useIsFocused(); const [popoverPosition, setPopoverPosition] = useState({horizontal: 0, vertical: 0}); const [isMenuVisible, setIsMenuVisible] = useState(false); - const [errorData, setErrorData] = useState({validationError: null, phraseParam: {}}); + const [errorData, setErrorData] = useState({validationError: null, phraseArgs: []}); const [isAvatarCropModalOpen, setIsAvatarCropModalOpen] = useState(false); const [imageData, setImageData] = useState({ uri: '', @@ -118,10 +118,10 @@ function AvatarWithImagePicker({ const anchorRef = useRef(null); const {translate} = useLocalize(); - const setError = (error: TranslationPaths | null, phraseParam: Record) => { + const setError = (error: TranslationPaths | null, phraseArgs: unknown[] = []) => { setErrorData({ validationError: error, - phraseParam, + phraseArgs, }); }; @@ -131,11 +131,11 @@ function AvatarWithImagePicker({ } // Reset the error if the component is no longer focused. - setError(null, {}); + setError(null, []); }, [isFocused]); useEffect(() => { - setError(null, {}); + setError(null, []); }, [source, avatarID]); /** @@ -145,12 +145,12 @@ function AvatarWithImagePicker({ validateAvatarImage(image) .then((validationResult) => { if (!validationResult.isValid) { - setError(validationResult.errorKey ?? null, validationResult.errorParams ?? {}); + setError(validationResult.errorKey ?? null, validationResult.errorArgs ?? []); return; } setIsAvatarCropModalOpen(true); - setError(null, {}); + setError(null, []); setIsMenuVisible(false); setImageData({ uri: image.uri ?? '', @@ -159,7 +159,7 @@ function AvatarWithImagePicker({ }); }) .catch(() => { - setError('attachmentPicker.errorWhileSelectingCorruptedAttachment', {}); + setError('attachmentPicker.errorWhileSelectingCorruptedAttachment', []); }); }; @@ -193,7 +193,7 @@ function AvatarWithImagePicker({ icon: icons.Trashcan, text: translate('avatarWithImagePicker.removePhoto'), onSelected: () => { - setError(null, {}); + setError(null, []); onImageRemoved(); }, }); @@ -300,7 +300,7 @@ function AvatarWithImagePicker({ string)(errorData.validationError, ...errorData.phraseArgs)}} type="error" /> )} diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index f1158dd3b63e..f6c319e9a019 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -109,7 +109,7 @@ function HeaderWithBackButton({ const middleContent = useMemo(() => { if (progressBarPercentage) { - const progressBarLabel = stepCounter ? `${translate('common.progressBarLabel')}, ${translate('stepCounter', stepCounter)}` : undefined; + const progressBarLabel = stepCounter ? `${translate('common.progressBarLabel')}, ${translate('stepCounter', stepCounter.step, stepCounter.total, stepCounter.text)}` : undefined; return ( <> {/* Reserves as much space for the middleContent as possible */} @@ -147,7 +147,7 @@ function HeaderWithBackButton({ return (
{isCompletedStep ? ( diff --git a/src/components/InteractiveStepSubPageHeader.tsx b/src/components/InteractiveStepSubPageHeader.tsx index e46d9818d2ff..95848454a456 100644 --- a/src/components/InteractiveStepSubPageHeader.tsx +++ b/src/components/InteractiveStepSubPageHeader.tsx @@ -73,11 +73,7 @@ function InteractiveStepSubPageHeader({stepNames, currentStepIndex, currentStepA role={CONST.ROLE.GROUP} aria-current={currentStepIndex === index ? 'step' : undefined} accessibilityState={{selected: currentStepIndex === index}} - accessibilityLabel={translate('stepCounter', { - step: index + 1, - total: stepNames.length, - text: currentStepIndex === index ? currentStepAccessibilityDescription : undefined, - })} + accessibilityLabel={translate('stepCounter', index + 1, stepNames.length, currentStepIndex === index ? currentStepAccessibilityDescription : undefined)} > {isCompletedStep ? ( { if (!connectedIntegration || !moneyRequestReport) { return; diff --git a/src/components/ParentNavigationSubtitle.tsx b/src/components/ParentNavigationSubtitle.tsx index 9429cf90da4d..bdc02a25b9a9 100644 --- a/src/components/ParentNavigationSubtitle.tsx +++ b/src/components/ParentNavigationSubtitle.tsx @@ -274,7 +274,7 @@ function ParentNavigationSubtitle({ onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} onPress={onPress} - accessibilityLabel={translate('threads.parentNavigationSummary', {reportName, workspaceName})} + accessibilityLabel={translate('threads.parentNavigationSummary', reportName, workspaceName)} style={[ pressableStyles, styles.optionAlternateText, diff --git a/src/components/ReportActionItem/ExportWithDropdownMenu.tsx b/src/components/ReportActionItem/ExportWithDropdownMenu.tsx index ee677d23e63d..9cf4a992999b 100644 --- a/src/components/ReportActionItem/ExportWithDropdownMenu.tsx +++ b/src/components/ReportActionItem/ExportWithDropdownMenu.tsx @@ -70,7 +70,7 @@ function ExportWithDropdownMenu({ const options = [ { value: CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION, - text: translate('workspace.common.exportIntegrationSelected', {connectionName}), + text: translate('workspace.common.exportIntegrationSelected', connectionName), ...optionTemplate, }, { @@ -116,7 +116,7 @@ function ExportWithDropdownMenu({ if (isExported) { showConfirmModal({ title: translate('workspace.exportAgainModal.title'), - prompt: translate('workspace.exportAgainModal.description', {connectionName, reportName: report?.reportName ?? ''}), + prompt: translate('workspace.exportAgainModal.description', report?.reportName ?? '', connectionName), confirmText: translate('workspace.exportAgainModal.confirmText'), cancelText: translate('workspace.exportAgainModal.cancelText'), }).then(({action}) => { diff --git a/src/hooks/useExportActions.ts b/src/hooks/useExportActions.ts index bb6458450466..b1a9bf67aa6d 100644 --- a/src/hooks/useExportActions.ts +++ b/src/hooks/useExportActions.ts @@ -155,10 +155,7 @@ function useExportActions({reportID, policy, onPDFModalOpen}: UseExportActionsPa }, }, [CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION]: { - text: translate('workspace.common.exportIntegrationSelected', { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - connectionName: connectedIntegrationFallback!, - }), + text: translate('workspace.common.exportIntegrationSelected', connectedIntegrationFallback!), icon: getIntegrationIcon(connectedIntegration ?? connectedIntegrationFallback, expensifyIcons), displayInDefaultIconColor: true, additionalIconStyles: styles.integrationIcon, diff --git a/src/hooks/useExportAgainModal.ts b/src/hooks/useExportAgainModal.ts index 96e74c54adaa..4b78d4e17873 100644 --- a/src/hooks/useExportAgainModal.ts +++ b/src/hooks/useExportAgainModal.ts @@ -28,10 +28,7 @@ function useExportAgainModal(reportID: string | undefined, policyID: string | un showConfirmModal({ title: translate('workspace.exportAgainModal.title'), - prompt: translate('workspace.exportAgainModal.description', { - connectionName: integrationForExport, - reportName, - }), + prompt: translate('workspace.exportAgainModal.description', reportName, integrationForExport), confirmText: translate('workspace.exportAgainModal.confirmText'), cancelText: translate('workspace.exportAgainModal.cancelText'), }).then((result) => { diff --git a/src/hooks/useLifecycleActions.tsx b/src/hooks/useLifecycleActions.tsx index 7a0ea28ca8e9..5b6def5f8877 100644 --- a/src/hooks/useLifecycleActions.tsx +++ b/src/hooks/useLifecycleActions.tsx @@ -128,11 +128,7 @@ function useLifecycleActions({reportID, startApprovedAnimation, startAnimation, const integrationNameFromExportMessage = isExported ? getIntegrationNameFromExportMessageUtils(reportActions) : null; const connectedIntegration = getValidConnectedIntegration(policy); - const connectedIntegrationName = connectedIntegration - ? translate('workspace.accounting.connectionName', { - connectionName: connectedIntegration, - }) - : ''; + const connectedIntegrationName = connectedIntegration ? translate('workspace.accounting.connectionName', connectedIntegration) : ''; const isAnyTransactionOnHold = hasHeldExpensesReportUtils(transactions); diff --git a/src/hooks/useSearchBulkActions.ts b/src/hooks/useSearchBulkActions.ts index 3b24c43ea7a5..ce58799e0486 100644 --- a/src/hooks/useSearchBulkActions.ts +++ b/src/hooks/useSearchBulkActions.ts @@ -1445,10 +1445,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { if (areAnyReportsExported) { showConfirmModal({ title: translate('workspace.exportAgainModal.title'), - prompt: translate('workspace.exportAgainModal.description', { - connectionName: connectedIntegration, - reportName: exportedReportNames.join('\n'), - }), + prompt: translate('workspace.exportAgainModal.description', exportedReportNames.join('\n'), connectedIntegration), confirmText: translate('workspace.exportAgainModal.confirmText'), cancelText: translate('workspace.exportAgainModal.cancelText'), shouldEnablePromptScroll: true, diff --git a/src/languages/de.ts b/src/languages/de.ts index dce08d9c3e0b..797660394b69 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -816,8 +781,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'E-Mail in die Zwischenablage kopieren', markAsUnread: 'Als ungelesen markieren', markAsRead: 'Als gelesen markieren', - editAction: ({action}: EditActionParams) => `${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'Ausgabe' : 'Kommentar'} bearbeiten`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'Ausgabe' : 'Kommentar'} bearbeiten`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'Kommentar'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -826,7 +791,7 @@ const translations: TranslationDeepObject = { } return `${type} löschen`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'Kommentar'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -910,16 +875,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Dieser Chatraum wurde archiviert.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `Dieser Chat ist nicht mehr aktiv, weil ${displayName} ihr Konto geschlossen hat.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Dieser Chat ist nicht mehr aktiv, weil ${displayName} ihr Konto geschlossen hat.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Dieser Chat ist nicht mehr aktiv, weil ${oldDisplayName} sein Konto mit ${displayName} zusammengeführt hat.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Dieser Chat ist nicht mehr aktiv, weil du kein Mitglied des Arbeitsbereichs ${policyName} mehr bist.` : `Dieser Chat ist nicht mehr aktiv, weil ${displayName} kein Mitglied des Workspaces ${policyName} mehr ist.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Dieser Chat ist nicht mehr aktiv, weil ${policyName} kein aktiver Workspace mehr ist.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Dieser Chat ist nicht mehr aktiv, weil ${policyName} kein aktiver Workspace mehr ist.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Diese Buchung ist archiviert.', }, @@ -1400,7 +1365,7 @@ const translations: TranslationDeepObject = { `${amount} Zahlung storniert, weil ${submitterDisplayName} ihr Expensify Wallet nicht innerhalb von 30 Tagen aktiviert hat`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} hat ein Bankkonto hinzugefügt. Die Zahlung über ${amount} wurde vorgenommen.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}als bezahlt markiert${comment ? `und sagt „${comment}“` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}als bezahlt markiert${comment ? `und sagt „${comment}“` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}mit Wallet bezahlt`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}mit Expensify über Workspace-Regeln bezahlt`, @@ -1458,7 +1423,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `für ${comment}` : 'Ausgabe'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Rechnungsbericht Nr. ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} gesendet${comment ? `für ${comment}` : ''}`, - movedFromPersonalSpace: ({reportName, workspaceName}: MovedFromPersonalSpaceParams) => + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `Ausgabe von persönlichem Bereich nach ${workspaceName ?? `Chat mit ${reportName}`} verschoben`, movedToPersonalSpace: 'Ausgabe in persönlichen Bereich verschoben', error: { @@ -1782,10 +1747,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Foto ansehen', imageUploadFailed: 'Bildupload fehlgeschlagen', deleteWorkspaceError: 'Entschuldigung, beim Löschen deines Arbeitsbereichsavatars ist ein unerwartetes Problem aufgetreten', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `Das ausgewählte Bild überschreitet die maximale Uploadgröße von ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `Das ausgewählte Bild überschreitet die maximale Uploadgröße von ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Bitte laden Sie ein Bild hoch, das größer als ${minHeightInPx}x${minWidthInPx} Pixel und kleiner als ${maxHeightInPx}x${maxWidthInPx} Pixel ist.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `Das Profilbild muss einer der folgenden Typen sein: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `Das Profilbild muss einer der folgenden Typen sein: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Profilbild bearbeiten', @@ -2457,7 +2422,7 @@ const translations: TranslationDeepObject = { bankConnectionDescription: 'Bitte versuchen Sie, Ihre Karten erneut hinzuzufügen. Andernfalls können Sie', connectWithPlaid: 'eine Verbindung über Plaid herstellen.', brokenConnection: 'Ihre Kartenverbindung ist unterbrochen.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `Die Verbindung Ihrer ${cardName}-Karte ist unterbrochen. Melden Sie sich bei Ihrer Bank an, um die Karte zu reparieren.` : `Die Verbindung Ihrer ${cardName}-Karte ist unterbrochen. Melden Sie sich bei Ihrer Bank an, um die Karte zu reparieren.`, @@ -3567,7 +3532,7 @@ ${amount} für ${merchant} – ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Sie weisen ${nameOrEmail} als Ihre Urlaubsvertretung zu. Diese Person ist noch nicht in all Ihren Arbeitsbereichen. Wenn Sie fortfahren, wird eine E-Mail an alle Admins Ihrer Arbeitsbereiche gesendet, damit sie hinzugefügt wird.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Schritt ${step}`; if (total) { result = `${result} of ${total}`; @@ -4451,7 +4416,7 @@ ${amount} für ${merchant} – ${date}`, subscription: 'Abonnement', markAsEntered: 'Als manuell erfasst markieren', markAsExported: 'Als exportiert markieren', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Exportieren nach ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Exportieren nach ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Lass uns noch einmal überprüfen, ob alles richtig aussieht.', lineItemLevel: 'Positionsebene', reportLevel: 'Report-Ebene', @@ -4462,11 +4427,11 @@ ${amount} für ${merchant} – ${date}`, content: (adminsRoomLink: string) => `Teile diesen QR-Code oder kopiere den Link unten, damit Mitglieder ganz einfach Zugriff auf deinen Workspace anfordern können. Alle Anfragen zum Beitritt zum Workspace werden zur Überprüfung im Raum ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} angezeigt.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Mit ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} verbinden`, + connectTo: (connectionName: AllConnectionName) => `Mit ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} verbinden`, createNewConnection: 'Neue Verbindung erstellen', reuseExistingConnection: 'Vorhandene Verbindung wiederverwenden', existingConnections: 'Bestehende Verbindungen', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Da du zuvor bereits eine Verbindung zu ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} hergestellt hast, kannst du entweder eine bestehende Verbindung wiederverwenden oder eine neue erstellen.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} – Zuletzt synchronisiert am ${formattedDate}`, authenticationError: (connectionName: string) => `Verbindung mit ${connectionName} aufgrund eines Authentifizierungsfehlers nicht möglich.`, @@ -5469,7 +5434,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU one: '1 UDD hinzugefügt', other: (count: number) => `${count} UDDs hinzugefügt`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'Abteilungen'; @@ -6112,7 +6077,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU reportFieldNameRequiredError: 'Bitte gib einen Berichtsfeldnamen ein', reportFieldTypeRequiredError: 'Bitte wähle einen Berichtsfeldtyp aus', circularReferenceError: 'Dieses Feld kann nicht auf sich selbst verweisen. Bitte aktualisieren.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Formelfeld ${value} nicht erkannt`, + unsupportedFormulaValueError: (value: string) => `Formelfeld ${value} nicht erkannt`, reportFieldInitialValueRequiredError: 'Bitte wähle einen Anfangswert für ein Berichtsfeld aus', genericFailureMessage: 'Beim Aktualisieren des Berichtfelds ist ein Fehler aufgetreten. Bitte versuche es erneut.', }, @@ -6459,7 +6424,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU talkYourAccountManager: 'Chatte mit deiner/deinem Account Manager/in.', talkToConcierge: 'Chatte mit Concierge.', needAnotherAccounting: 'Benötigen Sie eine weitere Buchhaltungssoftware?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6487,13 +6452,13 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU syncNow: 'Jetzt synchronisieren', disconnect: 'Trennen', reinstall: 'Connector neu installieren', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'Integration'; return `${integrationName} trennen`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'Buchhaltungsintegration'} verbinden`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'Buchhaltungsintegration'} verbinden`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Verbindung zu QuickBooks Online nicht möglich'; @@ -6522,12 +6487,12 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Als Berichtsfelder importiert', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Standardmäßige NetSuite-Mitarbeiterperson', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'diese Integration'; return `Möchtest du ${integrationName} wirklich trennen?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Sind Sie sicher, dass Sie ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'diese Buchhaltungsintegration'} verbinden möchten? Dadurch werden alle bestehenden Buchhaltungsverbindungen entfernt.`, enterCredentials: 'Gib deine Anmeldedaten ein', reconnect: 'Erneut verbinden', @@ -6547,7 +6512,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6924,10 +6889,7 @@ Wenn du die Abrechnung für das gesamte Abonnement übernehmen willst, bitte sie }, exportAgainModal: { title: 'Vorsicht!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `Die folgenden Berichte wurden bereits nach ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} exportiert. Möchten Sie sie wirklich erneut exportieren? + description: (reportName: string, connectionName: ConnectionName) => `Die folgenden Berichte wurden bereits nach ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} exportiert. Möchten Sie sie wirklich erneut exportieren? ${reportName}`, confirmText: 'Ja, erneut exportieren', @@ -7617,7 +7579,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc }, description: 'Wählen Sie das passende Abo für Sie.', subscriptionLink: 'Mehr erfahren', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Sie haben sich bis zum Ende Ihres Jahresabonnements am ${annualSubscriptionEndDate} zu 1 aktivem Mitglied im Control-Tarif verpflichtet. Sie können ab dem ${annualSubscriptionEndDate} zu einem nutzungsbasierten Abonnement wechseln und in den Collect-Tarif herabstufen, indem Sie die automatische Verlängerung in`, other: `Sie haben sich bis zum Ende Ihres Jahresabonnements am ${annualSubscriptionEndDate} zu ${count} aktiven Mitgliedern im Control-Tarif verpflichtet. Ab dem ${annualSubscriptionEndDate} können Sie durch Deaktivieren der automatischen Verlängerung in ein nutzungsabhängiges Abonnement wechseln und auf den Collect-Tarif herabstufen in`, }), @@ -7657,7 +7619,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc }, custom: {label: 'Benutzerdefinierte Genehmigung', description: 'Ich richte Genehmigungs-Workflows in Expensify manuell ein.'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Gusto-Mitarbeitende werden synchronisiert'; @@ -7928,7 +7890,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc !oldDescription ? `setze die Beschreibung dieses Arbeitsbereichs auf „${newDescription}“` : `hat die Beschreibung dieses Arbeitsbereichs auf „${newDescription}“ aktualisiert (zuvor „${oldDescription}“)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7946,7 +7908,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc `hat Ihre Rolle in ${policyName} von ${oldRole} zu Nutzer geändert. Sie wurden aus allen Einreicher-Spesen-Chats entfernt, außer aus Ihrem eigenen.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `Standardwährung auf ${newCurrency} aktualisiert (zuvor ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `die automatische Berichtshäufigkeit auf „${newFrequency}“ aktualisiert (zuvor „${oldFrequency}“)`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `hat den Genehmigungsmodus auf „${newValue}“ aktualisiert (zuvor „${oldValue}“)`, + updateApprovalMode: (newValue: string, oldValue?: string) => `hat den Genehmigungsmodus auf „${newValue}“ aktualisiert (zuvor „${oldValue}“)`, upgradedWorkspace: 'hat diesen Workspace auf den Control-Tarif hochgestuft', forcedCorporateUpgrade: `Dieser Workspace wurde auf den Control-Tarif hochgestuft. Klicken Sie hier für weitere Informationen.`, downgradedWorkspace: 'hat diesen Workspace auf den Collect-Tarif heruntergestuft', @@ -8694,8 +8656,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc connectionSettings: 'Verbindungseinstellungen', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `${fieldName} auf „${newValue}“ geändert (zuvor „${oldValue}“)`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `setze ${fieldName} auf „${newValue}“`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `${fieldName} auf „${newValue}“ geändert (zuvor „${oldValue}“)`, + changeFieldEmpty: (newValue: string, fieldName: string) => `setze ${fieldName} auf „${newValue}“`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `hat den Arbeitsbereich${fromPolicyName ? `(zuvor ${fromPolicyName})` : ''} geändert`; @@ -8727,7 +8689,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc managerAttachReceipt: `Beleg hinzugefügt`, managerDetachReceipt: `hat eine Quittung entfernt`, markedReimbursed: (amount: string, currency: string) => `hat ${currency}${amount} anderweitig bezahlt`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `${currency}${amount} über Integration bezahlt`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `${currency}${amount} über Integration bezahlt`, outdatedBankAccount: `Konnte die Zahlung aufgrund eines Problems mit dem Bankkonto des Zahlenden nicht verarbeiten`, reimbursementACHBounceDefault: `Zahlung konnte wegen einer falschen Bankleitzahl/Kontonummer oder eines geschlossenen Kontos nicht verarbeitet werden`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `Die Zahlung konnte nicht verarbeitet werden: ${returnReason}`, @@ -8736,8 +8698,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc reimbursementDelayed: `hat die Zahlung verarbeitet, aber sie verzögert sich um weitere 1–2 Werktage`, selectedForRandomAudit: `zufällig zur Überprüfung ausgewählt`, selectedForRandomAuditMarkdown: `zufällig zur Überprüfung [ausgewählt](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule)`, - share: ({to}: ShareParams) => `Mitglied ${to} eingeladen`, - unshare: ({to}: UnshareParams) => `Mitglied ${to} entfernt`, + share: (to: string) => `Mitglied ${to} eingeladen`, + unshare: (to: string) => `Mitglied ${to} entfernt`, stripePaid: (amount: string, currency: string) => `bezahlt: ${currency}${amount}`, takeControl: `Kontrolle übernommen`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8752,7 +8714,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc const article = role === CONST.POLICY.ROLE.AUDITOR ? 'an' : 'a'; return didJoinPolicy ? `${email} ist über den Arbeitsbereichs-Einladungslink beigetreten` : `${email} wurde als ${article} ${translatedRole} hinzugefügt`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `hat die Rolle von ${email} in ${newRole} geändert (zuvor ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `hat die Rolle von ${email} in ${newRole} geändert (zuvor ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `Benutzerdefiniertes Feld 1 von ${email} entfernt (zuvor „${previousValue}“)`; @@ -8771,8 +8733,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} hat den Arbeitsbereich verlassen`, removeMember: (email: string, role: string) => `${role} ${email} entfernt`, - removedConnection: ({connectionName}: ConnectionNameParams) => `Verbindung zu ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} entfernt`, - addedConnection: ({connectionName}: ConnectionNameParams) => `verbunden mit ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `Verbindung zu ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} entfernt`, + addedConnection: (connectionName: AllConnectionName) => `verbunden mit ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'hat den Chat verlassen', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `Das Geschäftskonto ${maskedBankAccountNumber} wurde aufgrund eines Problems mit entweder der Erstattung oder dem Ausgleich der Expensify Karte automatisch gesperrt. Bitte beheben Sie das Problem in Ihren Workspace-Einstellungen.`, @@ -8882,7 +8844,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc reply: 'Antwort', from: 'Von', in: 'in', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `Von ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `Von ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'QR-Code', @@ -9138,7 +9100,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc missingComment: 'Beschreibung für die ausgewählte Kategorie erforderlich', missingAttendees: 'Für diese Kategorie sind mehrere Teilnehmende erforderlich', missingTag: (tagName?: string) => `Fehlend ${tagName ?? 'Tag'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Betrag weicht von der berechneten Entfernung ab'; @@ -9152,7 +9114,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc } }, modifiedDate: 'Datum weicht vom gescannten Beleg ab', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `Die Entfernung übersteigt die berechnete Route von ${formattedRouteDistance}` : 'Entfernung übersteigt die berechnete Route', nonExpensiworksExpense: 'Nicht-Expensiworks-Ausgabe', overAutoApprovalLimit: (formattedLimit: string) => `Ausgabe überschreitet das Auto-Genehmigungslimit von ${formattedLimit}`, @@ -9459,8 +9421,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc collect: { title: 'Einziehen', description: 'Der Kleinunternehmens-Tarif, der dir Spesen, Reisen und Chat bietet.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, + priceAnnual: (lower: string, upper: string) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, + pricePayPerUse: (lower: string, upper: string) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, benefit1: 'Belegerfassung', benefit2: 'Erstattungen', benefit3: 'Firmenkartenverwaltung', @@ -9473,8 +9435,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc control: { title: 'Steuerung', description: 'Spesen, Reisen und Chat für größere Unternehmen.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, + priceAnnual: (lower: string, upper: string) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, + pricePayPerUse: (lower: string, upper: string) => `Von ${lower}/aktivem Mitglied mit der Expensify Karte, ${upper}/aktivem Mitglied ohne die Expensify Karte.`, benefit1: 'Alles im Collect-Tarif', benefit2: 'Genehmigungs-Workflows mit mehreren Ebenen', benefit3: 'Benutzerdefinierte Ausgabenregeln', @@ -9611,7 +9573,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc addCopilot: 'Copilot hinzufügen', membersCanAccessYourAccount: 'Diese Mitglieder haben Zugriff auf Ihr Konto:', youCanAccessTheseAccounts: 'Du kannst auf diese Konten zugreifen:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Voll'; @@ -9626,7 +9588,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc accessLevel: 'Zugriffsberechtigung', confirmCopilot: 'Bestätige unten deine Assistenz.', accessLevelDescription: 'Wähle unten eine Zugriffsstufe. Sowohl Vollzugriff als auch Eingeschränkter Zugriff ermöglichen es Copilots, alle Unterhaltungen und Ausgaben zu sehen.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Einem anderen Mitglied erlauben, in deinem Konto alle Aktionen in deinem Namen durchzuführen. Umfasst Chat, Einreichungen, Genehmigungen, Zahlungen, Einstellungsaktualisierungen und mehr.'; @@ -9651,7 +9613,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc `Als Copilot von ${accountOwnerEmail} hast du keine Berechtigung, diese Aktion auszuführen. Entschuldigung!`, removeCopilotAccess: 'Meinen Copilot-Zugriff entfernen', removeCopilotAccessTitle: 'Copilot-Zugriff entfernen?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Sind Sie sicher, dass Sie Ihren Copilot-Zugriff auf das Expensify-Konto von ${delegatorName} entfernen möchten? Diese Aktion kann nicht rückgängig gemacht werden.`, removeCopilotAccessConfirm: 'Zugriff entfernen', copilotAccess: 'Copilot-Zugriff', @@ -9665,9 +9627,9 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc nothingToPreview: 'Nichts zur Vorschau', editJson: 'JSON bearbeiten:', preview: 'Vorschau:', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} fehlt`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Ungültige Eigenschaft: ${propertyName} – Erwartet: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Ungültiger Wert – erwartet: ${expectedValues}`, + missingProperty: (propertyName: string) => `${propertyName} fehlt`, + invalidProperty: (propertyName: string, expectedType: string) => `Ungültige Eigenschaft: ${propertyName} – Erwartet: ${expectedType}`, + invalidValue: (expectedValues: string) => `Ungültiger Wert – erwartet: ${expectedValues}`, missingValue: 'Fehlender Wert', createReportAction: 'Berichtaktion erstellen', reportAction: 'Reportaktion', diff --git a/src/languages/en.ts b/src/languages/en.ts index 65404fa79e30..66432e69465e 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6,47 +6,12 @@ import StringUtils from '@libs/StringUtils'; import dedent from '@libs/StringUtils/dedent'; import CONST from '@src/CONST'; import type {Country} from '@src/CONST'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -851,8 +816,8 @@ const translations = { copyEmailToClipboard: 'Copy email to clipboard', markAsUnread: 'Mark as unread', markAsRead: 'Mark as read', - editAction: ({action}: EditActionParams) => `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'comment'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -861,7 +826,7 @@ const translations = { } return `Delete ${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'comment'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -944,17 +909,15 @@ const translations = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'This chat room has been archived.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `This chat is no longer active because ${displayName} closed their account.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `This chat is no longer active because ${displayName} closed their account.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `This chat is no longer active because ${oldDisplayName} has merged their account with ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `This chat is no longer active because you are no longer a member of the ${policyName} workspace.` : `This chat is no longer active because ${displayName} is no longer a member of the ${policyName} workspace.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => - `This chat is no longer active because ${policyName} is no longer an active workspace.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => - `This chat is no longer active because ${policyName} is no longer an active workspace.`, + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `This chat is no longer active because ${policyName} is no longer an active workspace.`, + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `This chat is no longer active because ${policyName} is no longer an active workspace.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'This booking is archived.', }, writeCapabilityPage: { @@ -1464,7 +1427,7 @@ const translations = { canceledRequest: (amount: string, submitterDisplayName: string) => `canceled the ${amount} payment, because ${submitterDisplayName} did not enable their Expensify Wallet within 30 days`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} added a bank account. The ${amount} payment has been made.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}marked as paid${comment ? `, saying "${comment}"` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}marked as paid${comment ? `, saying "${comment}"` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}paid with wallet`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}paid with Expensify via workspace rules`, @@ -1521,7 +1484,7 @@ const translations = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `for ${comment}` : 'expense'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Invoice Report #${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} sent${comment ? ` for ${comment}` : ''}`, - movedFromPersonalSpace: ({reportName, workspaceName}: MovedFromPersonalSpaceParams) => `moved expense from personal space to ${workspaceName ?? `chat with ${reportName}`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `moved expense from personal space to ${workspaceName ?? `chat with ${reportName}`}`, movedToPersonalSpace: 'moved expense to personal space', error: { invalidCategoryLength: 'The category name exceeds 255 characters. Please shorten it or choose a different category.', @@ -1837,10 +1800,10 @@ const translations = { viewPhoto: 'View photo', imageUploadFailed: 'Image upload failed', deleteWorkspaceError: 'Sorry, there was an unexpected problem deleting your workspace avatar', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `The selected image exceeds the maximum upload size of ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `The selected image exceeds the maximum upload size of ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Please upload an image larger than ${minHeightInPx}x${minWidthInPx} pixels and smaller than ${maxHeightInPx}x${maxWidthInPx} pixels.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `Profile picture must be one of the following types: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `Profile picture must be one of the following types: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Edit profile picture', @@ -2541,7 +2504,7 @@ const translations = { connectWithPlaid: 'connect via Plaid.', brokenConnection: 'Your card connection is broken.', fixCard: 'Fix card', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `Your ${cardName} card connection is broken. Log into your bank to fix the card.` : `Your ${cardName} card connection is broken. Log into your bank to fix the card.`, @@ -3660,7 +3623,7 @@ const translations = { vacationDelegateWarning: (nameOrEmail: string) => `You're assigning ${nameOrEmail} as your vacation delegate. They're not on all your workspaces yet. If you choose to continue, an email will be sent to all your workspace admins to add them.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Step ${step}`; if (total) { @@ -4545,7 +4508,7 @@ const translations = { subscription: 'Subscription', markAsEntered: 'Mark as manually entered', markAsExported: 'Mark as exported', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Export to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Export to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: "Let's double check that everything looks right.", lineItemLevel: 'Line-item level', reportLevel: 'Report level', @@ -4556,11 +4519,11 @@ const translations = { content: (adminsRoomLink: string) => `Share this QR code or copy the link below to make it easy for members to request access to your workspace. All requests to join the workspace will show up in the ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} room for your review.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Connect to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Connect to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Create new connection', reuseExistingConnection: 'Reuse existing connection', existingConnections: 'Existing connections', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Since you've connected to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} before, you can choose to reuse an existing connection or create a new one.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Last synced ${formattedDate}`, authenticationError: (connectionName: string) => `Can’t connect to ${connectionName} due to an authentication error.`, @@ -5527,7 +5490,7 @@ const translations = { one: '1 UDD added', other: (count: number) => `${count} UDDs added`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'departments'; @@ -6163,7 +6126,7 @@ const translations = { reportFieldNameRequiredError: 'Please enter a report field name', reportFieldTypeRequiredError: 'Please choose a report field type', circularReferenceError: "This field can't refer to itself. Please update.", - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Formula field ${value} not recognized`, + unsupportedFormulaValueError: (value: string) => `Formula field ${value} not recognized`, reportFieldInitialValueRequiredError: 'Please choose a report field initial value', genericFailureMessage: 'An error occurred while updating the report field. Please try again.', }, @@ -6519,7 +6482,7 @@ const translations = { talkYourAccountManager: 'Chat with your account manager.', talkToConcierge: 'Chat with Concierge.', needAnotherAccounting: 'Need another accounting software? ', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6547,14 +6510,14 @@ const translations = { syncNow: 'Sync now', disconnect: 'Disconnect', reinstall: 'Reinstall connector', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integration'; return `Disconnect ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Connect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'accounting integration'}`, + connectTitle: (connectionName: AllConnectionName) => `Connect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'accounting integration'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return "Can't connect to QuickBooks Online"; @@ -6583,12 +6546,12 @@ const translations = { [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported as report fields', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'NetSuite employee default', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'this integration'; return `Are you sure you want to disconnect ${integrationName}?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Are you sure you want to connect ${ CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'this accounting integration' }? This will remove any existing accounting connections.`, @@ -6610,7 +6573,7 @@ const translations = { }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6830,7 +6793,7 @@ const translations = { }, custom: {label: 'Custom approval', description: "I'll manually setup approval workflows in Expensify."}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Synchronizing Gusto Employees'; @@ -7065,7 +7028,7 @@ const translations = { }, exportAgainModal: { title: 'Careful!', - description: ({reportName, connectionName}: ExportAgainModalDescriptionParams) => + description: (reportName: string, connectionName: ConnectionName) => `The following reports have already been exported to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Are you sure you want to export them again?\n\n${reportName}`, confirmText: 'Yes, export again', cancelText: 'Cancel', @@ -7745,7 +7708,7 @@ const translations = { }, description: "Choose a plan that's right for you.", subscriptionLink: 'Learn more', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `You've committed to 1 active member on the Control plan until your annual subscription ends on ${annualSubscriptionEndDate}. You can switch to pay-per-use subscription and downgrade to the Collect plan starting ${annualSubscriptionEndDate} by disabling auto-renew in`, other: `You've committed to ${count} active members on the Control plan until your annual subscription ends on ${annualSubscriptionEndDate}. You can switch to pay-per-use subscription and downgrade to the Collect plan starting ${annualSubscriptionEndDate} by disabling auto-renew in`, }), @@ -8069,7 +8032,7 @@ const translations = { !oldDescription ? `set the description of this workspace to "${newDescription}"` : `updated the description of this workspace to "${newDescription}" (previously "${oldDescription}")`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8087,7 +8050,7 @@ const translations = { `updated your role in ${policyName} from ${oldRole} to user. You have been removed from all submitter expense chats except for you own.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `updated the default currency to ${newCurrency} (previously ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `updated the auto-reporting frequency to "${newFrequency}" (previously "${oldFrequency}")`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `updated the approval mode to "${newValue}" (previously "${oldValue}")`, + updateApprovalMode: (newValue: string, oldValue?: string) => `updated the approval mode to "${newValue}" (previously "${oldValue}")`, upgradedWorkspace: 'upgraded this workspace to the Control plan', forcedCorporateUpgrade: `This workspace has been upgraded to the Control plan. Click here for more information.`, downgradedWorkspace: 'downgraded this workspace to the Collect plan', @@ -8760,8 +8723,8 @@ const translations = { connectionSettings: 'Connection Settings', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} to "${newValue}" (previously "${oldValue}")`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `set ${fieldName} to "${newValue}"`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `changed ${fieldName} to "${newValue}" (previously "${oldValue}")`, + changeFieldEmpty: (newValue: string, fieldName: string) => `set ${fieldName} to "${newValue}"`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `changed the workspace${fromPolicyName ? ` (previously ${fromPolicyName})` : ''}`; @@ -8793,7 +8756,7 @@ const translations = { managerAttachReceipt: `added a receipt`, managerDetachReceipt: `removed a receipt`, markedReimbursed: (amount: string, currency: string) => `paid ${currency}${amount} elsewhere`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `paid ${currency}${amount} via integration`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `paid ${currency}${amount} via integration`, outdatedBankAccount: `couldn’t process the payment due to a problem with the payer’s bank account`, reimbursementACHBounceDefault: `couldn't process the payment due to an incorrect routing/account number or closed account`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `couldn't process the payment: ${returnReason}`, @@ -8802,8 +8765,8 @@ const translations = { reimbursementDelayed: `processed the payment but it’s delayed by 1-2 more business days`, selectedForRandomAudit: `randomly selected for review`, selectedForRandomAuditMarkdown: `[randomly selected](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) for review`, - share: ({to}: ShareParams) => `invited member ${to}`, - unshare: ({to}: UnshareParams) => `removed member ${to}`, + share: (to: string) => `invited member ${to}`, + unshare: (to: string) => `removed member ${to}`, stripePaid: (amount: string, currency: string) => `paid ${currency}${amount}`, takeControl: `took control`, actionableCard3DSTransactionApproval: (amount: string, merchant: string | undefined) => { @@ -8822,7 +8785,7 @@ const translations = { const article = role === CONST.POLICY.ROLE.AUDITOR ? 'an' : 'a'; return didJoinPolicy ? `${email} joined via the workspace invite link` : `added ${email} as ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `updated the role of ${email} to ${newRole} (previously ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `updated the role of ${email} to ${newRole} (previously ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `removed ${email}'s custom field 1 (previously "${previousValue}")`; @@ -8839,8 +8802,8 @@ const translations = { }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} left the workspace`, removeMember: (email: string, role: string) => `removed ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `removed connection to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}: ConnectionNameParams) => `connected to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `removed connection to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName: AllConnectionName) => `connected to ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'left the chat', leftTheChatWithName: (nameOrEmail: string) => `${nameOrEmail ? `${nameOrEmail}: ` : ''}left the chat`, settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => @@ -8946,7 +8909,7 @@ const translations = { reply: 'Reply', from: 'From', in: 'in', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `From ${reportName}${workspaceName ? ` in ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `From ${reportName}${workspaceName ? ` in ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'QR code', @@ -9207,7 +9170,7 @@ const translations = { missingComment: 'Description required for selected category', missingAttendees: 'Multiple attendees required for this category', missingTag: (tagName?: string) => `Missing ${tagName ?? 'tag'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Amount differs from calculated distance'; @@ -9221,7 +9184,7 @@ const translations = { } }, modifiedDate: 'Date differs from scanned receipt', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `Distance exceeds the calculated route of ${formattedRouteDistance}` : 'Distance exceeds the calculated route', nonExpensiworksExpense: 'Non-Expensiworks expense', overAutoApprovalLimit: (formattedLimit: string) => `Expense exceeds auto-approval limit of ${formattedLimit}`, @@ -9532,8 +9495,8 @@ const translations = { collect: { title: 'Collect', description: 'The small business plan that gives you expense, travel, and chat.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, + priceAnnual: (lower: string, upper: string) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, + pricePayPerUse: (lower: string, upper: string) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, benefit1: 'Receipt scanning', benefit2: 'Reimbursements', benefit3: 'Corporate card management', @@ -9546,8 +9509,8 @@ const translations = { control: { title: 'Control', description: 'Expense, travel, and chat for larger businesses.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, + priceAnnual: (lower: string, upper: string) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, + pricePayPerUse: (lower: string, upper: string) => `From ${lower}/active member with the Expensify Card, ${upper}/active member without the Expensify Card.`, benefit1: 'Everything in the Collect plan', benefit2: 'Multi-level approval workflows', benefit3: 'Custom expense rules', @@ -9684,7 +9647,7 @@ const translations = { addCopilot: 'Add a copilot', membersCanAccessYourAccount: 'These members can access your account:', youCanAccessTheseAccounts: 'You can access these accounts:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Full'; @@ -9699,7 +9662,7 @@ const translations = { accessLevel: 'Access level', confirmCopilot: 'Confirm your copilot below.', accessLevelDescription: 'Choose an access level below. Both Full and Limited access allow copilots to view all conversations and expenses.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Allow another member to take all actions in your account, on your behalf. Includes chat, submissions, approvals, payments, settings updates, and more.'; @@ -9713,7 +9676,7 @@ const translations = { removeCopilotConfirmation: 'Are you sure you want to remove this copilot?', removeCopilotAccess: 'Remove my copilot access', removeCopilotAccessTitle: 'Remove copilot access?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Are you sure you want to remove your copilot access to ${delegatorName}'s Expensify account? This action cannot be undone.`, removeCopilotAccessConfirm: 'Remove access', changeAccessLevel: 'Change access level', @@ -9738,9 +9701,9 @@ const translations = { nothingToPreview: 'Nothing to preview', editJson: 'Edit JSON:', preview: 'Preview:', - missingProperty: ({propertyName}: MissingPropertyParams) => `Missing ${propertyName}`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Invalid property: ${propertyName} - Expected: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Invalid value - Expected: ${expectedValues}`, + missingProperty: (propertyName: string) => `Missing ${propertyName}`, + invalidProperty: (propertyName: string, expectedType: string) => `Invalid property: ${propertyName} - Expected: ${expectedType}`, + invalidValue: (expectedValues: string) => `Invalid value - Expected: ${expectedValues}`, missingValue: 'Missing value', createReportAction: 'Create Report Action', reportAction: 'Report Action', diff --git a/src/languages/es.ts b/src/languages/es.ts index 6c2048090ede..ebe33532a49f 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -14,7 +14,6 @@ import dedent from '@libs/StringUtils/dedent'; import CONST from '@src/CONST'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type {ConciergeBrokenCardConnectionParams, PaidElsewhereParams, RemoveCopilotAccessConfirmationParams, UnsupportedFormulaValueErrorParams} from './params'; import type {TranslationDeepObject} from './types'; const translations: TranslationDeepObject = { @@ -762,8 +761,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'Copiar correo electrónico al portapapeles', markAsUnread: 'Marcar como no leído', markAsRead: 'Marcar como leído', - editAction: ({action}) => `Editar ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'gasto' : 'comentario'}`, - deleteAction: ({action}) => { + editAction: (action) => `Editar ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'gasto' : 'comentario'}`, + deleteAction: (action) => { let type = 'comentario'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'gasto'; @@ -772,7 +771,7 @@ const translations: TranslationDeepObject = { } return `Eliminar ${type}`; }, - deleteConfirmation: ({action}) => { + deleteConfirmation: (action) => { let type = 'comentario'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'gasto'; @@ -857,14 +856,14 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Esta sala de chat ha sido eliminada.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}) => `Este chat está desactivado porque ${displayName} ha cerrado tu cuenta.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}) => `Este chat está desactivado porque ${oldDisplayName} ha combinado tu cuenta con ${displayName}`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName) => `Este chat está desactivado porque ${displayName} ha cerrado tu cuenta.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName, oldDisplayName) => `Este chat está desactivado porque ${oldDisplayName} ha combinado tu cuenta con ${displayName}`, + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName, policyName, shouldUseYou = false) => shouldUseYou ? `Este chat ya no está activo porque tu 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) => `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.BOOKING_END_DATE_HAS_PASSED]: 'Esta reserva está archivada.', }, writeCapabilityPage: { @@ -1365,7 +1364,7 @@ const translations: TranslationDeepObject = { adminCanceledRequest: 'canceló el pago', canceledRequest: (amount, submitterDisplayName) => `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu Billetera Expensify en un plazo de 30 días.`, settledAfterAddedBankAccount: (submitterDisplayName, amount) => `${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}marcó como pagado${comment ? `, diciendo "${comment}"` : ''}`, + paidElsewhere: (payer, comment) => `${payer ? `${payer} ` : ''}marcó como pagado${comment ? `, diciendo "${comment}"` : ''}`, paidWithExpensify: (payer) => `${payer ? `${payer} ` : ''}pagó con la billetera`, automaticallyPaidWithExpensify: (payer) => `${payer ? `${payer} ` : ''}pagó con Expensify via reglas del espacio de trabajo`, @@ -1425,7 +1424,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount, comment) => `${comment ? `${formattedAmount} para ${comment}` : `Gasto de ${formattedAmount}`}`, invoiceReportName: ({linkedReportID}) => `Informe de facturación #${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount, comment) => `${formattedAmount} enviado${comment ? ` para ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}) => `movió el gasto desde su espacio personal a ${workspaceName ?? `un chat con ${reportName}`}`, + movedFromPersonalSpace: (reportName, workspaceName) => `movió el gasto desde su espacio personal a ${workspaceName ?? `un chat con ${reportName}`}`, movedToPersonalSpace: 'movió el gasto a su espacio personal', error: { invalidCategoryLength: 'La longitud de la categoría escogida excede el máximo permitido (255). Por favor, escoge otra categoría o acorta la categoría primero.', @@ -1736,10 +1735,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Ver foto', imageUploadFailed: 'Error al cargar la imagen', deleteWorkspaceError: 'Lo sentimos, hubo un problema eliminando el avatar de tu espacio de trabajo', - sizeExceeded: ({maxUploadSizeInMB}) => `La imagen supera el tamaño máximo de ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}) => + sizeExceeded: (maxUploadSizeInMB) => `La imagen supera el tamaño máximo de ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx) => `Por favor, elige una imagen más grande que ${minHeightInPx}x${minWidthInPx} píxeles y más pequeña que ${maxHeightInPx}x${maxWidthInPx} píxeles.`, - notAllowedExtension: ({allowedExtensions}) => `La foto de perfil debe ser de uno de los siguientes tipos: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions) => `La foto de perfil debe ser de uno de los siguientes tipos: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Editar foto de perfil', @@ -2341,7 +2340,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'conectar a través de Plaid.', brokenConnection: 'Hay un problema con la conexión de tu tarjeta.', fixCard: 'Arreglar conexión de la tarjeta', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName, connectionLink) => connectionLink ? `La conexión de tu tarjeta ${cardName} se ha interrumpido. Inicia sesión en tu banco para arreglarla.` : `La conexión de tu tarjeta ${cardName} se ha interrumpido. Inicia sesión en tu banco para arreglarla.`, @@ -3446,7 +3445,7 @@ ${amount} para ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail) => `Está asignando a ${nameOrEmail} como su delegado de vacaciones. Aún no está en todos sus espacios de trabajo. Si decide continuar, se enviará un correo electrónico a todos los administradores de sus espacios de trabajo para agregarlo.`, }, - stepCounter: ({step, total, text}) => { + stepCounter: (step, total, text) => { let result = `Paso ${step}`; if (total) { result = `${result} de ${total}`; @@ -4328,7 +4327,7 @@ ${amount} para ${merchant} - ${date}`, subscription: 'Suscripción', markAsEntered: 'Marcar como introducido manualmente', markAsExported: 'Marcar como exportado', - exportIntegrationSelected: ({connectionName}) => `Exportar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName) => `Exportar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Verifiquemos que todo esté correcto', reportField: 'Campo del informe', lineItemLevel: 'Nivel de partida', @@ -4339,11 +4338,11 @@ ${amount} para ${merchant} - ${date}`, content: (adminsRoomLink) => `Comparte este código QR o copia el enlace de abajo para facilitar que los miembros soliciten acceso a tu espacio de trabajo. Todas las solicitudes para unirse al espacio de trabajo aparecerán en la sala ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} para tu revisión.`, }, - connectTo: ({connectionName}) => `Conéctate a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName) => `Conéctate a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Crear una nueva conexión', reuseExistingConnection: 'Reutilizar la conexión existente', existingConnections: 'Conexiones existentes', - existingConnectionsDescription: ({connectionName}) => + existingConnectionsDescription: (connectionName) => `Como ya te has conectado a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} antes, puedes optar por reutilizar una conexión existente o crear una nueva.`, lastSyncDate: (connectionName, formattedDate) => `${connectionName} - Última sincronización ${formattedDate}`, topLevel: 'Nivel superior', @@ -5310,7 +5309,7 @@ ${amount} para ${merchant} - ${date}`, one: '1 UDD añadido', other: (count: number) => `${count} UDDs añadido`, }), - mappingTitle: ({mappingName}) => { + mappingTitle: (mappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'departamentos'; @@ -5944,7 +5943,7 @@ ${amount} para ${merchant} - ${date}`, reportFieldNameRequiredError: 'Ingresa un nombre de campo de informe', reportFieldTypeRequiredError: 'Elige un tipo de campo de informe', circularReferenceError: 'Este campo no puede hacer referencia a sí mismo. Por favor, actualizar.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `El campo de fórmula ${value} no se reconoce`, + unsupportedFormulaValueError: (value) => `El campo de fórmula ${value} no se reconoce`, reportFieldInitialValueRequiredError: 'Elige un valor inicial de campo de informe', genericFailureMessage: 'Se ha producido un error al actualizar el campo de informe. Por favor, inténtalo de nuevo.', }, @@ -6231,7 +6230,7 @@ ${amount} para ${merchant} - ${date}`, talkYourAccountManager: 'Chatea con tu gestor de cuenta.', talkToConcierge: 'Chatear con Concierge.', needAnotherAccounting: '¿Necesitas otro software de contabilidad? ', - connectionName: ({connectionName}) => { + connectionName: (connectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6259,13 +6258,13 @@ ${amount} para ${merchant} - ${date}`, syncNow: 'Sincronizar ahora', disconnect: 'Desconectar', reinstall: 'Reinstalar el conector', - disconnectTitle: ({connectionName} = {}) => { + disconnectTitle: (connectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integración'; return `Desconectar ${integrationName}`; }, - connectTitle: ({connectionName}) => `Conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'accounting integration'}`, - syncError: ({connectionName}) => { + connectTitle: (connectionName) => `Conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'accounting integration'}`, + syncError: (connectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'No se puede conectar a QuickBooks Online'; @@ -6294,12 +6293,12 @@ ${amount} para ${merchant} - ${date}`, [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado como campos de informe', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Predeterminado del empleado NetSuite', }, - disconnectPrompt: ({connectionName} = {}) => { + disconnectPrompt: (connectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integración'; return `¿Estás seguro de que quieres desconectar ${integrationName}?`; }, - connectPrompt: ({connectionName}) => + connectPrompt: (connectionName) => `¿Estás seguro de que quieres conectar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'esta integración contable'}? Esto eliminará cualquier conexión contable existente.`, enterCredentials: 'Ingresa tus credenciales', reconnect: 'Reconectar', @@ -6320,7 +6319,7 @@ ${amount} para ${merchant} - ${date}`, }, }, connections: { - syncStageName: ({stage}) => { + syncStageName: (stage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6599,7 +6598,7 @@ ${amount} para ${merchant} - ${date}`, }, custom: {label: 'Aprobación personalizada', description: 'Configuraré manualmente los flujos de aprobación en Expensify.'}, }, - syncStageName: ({stage}) => { + syncStageName: (stage) => { switch (stage) { case 'gustoSyncTitle': return 'Sincronizar empleados de Gusto'; @@ -6831,7 +6830,7 @@ ${amount} para ${merchant} - ${date}`, }, exportAgainModal: { title: '¡Cuidado!', - description: ({reportName, connectionName}) => + description: (reportName, connectionName) => `Los siguientes informes ya se han exportado a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. ¿Estás seguro de que deseas exportarlos de nuevo?\n\n${reportName}`, confirmText: 'Sí, exportar de nuevo', cancelText: 'Cancelar', @@ -6853,7 +6852,7 @@ ${amount} para ${merchant} - ${date}`, }, description: 'Elige el plan adecuado para ti.', subscriptionLink: 'Más información', - lockedPlanDescription: ({count, annualSubscriptionEndDate}) => ({ + lockedPlanDescription: (count, annualSubscriptionEndDate) => ({ one: `Tienes un compromiso anual de 1 miembro activo en el plan Controlar hasta el ${annualSubscriptionEndDate}. Puedes cambiar a una suscripción de pago por uso y desmejorar al plan Recopilar a partir del ${annualSubscriptionEndDate} desactivando la renovación automática en`, other: `Tienes un compromiso anual de ${count} miembros activos en el plan Controlar hasta el ${annualSubscriptionEndDate}. Puedes cambiar a una suscripción de pago por uso y desmejorar al plan Recopilar a partir del ${annualSubscriptionEndDate} desactivando la renovación automática en`, }), @@ -7796,7 +7795,7 @@ ${amount} para ${merchant} - ${date}`, ? `estableció la descripción de este espacio de trabajo como "${newDescription}"` : `actualizó la descripción de este espacio de trabajo a "${newDescription}" (previamente "${oldDescription}")`, renamedWorkspaceNameAction: (oldName, newName) => `actualizó el nombre de este espacio de trabajo a "${newName}" (previamente "${oldName}")`, - removedFromApprovalWorkflow: ({submittersNames}) => { + removedFromApprovalWorkflow: (submittersNames) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7813,7 +7812,7 @@ ${amount} para ${merchant} - ${date}`, demotedFromWorkspace: (policyName, oldRole) => `cambió tu rol en ${policyName} de ${oldRole} a miembro. Te eliminamos de todos los chats de gastos, excepto el suyo.`, updatedWorkspaceCurrencyAction: (oldCurrency, newCurrency) => `actualizó la moneda predeterminada a ${newCurrency} (previamente ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency, newFrequency) => `actualizó la frecuencia de generación automática de informes a "${newFrequency}" (previamente "${oldFrequency}")`, - updateApprovalMode: ({newValue, oldValue}) => `actualizó el modo de aprobación a "${newValue}" (previamente "${oldValue}")`, + updateApprovalMode: (newValue, oldValue) => `actualizó el modo de aprobación a "${newValue}" (previamente "${oldValue}")`, upgradedWorkspace: 'mejoró este espacio de trabajo al plan Controlar', forcedCorporateUpgrade: `Este espacio de trabajo ha sido actualizado al plan Control. Haz clic aquí para obtener más información.`, downgradedWorkspace: 'bajó de categoría este espacio de trabajo al plan Recopilar', @@ -8476,8 +8475,8 @@ ${amount} para ${merchant} - ${date}`, connectionSettings: 'Configuración de conexión', actions: { type: { - changeField: ({oldValue, newValue, fieldName}) => `cambió ${fieldName} a "${newValue}" (previamente "${oldValue}")`, - changeFieldEmpty: ({newValue, fieldName}) => `estableció ${fieldName} a ${newValue}`, + changeField: (oldValue, newValue, fieldName) => `cambió ${fieldName} a "${newValue}" (previamente "${oldValue}")`, + changeFieldEmpty: (newValue, fieldName) => `estableció ${fieldName} a ${newValue}`, changeReportPolicy: (toPolicyName, fromPolicyName) => { if (!toPolicyName) { return `cambió el espacio de trabajo${fromPolicyName ? ` (previamente ${fromPolicyName})` : ''}`; @@ -8509,7 +8508,7 @@ ${amount} para ${merchant} - ${date}`, managerAttachReceipt: `agregó un recibo`, managerDetachReceipt: `quitó un recibo`, markedReimbursed: (amount, currency) => `pagó ${currency}${amount} en otro lugar`, - markedReimbursedFromIntegration: ({amount, currency}) => `pagó ${currency}${amount} mediante integración`, + markedReimbursedFromIntegration: (amount, currency) => `pagó ${currency}${amount} mediante integración`, outdatedBankAccount: `no se pudo procesar el pago debido a un problema con la cuenta bancaria del pagador`, reimbursementACHBounceDefault: `no se pudo procesar el pago debido a un número de ruta/cuenta incorrecto o una cuenta cerrada`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `no se pudo procesar el pago: ${returnReason}`, @@ -8518,8 +8517,8 @@ ${amount} para ${merchant} - ${date}`, reimbursementDelayed: `procesó el pago pero se retrasó entre 1 y 2 días hábiles más`, selectedForRandomAudit: `seleccionado al azar para revisión`, selectedForRandomAuditMarkdown: `[seleccionado al azar](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) para revisión`, - share: ({to}) => `miembro invitado ${to}`, - unshare: ({to}) => `miembro eliminado ${to}`, + share: (to) => `miembro invitado ${to}`, + unshare: (to) => `miembro eliminado ${to}`, stripePaid: (amount, currency) => `pagado ${currency}${amount}`, takeControl: `tomó el control`, actionableCard3DSTransactionApproval: (amount: string, merchant: string | undefined) => { @@ -8538,7 +8537,7 @@ ${amount} para ${merchant} - ${date}`, const article = role === CONST.POLICY.ROLE.AUDITOR ? 'un' : 'a'; return didJoinPolicy ? `${email} se unió mediante el enlace de invitación del espacio de trabajo` : `añadió ${email} como ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}) => `actualizó el rol ${email} a ${newRole} (previamente ${currentRole})`, + updateRole: (email, currentRole, newRole) => `actualizó el rol ${email} a ${newRole} (previamente ${currentRole})`, updatedCustomField1: (email, newValue, previousValue) => { if (!newValue) { return `eliminó el campo personalizado 1 de ${email} (previamente "${previousValue}")`; @@ -8557,8 +8556,8 @@ ${amount} para ${merchant} - ${date}`, }, leftWorkspace: (nameOrEmail) => `${nameOrEmail} salió del espacio de trabajo`, removeMember: (email, role) => `eliminado ${role} ${email}`, - removedConnection: ({connectionName}) => `eliminó la conexión a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}) => `se conectó a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName) => `eliminó la conexión a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName) => `se conectó a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'salió del chat', leftTheChatWithName: (nameOrEmail) => `${nameOrEmail ? `${nameOrEmail}: ` : ''}salió del chat`, settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => @@ -9124,7 +9123,7 @@ ${amount} para ${merchant} - ${date}`, reply: 'Respuesta', from: 'De', in: 'en', - parentNavigationSummary: ({reportName, workspaceName}) => `De ${reportName}${workspaceName ? ` en ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName, workspaceName) => `De ${reportName}${workspaceName ? ` en ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'Código QR', @@ -9307,7 +9306,7 @@ ${amount} para ${merchant} - ${date}`, missingComment: 'Descripción obligatoria para la categoría seleccionada', missingAttendees: 'Se requieren múltiples asistentes para esta categoría', missingTag: (tagName) => `Falta ${tagName ?? 'etiqueta'}`, - modifiedAmount: ({type, displayPercentVariance}) => { + modifiedAmount: (type, displayPercentVariance) => { switch (type) { case 'distance': return 'Importe difiere del calculado basado en distancia'; @@ -9321,7 +9320,7 @@ ${amount} para ${merchant} - ${date}`, } }, modifiedDate: 'Fecha difiere del recibo escaneado', - increasedDistance: ({formattedRouteDistance}) => + increasedDistance: (formattedRouteDistance) => formattedRouteDistance ? `La distancia supera la ruta calculada de ${formattedRouteDistance}` : 'La distancia supera la ruta calculada', nonExpensiworksExpense: 'Gasto no proviene de Expensiworks', overAutoApprovalLimit: (formattedLimit) => `Importe supera el límite de aprobación automática${formattedLimit ? ` de ${formattedLimit}` : ''}`, @@ -9617,8 +9616,8 @@ ${amount} para ${merchant} - ${date}`, collect: { title: 'Recopilar', description: 'El plan para pequeñas empresas que te ofrece gestión de gastos, viajes y chat.', - priceAnnual: ({lower, upper}) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, - pricePayPerUse: ({lower, upper}) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, + priceAnnual: (lower, upper) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, + pricePayPerUse: (lower, upper) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, benefit1: 'Escaneo de recibos', benefit2: 'Reembolsos', benefit3: 'Gestión de tarjetas corporativas', @@ -9631,8 +9630,8 @@ ${amount} para ${merchant} - ${date}`, control: { title: 'Controlar', description: 'Gastos, viajes y chat para empresas más grandes.', - priceAnnual: ({lower, upper}) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, - pricePayPerUse: ({lower, upper}) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, + priceAnnual: (lower, upper) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, + pricePayPerUse: (lower, upper) => `Desde ${lower}/miembro activo con la Tarjeta Expensify, ${upper}/miembro activo sin la Tarjeta Expensify.`, benefit1: 'Todo lo incluido en el plan Collect', benefit2: 'Flujos de aprobación multinivel', benefit3: 'Reglas de gastos personalizadas', @@ -9769,7 +9768,7 @@ ${amount} para ${merchant} - ${date}`, addCopilot: 'Añade un copiloto', membersCanAccessYourAccount: 'Estos miembros pueden acceder a tu cuenta:', youCanAccessTheseAccounts: 'Puedes acceder a estas cuentas:', - role: ({role} = {}) => { + role: (role) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Completo'; @@ -9784,7 +9783,7 @@ ${amount} para ${merchant} - ${date}`, accessLevel: 'Nivel de acceso', confirmCopilot: 'Confirma tu copiloto a continuación.', accessLevelDescription: 'Elige un nivel de acceso a continuación. Tanto el acceso Completo como el Limitado permiten a los copilotos ver todas las conversaciones y gastos.', - roleDescription: ({role} = {}) => { + roleDescription: (role) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Permite a otro miembro realizar todas las acciones en tu cuenta, en tu nombre. Incluye chat, presentaciones, aprobaciones, pagos, actualizaciones de configuración y más.'; @@ -9798,7 +9797,7 @@ ${amount} para ${merchant} - ${date}`, removeCopilotConfirmation: '¿Estás seguro de que quieres eliminar este copiloto?', removeCopilotAccess: 'Eliminar mi acceso de copiloto', removeCopilotAccessTitle: '¿Eliminar acceso de copiloto?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName) => `¿Estás seguro de que quieres eliminar tu acceso de copiloto a la cuenta de Expensify de ${delegatorName}? Esta acción no se puede deshacer.`, removeCopilotAccessConfirm: 'Eliminar acceso', changeAccessLevel: 'Cambiar nivel de acceso', @@ -9820,9 +9819,9 @@ ${amount} para ${merchant} - ${date}`, nothingToPreview: 'Nada que previsualizar', editJson: 'Editar JSON:', preview: 'Previa:', - missingProperty: ({propertyName}) => `Falta ${propertyName}`, - invalidProperty: ({propertyName, expectedType}) => `Propiedad inválida: ${propertyName} - Esperado: ${expectedType}`, - invalidValue: ({expectedValues}) => `Valor inválido - Esperado: ${expectedValues}`, + missingProperty: (propertyName) => `Falta ${propertyName}`, + invalidProperty: (propertyName, expectedType) => `Propiedad inválida: ${propertyName} - Esperado: ${expectedType}`, + invalidValue: (expectedValues) => `Valor inválido - Esperado: ${expectedValues}`, missingValue: 'Valor en falta', createReportAction: 'Crear acción de informe', reportAction: 'Acciones del informe', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index cdec11198309..6c34ca1871c7 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -818,8 +783,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'Copier l’e-mail dans le presse-papiers', markAsUnread: 'Marquer comme non lu', markAsRead: 'Marquer comme lu', - editAction: ({action}: EditActionParams) => `Modifier ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'dépense' : 'comment'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Modifier ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'dépense' : 'comment'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'comment'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -828,7 +793,7 @@ const translations: TranslationDeepObject = { } return `Supprimer ${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'comment'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -913,16 +878,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Ce salon de discussion a été archivé.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `Cette discussion n’est plus active, car ${displayName} a fermé son compte.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Cette discussion n’est plus active, car ${displayName} a fermé son compte.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Cette discussion n’est plus active, car ${oldDisplayName} a fusionné son compte avec ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Cette discussion n’est plus active, car vous n’êtes plus membre de l’espace de travail ${policyName}.` : `Cette discussion n’est plus active, car ${displayName} n’est plus membre de l’espace de travail ${policyName}.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Cette discussion n’est plus active, car ${policyName} n’est plus un espace de travail actif.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Cette discussion n’est plus active, car ${policyName} n’est plus un espace de travail actif.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Cette réservation est archivée.', }, @@ -1404,7 +1369,7 @@ const translations: TranslationDeepObject = { canceledRequest: (amount: string, submitterDisplayName: string) => `a annulé le paiement de ${amount}, car ${submitterDisplayName} n’a pas activé son Portefeuille Expensify dans un délai de 30 jours`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} a ajouté un compte bancaire. Le paiement de ${amount} a été effectué.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}marqué comme payé${comment ? `, en disant « ${comment} »` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}marqué comme payé${comment ? `, en disant « ${comment} »` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}payé avec le portefeuille`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}payé avec Expensify via les règles de l’espace de travail`, @@ -1462,7 +1427,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `pour ${comment}` : 'dépense'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Note de frais de facture n° ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} envoyé${comment ? `pour ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `a déplacé la dépense de l’espace personnel vers ${workspaceName ?? `discuter avec ${reportName}`}`, movedToPersonalSpace: 'a déplacé la dépense vers l’espace personnel', error: { @@ -1788,10 +1753,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Voir la photo', imageUploadFailed: 'Échec du téléversement de l’image', deleteWorkspaceError: 'Désolé, un problème inattendu est survenu lors de la suppression de l’avatar de votre espace de travail', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `L’image sélectionnée dépasse la taille maximale de téléversement de ${maxUploadSizeInMB} Mo.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `L’image sélectionnée dépasse la taille maximale de téléversement de ${maxUploadSizeInMB} Mo.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Veuillez téléverser une image plus grande que ${minHeightInPx}x${minWidthInPx} pixels et plus petite que ${maxHeightInPx}x${maxWidthInPx} pixels.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `La photo de profil doit être de l’un des types suivants : ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `La photo de profil doit être de l’un des types suivants : ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Modifier la photo de profil', @@ -2464,7 +2429,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'vous connecter via Plaid.', fixCard: 'Réparer la carte', brokenConnection: 'La connexion de votre carte est rompue.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `La connexion de votre carte ${cardName} est rompue. Connectez-vous à votre banque pour corriger la carte.` : `La connexion de votre carte ${cardName} est rompue. Connectez-vous à votre banque pour corriger la carte.`, @@ -3578,7 +3543,7 @@ ${amount} pour ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Vous assignez ${nameOrEmail} comme remplaçant pendant vos congés. Cette personne n’est pas encore présente dans tous vos espaces de travail. Si vous choisissez de continuer, un e-mail sera envoyé aux administrateurs de tous vos espaces de travail pour l’ajouter.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Étape ${step}`; if (total) { result = `${result} of ${total}`; @@ -4462,7 +4427,7 @@ ${amount} pour ${merchant} - ${date}`, subscription: 'Abonnement', markAsEntered: 'Marquer comme saisi manuellement', markAsExported: 'Marquer comme exporté', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Exporter vers ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Exporter vers ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Vérifions une seconde fois que tout est correct.', lineItemLevel: 'Niveau poste de ligne', reportLevel: 'Niveau de la note de frais', @@ -4473,11 +4438,11 @@ ${amount} pour ${merchant} - ${date}`, content: (adminsRoomLink: string) => `Partagez ce code QR ou copiez le lien ci-dessous pour permettre aux membres de demander facilement l’accès à votre espace de travail. Toutes les demandes pour rejoindre l’espace de travail apparaîtront dans le salon ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} pour votre examen.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Se connecter à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Se connecter à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Créer une nouvelle connexion', reuseExistingConnection: 'Réutiliser la connexion existante', existingConnections: 'Connexions existantes', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Puisque vous vous êtes déjà connecté à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}, vous pouvez choisir de réutiliser une connexion existante ou d’en créer une nouvelle.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Dernière synchronisation le ${formattedDate}`, authenticationError: (connectionName: string) => `Impossible de se connecter à ${connectionName} en raison d’une erreur d’authentification.`, @@ -5481,7 +5446,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. one: '1 UDD ajouté', other: (count: number) => `${count} DDU ajoutés`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'services'; @@ -6137,7 +6102,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. reportFieldNameRequiredError: 'Veuillez saisir un nom de champ de note de frais', reportFieldTypeRequiredError: 'Veuillez choisir un type de champ de note de frais', circularReferenceError: 'Ce champ ne peut pas faire référence à lui-même. Veuillez le mettre à jour.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Champ de formule ${value} non reconnu`, + unsupportedFormulaValueError: (value: string) => `Champ de formule ${value} non reconnu`, reportFieldInitialValueRequiredError: 'Veuillez choisir une valeur initiale pour le champ de note de frais', genericFailureMessage: 'Une erreur s’est produite lors de la mise à jour du champ de note de frais. Veuillez réessayer.', }, @@ -6484,7 +6449,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. talkYourAccountManager: 'Discuter avec votre gestionnaire de compte.', talkToConcierge: 'Discuter avec Concierge.', needAnotherAccounting: 'Besoin d’un autre logiciel comptable ?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6512,13 +6477,13 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. syncNow: 'Synchroniser maintenant', disconnect: 'Déconnecter', reinstall: 'Réinstaller le connecteur', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'intégration'; return `Déconnecter ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Connecter ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'intégration comptable'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `Connecter ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'intégration comptable'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Impossible de se connecter à QuickBooks Online'; @@ -6547,12 +6512,12 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importé en tant que champs de note de frais', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Par défaut employé NetSuite', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'cette intégration'; return `Voulez-vous vraiment déconnecter ${integrationName} ?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Voulez-vous vraiment connecter ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'cette intégration comptable'} ? Cette action supprimera toutes les connexions comptables existantes.`, enterCredentials: 'Saisissez vos identifiants', reconnect: 'Reconnecter', @@ -6573,7 +6538,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6950,10 +6915,7 @@ Si vous souhaitez prendre en charge la facturation de l’ensemble de son abonne }, exportAgainModal: { title: 'Attention !', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `Les notes de frais suivantes ont déjà été exportées vers ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Voulez-vous vraiment les exporter à nouveau ? + description: (reportName: string, connectionName: ConnectionName) => `Les notes de frais suivantes ont déjà été exportées vers ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Voulez-vous vraiment les exporter à nouveau ? ${reportName}`, confirmText: 'Oui, exporter à nouveau', @@ -7644,7 +7606,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e }, description: 'Choisissez l’offre qui vous convient.', subscriptionLink: 'En savoir plus', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Vous vous êtes engagé à 1 membre actif sur le plan Control jusqu'à la fin de votre abonnement annuel, le ${annualSubscriptionEndDate}. Vous pourrez passer à un abonnement à l’usage et rétrograder vers le plan Collect à partir du ${annualSubscriptionEndDate} en désactivant le renouvellement automatique dans`, other: `Vous vous êtes engagé·e à avoir ${count} membres actifs sur le forfait Control jusqu’à la fin de votre abonnement annuel le ${annualSubscriptionEndDate}. Vous pouvez passer à un abonnement à l’usage et rétrograder vers le forfait Collect à partir du ${annualSubscriptionEndDate} en désactivant le renouvellement automatique dans`, }), @@ -7690,7 +7652,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e description: 'Je configurerai manuellement les circuits de validation dans Expensify.', }, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Synchronisation des employés Gusto'; @@ -7960,7 +7922,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e !oldDescription ? `définir la description de cet espace de travail sur « ${newDescription} »` : `a mis à jour la description de cet espace de travail en « ${newDescription} » (auparavant « ${oldDescription} »)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7979,7 +7941,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `a mis à jour la devise par défaut en ${newCurrency} (auparavant ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `a mis à jour la fréquence de création automatique de notes de frais sur « ${newFrequency} » (auparavant « ${oldFrequency} »)`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `a mis à jour le mode d’approbation sur « ${newValue} » (auparavant « ${oldValue} »)`, + updateApprovalMode: (newValue: string, oldValue?: string) => `a mis à jour le mode d’approbation sur « ${newValue} » (auparavant « ${oldValue} »)`, upgradedWorkspace: 'a fait passer cet espace de travail au forfait Control', forcedCorporateUpgrade: `Cet espace de travail a été mis à niveau vers l’offre Control. Cliquez ici pour plus d’informations.`, downgradedWorkspace: 'a rétrogradé cet espace de travail vers l’offre Collect', @@ -8728,8 +8690,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e connectionSettings: 'Paramètres de connexion', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `a modifié ${fieldName} en « ${newValue} » (auparavant « ${oldValue} »)`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `définir ${fieldName} sur « ${newValue} »`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `a modifié ${fieldName} en « ${newValue} » (auparavant « ${oldValue} »)`, + changeFieldEmpty: (newValue: string, fieldName: string) => `définir ${fieldName} sur « ${newValue} »`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `a modifié l’espace de travail${fromPolicyName ? `(précédemment ${fromPolicyName})` : ''}`; @@ -8761,7 +8723,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e managerAttachReceipt: `a ajouté un reçu`, managerDetachReceipt: `a supprimé un reçu`, markedReimbursed: (amount: string, currency: string) => `payé ${amount} ${currency} ailleurs`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `a payé ${currency}${amount} via intégration`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `a payé ${currency}${amount} via intégration`, outdatedBankAccount: `n’a pas pu traiter le paiement en raison d’un problème avec le compte bancaire du payeur`, reimbursementACHBounceDefault: `impossible de traiter le paiement en raison d’un numéro de routage/de compte incorrect ou d’un compte clôturé`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `impossible de traiter le paiement : ${returnReason}`, @@ -8770,8 +8732,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e reimbursementDelayed: `a traité le paiement, mais il est retardé de 1 à 2 jours ouvrables supplémentaires`, selectedForRandomAudit: `sélectionné aléatoirement pour examen`, selectedForRandomAuditMarkdown: `[sélectionné aléatoirement](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) pour examen`, - share: ({to}: ShareParams) => `a invité le membre ${to}`, - unshare: ({to}: UnshareParams) => `a retiré le membre ${to}`, + share: (to: string) => `a invité le membre ${to}`, + unshare: (to: string) => `a retiré le membre ${to}`, stripePaid: (amount: string, currency: string) => `payé ${amount} ${currency}`, takeControl: `a pris le contrôle`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8786,7 +8748,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e const article = role === CONST.POLICY.ROLE.AUDITOR ? 'un' : 'a'; return didJoinPolicy ? `${email} a rejoint via le lien d’invitation de l’espace de travail` : `a ajouté ${email} en tant que ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `a mis à jour le rôle de ${email} en ${newRole} (précédemment ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `a mis à jour le rôle de ${email} en ${newRole} (précédemment ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `a supprimé le champ personnalisé 1 de ${email} (précédemment « ${previousValue} »)`; @@ -8805,8 +8767,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} a quitté l’espace de travail`, removeMember: (email: string, role: string) => `a supprimé ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `a supprimé la connexion à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}: ConnectionNameParams) => `connecté à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `a supprimé la connexion à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName: AllConnectionName) => `connecté à ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'a quitté la discussion', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `le compte bancaire professionnel ${maskedBankAccountNumber} a été automatiquement verrouillé en raison d’un problème lié soit au remboursement, soit au règlement de la Carte Expensify. Veuillez corriger le problème dans vos paramètres d’espace de travail.`, @@ -8916,7 +8878,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e reply: 'Répondre', from: 'De', in: 'dans', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `De ${reportName}${workspaceName ? `dans ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `De ${reportName}${workspaceName ? `dans ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'Code QR', @@ -9173,7 +9135,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e missingComment: 'Description requise pour la catégorie sélectionnée', missingAttendees: 'Plusieurs participants sont requis pour cette catégorie', missingTag: (tagName?: string) => `${tagName ?? 'tag'} manquant`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Le montant diffère de la distance calculée'; @@ -9187,7 +9149,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e } }, modifiedDate: 'La date diffère du reçu scanné', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `La distance dépasse l'itinéraire calculé de ${formattedRouteDistance}` : "La distance dépasse l'itinéraire calculé", nonExpensiworksExpense: 'Dépense non Expensiworks', overAutoApprovalLimit: (formattedLimit: string) => `La dépense dépasse la limite d’auto-approbation de ${formattedLimit}`, @@ -9491,8 +9453,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e collect: { title: 'Encaisser', description: 'L’offre pour petites entreprises qui vous offre les dépenses, les voyages et le chat.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, + priceAnnual: (lower: string, upper: string) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, benefit1: 'Numérisation des reçus', benefit2: 'Remboursements', benefit3: 'Gestion des cartes d’entreprise', @@ -9505,8 +9467,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e control: { title: 'Contrôle', description: 'Gestion des dépenses, des voyages et des discussions pour les grandes entreprises.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, + priceAnnual: (lower: string, upper: string) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `De ${lower}/membre actif avec la Carte Expensify à ${upper}/membre actif sans la Carte Expensify.`, benefit1: 'Tout ce qui est inclus dans l’offre Collect', benefit2: 'Flux d’approbation multi-niveaux', benefit3: 'Règles de dépenses personnalisées', @@ -9643,7 +9605,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e copilot: 'Copilot', membersCanAccessYourAccount: 'Ces membres peuvent accéder à votre compte :', youCanAccessTheseAccounts: 'Vous pouvez accéder à ces comptes :', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Complet'; @@ -9659,7 +9621,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e confirmCopilot: 'Confirmez votre copilote ci-dessous.', accessLevelDescription: 'Choisissez un niveau d’accès ci-dessous. Les accès Complet et Limité permettent tous deux aux copilotes de voir toutes les conversations et toutes les dépenses.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Autorisez un autre membre à effectuer toutes les actions dans votre compte, en votre nom. Cela inclut les discussions, soumissions, approbations, paiements, mises à jour des paramètres, et plus encore.'; @@ -9683,7 +9645,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e `En tant que copilote pour ${accountOwnerEmail}, vous n’avez pas l’autorisation d’effectuer cette action. Désolé !`, removeCopilotAccess: 'Supprimer mon accès copilote', removeCopilotAccessTitle: "Supprimer l'accès copilote ?", - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Êtes-vous sûr de vouloir supprimer votre accès copilote au compte Expensify de ${delegatorName} ? Cette action est irréversible.`, removeCopilotAccessConfirm: "Supprimer l'accès", copilotAccess: 'Accès Copilot', @@ -9697,9 +9659,9 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e nothingToPreview: 'Rien à prévisualiser', editJson: 'Modifier le JSON :', preview: 'Aperçu :', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} manquant`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Propriété non valide : ${propertyName} - Attendu : ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Valeur non valide - Valeurs attendues : ${expectedValues}`, + missingProperty: (propertyName: string) => `${propertyName} manquant`, + invalidProperty: (propertyName: string, expectedType: string) => `Propriété non valide : ${propertyName} - Attendu : ${expectedType}`, + invalidValue: (expectedValues: string) => `Valeur non valide - Valeurs attendues : ${expectedValues}`, missingValue: 'Valeur manquante', createReportAction: 'Créer une note de frais', reportAction: 'Action sur la note de frais', diff --git a/src/languages/it.ts b/src/languages/it.ts index a3aa7af002c1..9aa64b3613cf 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -817,8 +782,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'Copia email negli appunti', markAsUnread: 'Segna come non letto', markAsRead: 'Segna come letto', - editAction: ({action}: EditActionParams) => `Modifica ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'spesa' : 'commento'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Modifica ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'spesa' : 'commento'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'commento'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -827,7 +792,7 @@ const translations: TranslationDeepObject = { } return `Elimina ${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'commento'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -911,16 +876,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Questa chat room è stata archiviata.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `Questa chat non è più attiva perché ${displayName} ha chiuso il proprio account.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Questa chat non è più attiva perché ${displayName} ha chiuso il proprio account.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Questa chat non è più attiva perché ${oldDisplayName} ha unito il proprio account con quello di ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Questa chat non è più attiva perché tu non fai più parte dello spazio di lavoro ${policyName}.` : `Questa chat non è più attiva perché ${displayName} non fa più parte dello spazio di lavoro ${policyName}.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Questa chat non è più attiva perché ${policyName} non è più uno spazio di lavoro attivo.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Questa chat non è più attiva perché ${policyName} non è più uno spazio di lavoro attivo.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Questa prenotazione è archiviata.', }, @@ -1400,7 +1365,7 @@ const translations: TranslationDeepObject = { `ha annullato il pagamento di ${amount}, perché ${submitterDisplayName} non ha abilitato il proprio Expensify Wallet entro 30 giorni`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} ha aggiunto un conto bancario. Il pagamento di ${amount} è stato effettuato.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}contrassegnato come pagato${comment ? `, dicendo «${comment}»` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}contrassegnato come pagato${comment ? `, dicendo «${comment}»` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}pagato con portafoglio`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}pagato con Expensify tramite le regole dello spazio di lavoro`, @@ -1457,7 +1422,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `per ${comment}` : 'spesa'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Report fattura n. ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} inviato${comment ? `per ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `ha spostato la spesa dallo spazio personale a ${workspaceName ?? `chatta con ${reportName}`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `ha spostato la spesa dallo spazio personale a ${workspaceName ?? `chatta con ${reportName}`}`, movedToPersonalSpace: 'ha spostato la spesa nello spazio personale', error: { invalidCategoryLength: 'Il nome della categoria supera i 255 caratteri. Accorcialo oppure scegli un’altra categoria.', @@ -1780,10 +1745,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Vedi foto', imageUploadFailed: 'Caricamento immagine non riuscito', deleteWorkspaceError: 'Spiacenti, si è verificato un problema imprevisto durante l’eliminazione dell’avatar del tuo workspace', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `L'immagine selezionata supera la dimensione massima di caricamento di ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `L'immagine selezionata supera la dimensione massima di caricamento di ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Carica un'immagine più grande di ${minHeightInPx}x${minWidthInPx} pixel e più piccola di ${maxHeightInPx}x${maxWidthInPx} pixel.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `L’immagine del profilo deve essere di uno dei seguenti tipi: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `L’immagine del profilo deve essere di uno dei seguenti tipi: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Modifica immagine del profilo', @@ -2456,7 +2421,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'connetterti tramite Plaid.', fixCard: 'Correggi carta', brokenConnection: 'La connessione della tua carta è interrotta.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `La connessione della tua carta ${cardName} non funziona. Accedi alla tua banca per sistemare la carta.` : `La connessione della tua carta ${cardName} non funziona. Accedi alla tua banca per sistemare la carta.`, @@ -3559,7 +3524,7 @@ ${amount} per ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Stai assegnando ${nameOrEmail} come tuo delegato per le ferie. Non fa ancora parte di tutti i tuoi spazi di lavoro. Se scegli di continuare, verrà inviata un’email a tutti gli amministratori dei tuoi spazi di lavoro per aggiungerlo.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Passaggio ${step}`; if (total) { result = `${result} of ${total}`; @@ -4437,7 +4402,7 @@ ${amount} per ${merchant} - ${date}`, subscription: 'Abbonamento', markAsEntered: 'Segna come inserito manualmente', markAsExported: 'Segna come esportato', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Esporta in ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Esporta in ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Controlliamo che sia tutto corretto.', lineItemLevel: 'Livello voce di dettaglio', reportLevel: 'Livello report', @@ -4448,11 +4413,11 @@ ${amount} per ${merchant} - ${date}`, content: (adminsRoomLink: string) => `Condividi questo codice QR o copia il link qui sotto per facilitare ai membri la richiesta di accesso al tuo spazio di lavoro. Tutte le richieste di adesione allo spazio di lavoro verranno visualizzate nella stanza ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} per la tua revisione.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Connetti a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Connetti a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Crea nuova connessione', reuseExistingConnection: 'Riutilizza connessione esistente', existingConnections: 'Connessioni esistenti', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Poiché ti sei già connesso a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} in passato, puoi scegliere di riutilizzare una connessione esistente o crearne una nuova.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Ultima sincronizzazione ${formattedDate}`, authenticationError: (connectionName: string) => `Impossibile connettersi a ${connectionName} a causa di un errore di autenticazione.`, @@ -5454,7 +5419,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. one: '1 UDD aggiunto', other: (count: number) => `${count} UDD aggiunti`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'reparti'; @@ -6102,7 +6067,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. reportFieldNameRequiredError: 'Inserisci un nome per il campo del report', reportFieldTypeRequiredError: 'Scegli un tipo di campo del report', circularReferenceError: 'Questo campo non può fare riferimento a se stesso. Aggiorna per favore.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Campo formula ${value} non riconosciuto`, + unsupportedFormulaValueError: (value: string) => `Campo formula ${value} non riconosciuto`, reportFieldInitialValueRequiredError: 'Scegli un valore iniziale per il campo del resoconto', genericFailureMessage: 'Si è verificato un errore durante l’aggiornamento del campo del report. Riprova.', }, @@ -6447,7 +6412,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. talkYourAccountManager: 'Chatta con il tuo account manager.', talkToConcierge: 'Chatta con Concierge.', needAnotherAccounting: 'Ti serve un altro software di contabilità?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6475,13 +6440,13 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. syncNow: 'Sincronizza ora', disconnect: 'Disconnetti', reinstall: 'Reinstalla connettore', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integrazione'; return `Disconnetti ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Collega ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integrazione contabile'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `Collega ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integrazione contabile'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Impossibile connettersi a QuickBooks Online'; @@ -6510,12 +6475,12 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importato come campi del report', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Impostazione predefinita dipendente NetSuite', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'questa integrazione'; return `Sei sicuro di voler disconnettere ${integrationName}?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Sei sicuro di voler collegare ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'questa integrazione contabile'}? Questo rimuoverà tutte le connessioni contabili esistenti.`, enterCredentials: 'Inserisci le tue credenziali', reconnect: 'Riconnetti', @@ -6535,7 +6500,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6908,10 +6873,7 @@ Se vuoi assumere la fatturazione per l'intero abbonamento, chiedi loro di aggiun }, exportAgainModal: { title: 'Attenzione!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `I seguenti report sono già stati esportati in ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Sei sicuro di volerli esportare di nuovo? + description: (reportName: string, connectionName: ConnectionName) => `I seguenti report sono già stati esportati in ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Sei sicuro di volerli esportare di nuovo? ${reportName}`, confirmText: 'Sì, esporta di nuovo', @@ -7602,7 +7564,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, }, description: 'Scegli il piano più adatto a te.', subscriptionLink: 'Scopri di più', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Ti sei impegnato per 1 membro attivo nel piano Control fino al termine dell’abbonamento annuale, il ${annualSubscriptionEndDate}. Puoi passare all’abbonamento a consumo e effettuare il downgrade al piano Collect a partire dal ${annualSubscriptionEndDate} disattivando il rinnovo automatico in`, other: `Ti sei impegnato per ${count} membri attivi nel piano Control fino alla fine dell’abbonamento annuale, il ${annualSubscriptionEndDate}. Puoi passare all’abbonamento a consumo e effettuare il downgrade al piano Collect a partire dal ${annualSubscriptionEndDate} disattivando il rinnovo automatico in`, }), @@ -7642,7 +7604,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, }, custom: {label: 'Approvazione personalizzata', description: 'Imposterò manualmente i flussi di approvazione in Expensify.'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Sincronizzazione dei dipendenti Gusto'; @@ -7912,7 +7874,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, !oldDescription ? `imposta la descrizione di questo spazio di lavoro su "${newDescription}"` : `ha aggiornato la descrizione di questo spazio di lavoro in "${newDescription}" (in precedenza "${oldDescription}")`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7931,7 +7893,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `ha aggiornato la valuta predefinita in ${newCurrency} (precedentemente ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `ha aggiornato la frequenza di creazione automatica dei report a "${newFrequency}" (in precedenza "${oldFrequency}")`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `ha aggiornato la modalità di approvazione in "${newValue}" (in precedenza "${oldValue}")`, + updateApprovalMode: (newValue: string, oldValue?: string) => `ha aggiornato la modalità di approvazione in "${newValue}" (in precedenza "${oldValue}")`, upgradedWorkspace: 'ha aggiornato questo spazio di lavoro al piano Control', forcedCorporateUpgrade: `Questo spazio di lavoro è stato aggiornato al piano Control. Fai clic qui per maggiori informazioni.`, downgradedWorkspace: 'ha effettuato il downgrade di questo spazio di lavoro al piano Collect', @@ -8683,8 +8645,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, connectionSettings: 'Impostazioni di connessione', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `ha modificato ${fieldName} in "${newValue}" (in precedenza "${oldValue}")`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `imposta ${fieldName} su "${newValue}"`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `ha modificato ${fieldName} in "${newValue}" (in precedenza "${oldValue}")`, + changeFieldEmpty: (newValue: string, fieldName: string) => `imposta ${fieldName} su "${newValue}"`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `ha modificato il workspace${fromPolicyName ? `(precedentemente ${fromPolicyName})` : ''}`; @@ -8716,7 +8678,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, managerAttachReceipt: `ha aggiunto una ricevuta`, managerDetachReceipt: `ha rimosso una ricevuta`, markedReimbursed: (amount: string, currency: string) => `pagato ${currency}${amount} altrove`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `pagato ${currency}${amount} tramite integrazione`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `pagato ${currency}${amount} tramite integrazione`, outdatedBankAccount: `impossibile elaborare il pagamento a causa di un problema con il conto bancario del pagatore`, reimbursementACHBounceDefault: `impossibile elaborare il pagamento a causa di un numero di instradamento/conto errato o di un conto chiuso`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `impossibile elaborare il pagamento: ${returnReason}`, @@ -8725,8 +8687,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, reimbursementDelayed: `ha elaborato il pagamento ma è in ritardo di 1-2 giorni lavorativi in più`, selectedForRandomAudit: `selezionato casualmente per la revisione`, selectedForRandomAuditMarkdown: `selezionato in modo casuale per la revisione`, - share: ({to}: ShareParams) => `ha invitato il membro ${to}`, - unshare: ({to}: UnshareParams) => `ha rimosso il membro ${to}`, + share: (to: string) => `ha invitato il membro ${to}`, + unshare: (to: string) => `ha rimosso il membro ${to}`, stripePaid: (amount: string, currency: string) => `ha pagato ${currency}${amount}`, takeControl: `ha preso il controllo`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8741,7 +8703,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, const article = role === CONST.POLICY.ROLE.AUDITOR ? 'un' : 'a'; return didJoinPolicy ? `${email} si è unito tramite il link di invito allo spazio di lavoro` : `ha aggiunto ${email} come ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `ha aggiornato il ruolo di ${email} a ${newRole} (in precedenza ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `ha aggiornato il ruolo di ${email} a ${newRole} (in precedenza ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `rimossa la campo personalizzato 1 di ${email} (in precedenza “${previousValue}”)`; @@ -8760,8 +8722,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} ha lasciato lo spazio di lavoro`, removeMember: (email: string, role: string) => `ha rimosso ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `rimossa connessione a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}: ConnectionNameParams) => `collegato a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `rimossa connessione a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName: AllConnectionName) => `collegato a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'ha lasciato la chat', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `il conto bancario aziendale ${maskedBankAccountNumber} è stato bloccato automaticamente a causa di un problema con il rimborso o con il regolamento della Carta Expensify. Risolvi il problema nelle impostazioni dello spazio di lavoro.`, @@ -8871,7 +8833,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, reply: 'Rispondi', from: 'Da', in: 'in', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `Da ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `Da ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'Codice QR', @@ -9128,7 +9090,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, missingComment: 'Descrizione obbligatoria per la categoria selezionata', missingAttendees: 'Per questa categoria sono richiesti più partecipanti', missingTag: (tagName?: string) => `Manca ${tagName ?? 'etichetta'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return "L'importo differisce dalla distanza calcolata"; @@ -9142,7 +9104,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, } }, modifiedDate: 'Data diversa dalla ricevuta scansionata', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `La distanza supera il percorso calcolato di ${formattedRouteDistance}` : 'La distanza supera il percorso calcolato', nonExpensiworksExpense: 'Spesa non-Expensiworks', overAutoApprovalLimit: (formattedLimit: string) => `La spesa supera il limite di approvazione automatica di ${formattedLimit}`, @@ -9447,8 +9409,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, collect: { title: 'Riscuoti', description: 'Il piano per piccole imprese che ti offre note spese, viaggi e chat.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, + priceAnnual: (lower: string, upper: string) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, benefit1: 'Scansione ricevute', benefit2: 'Rimborsi', benefit3: 'Gestione carte aziendali', @@ -9461,8 +9423,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, control: { title: 'Controllo', description: 'Spese, viaggi e chat per le aziende più grandi.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, + priceAnnual: (lower: string, upper: string) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `Da ${lower} membro/attivo con la Carta Expensify, ${upper} membro/attivo senza la Carta Expensify.`, benefit1: 'Tutto ciò che è incluso nel piano Collect', benefit2: 'Flussi di approvazione multilivello', benefit3: 'Regole personalizzate per le spese', @@ -9599,7 +9561,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, addCopilot: 'Aggiungi un copilota', membersCanAccessYourAccount: 'Questi membri possono accedere al tuo account:', youCanAccessTheseAccounts: 'Puoi accedere a questi account:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Pieno'; @@ -9615,7 +9577,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, confirmCopilot: 'Conferma il tuo copilota qui sotto.', accessLevelDescription: 'Scegli un livello di accesso qui sotto. Sia l’accesso Completo che quello Limitato consentono ai copiloti di visualizzare tutte le conversazioni e le spese.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Consenti a un altro membro di eseguire tutte le azioni nel tuo account, per tuo conto. Include chat, invii, approvazioni, pagamenti, aggiornamenti delle impostazioni e altro ancora.'; @@ -9639,7 +9601,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, `Come copilota per ${accountOwnerEmail}, non hai l'autorizzazione per eseguire questa azione. Spiacenti!`, removeCopilotAccess: 'Rimuovi il mio accesso copilota', removeCopilotAccessTitle: "Rimuovere l'accesso copilota?", - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Sei sicuro di voler rimuovere il tuo accesso copilota all'account Expensify di ${delegatorName}? Questa azione non può essere annullata.`, removeCopilotAccessConfirm: 'Rimuovi accesso', copilotAccess: 'Accesso a Copilot', @@ -9653,9 +9615,9 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, nothingToPreview: 'Niente da visualizzare', editJson: 'Modifica JSON:', preview: 'Anteprima:', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} mancante`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Proprietà non valida: ${propertyName} - Previsto: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Valore non valido - previsto: ${expectedValues}`, + missingProperty: (propertyName: string) => `${propertyName} mancante`, + invalidProperty: (propertyName: string, expectedType: string) => `Proprietà non valida: ${propertyName} - Previsto: ${expectedType}`, + invalidValue: (expectedValues: string) => `Valore non valido - previsto: ${expectedValues}`, missingValue: 'Valore mancante', createReportAction: 'Azione Crea Report', reportAction: 'Azione report', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index fad628bbb77d..889c75e615ad 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -806,8 +771,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'メールアドレスをクリップボードにコピー', markAsUnread: '未読にする', markAsRead: '既読にする', - editAction: ({action}: EditActionParams) => `${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? '経費' : 'コメント'} を編集`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? '経費' : 'コメント'} を編集`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'コメント'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -816,7 +781,7 @@ const translations: TranslationDeepObject = { } return `${type}を削除`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'コメント'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -900,16 +865,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'このチャットルームはアーカイブされました。', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `${displayName} がアカウントを閉鎖したため、このチャットは現在利用できません。`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `${displayName} がアカウントを閉鎖したため、このチャットは現在利用できません。`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `このチャットは、${oldDisplayName} が自分のアカウントを ${displayName} と統合したため、現在はアクティブではありません。`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `このチャットは、あなたが${policyName}ワークスペースのメンバーではなくなったため、これ以上利用できません。` : `${displayName}さんが${policyName}ワークスペースのメンバーではなくなったため、このチャットはこれ以上利用できません。`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `このチャットは、${policyName} がアクティブなワークスペースではなくなったため、これ以上利用できません。`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `このチャットは、${policyName} がアクティブなワークスペースではなくなったため、これ以上利用できません。`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'この予約はアーカイブされています。', }, @@ -1385,7 +1350,7 @@ const translations: TranslationDeepObject = { canceledRequest: (amount: string, submitterDisplayName: string) => `${submitterDisplayName} が30日以内に Expensify Wallet を有効化しなかったため、${amount} の支払いをキャンセルしました`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} が銀行口座を追加しました。${amount} の支払いが行われました。`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}支払い済みにしました${comment ? `、「${comment}」と言っています` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}支払い済みにしました${comment ? `、「${comment}」と言っています` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}ウォレットで支払い済み`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}はワークスペースルール経由でExpensifyにより支払われました`, @@ -1442,7 +1407,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `${comment} 用` : '経費'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `請求書レポート #${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} を送信済み${comment ? `${comment}用` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `経費を個人スペースから${workspaceName ?? `${reportName}とチャット`}に移動しました`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `経費を個人スペースから${workspaceName ?? `${reportName}とチャット`}に移動しました`, movedToPersonalSpace: '経費を個人スペースに移動しました', error: { invalidCategoryLength: 'カテゴリー名が255文字を超えています。短くするか、別のカテゴリーを選択してください。', @@ -1763,10 +1728,10 @@ const translations: TranslationDeepObject = { viewPhoto: '写真を見る', imageUploadFailed: '画像のアップロードに失敗しました', deleteWorkspaceError: '申し訳ありません、ワークスペースのアバターを削除する際に予期せぬ問題が発生しました', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `選択された画像は、アップロード可能な最大サイズ ${maxUploadSizeInMB} MB を超えています。`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `選択された画像は、アップロード可能な最大サイズ ${maxUploadSizeInMB} MB を超えています。`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `${minHeightInPx}x${minWidthInPx}ピクセルより大きく、${maxHeightInPx}x${maxWidthInPx}ピクセルより小さい画像をアップロードしてください。`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `プロフィール写真は次のいずれかのタイプである必要があります:${allowedExtensions.join(', ')}。`, + notAllowedExtension: (allowedExtensions: string[]) => `プロフィール写真は次のいずれかのタイプである必要があります:${allowedExtensions.join(', ')}。`, }, avatarPage: { title: 'プロフィール写真を編集', @@ -2437,7 +2402,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'Plaid で接続できます。', fixCard: 'カードを修正', brokenConnection: 'カード接続が切断されています。', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `${cardName}カードとの接続が切れています。カードを修正するには、銀行にログインしてください。` : `${cardName}カードとの接続が切れています。カードを修正するには、銀行にログインしてください。`, @@ -3533,7 +3498,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの' vacationDelegateWarning: (nameOrEmail: string) => `${nameOrEmail} さんをあなたの休暇代理人に指定しようとしています。この人は、まだすべてのワークスペースに参加していません。続行すると、すべてのワークスペース管理者に、この人を追加するようメールが送信されます。`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `ステップ ${step}`; if (total) { result = `${result} of ${total}`; @@ -4407,7 +4372,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの' subscription: 'サブスクリプション', markAsEntered: '手入力としてマーク', markAsExported: 'エクスポート済みにする', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} にエクスポート`, + exportIntegrationSelected: (connectionName: ConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} にエクスポート`, letsDoubleCheck: 'すべて正しく表示されているか、もう一度確認しましょう。', lineItemLevel: '明細レベル', reportLevel: 'レポートレベル', @@ -4418,11 +4383,11 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの' content: (adminsRoomLink: string) => `このQRコードを共有するか、以下のリンクをコピーしてメンバーがあなたのワークスペースへのアクセスを簡単にリクエストできるようにしましょう。ワークスペースへの参加リクエストはすべて、あなたが確認できるように${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS}ルームに表示されます。`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続`, + connectTo: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続`, createNewConnection: '新しい接続を作成', reuseExistingConnection: '既存の接続を再利用', existingConnections: '既存の接続', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `以前に ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続したことがあるため、既存の接続を再利用するか、新しい接続を作成できます。`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - 最終同期日時 ${formattedDate}`, authenticationError: (connectionName: string) => `認証エラーが原因で${connectionName}に接続できません。`, @@ -5403,7 +5368,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO one: '1件のUDDを追加しました', other: (count: number) => `${count} 件のUDDを追加しました`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return '部門'; @@ -6030,7 +5995,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO reportFieldNameRequiredError: 'レポート項目名を入力してください', reportFieldTypeRequiredError: 'レポートフィールドの種類を選択してください', circularReferenceError: 'このフィールドを自分自身に参照することはできません。更新してください。', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `数式フィールド ${value} が認識されません`, + unsupportedFormulaValueError: (value: string) => `数式フィールド ${value} が認識されません`, reportFieldInitialValueRequiredError: 'レポート項目の初期値を選択してください', genericFailureMessage: 'レポートフィールドの更新中にエラーが発生しました。もう一度お試しください。', }, @@ -6374,7 +6339,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO talkYourAccountManager: 'アカウントマネージャーとチャットする', talkToConcierge: 'Conciergeとチャットする', needAnotherAccounting: 'ほかの会計ソフトが必要ですか?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6402,12 +6367,12 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO syncNow: '今すぐ同期', disconnect: '切断', reinstall: 'コネクタを再インストール', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : '連携'; return `${integrationName}の接続を解除`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '会計連携'} を接続`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '会計連携'} を接続`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online に接続できません'; @@ -6436,12 +6401,12 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'レポートフィールドとしてインポート済み', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'NetSuite 従業員のデフォルト', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'この連携'; return `${integrationName} の接続を本当に解除しますか?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'この会計連携'} を接続してもよろしいですか?これにより、既存の会計連携はすべて削除されます。`, enterCredentials: '認証情報を入力してください', reconnect: '再接続', @@ -6462,7 +6427,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6833,10 +6798,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO }, exportAgainModal: { title: '注意!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `次のレポートはすでに ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} にエクスポートされています。もう一度エクスポートしてもよろしいですか? + description: (reportName: string, connectionName: ConnectionName) => `次のレポートはすでに ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} にエクスポートされています。もう一度エクスポートしてもよろしいですか? ${reportName}`, confirmText: 'はい、再度エクスポートします', @@ -7515,7 +7477,7 @@ ${reportName}`, }, description: '自分に合ったプランをお選びください。', subscriptionLink: '詳しく見る', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `${annualSubscriptionEndDate} までの年間サブスクリプション期間中、Control プランでアクティブメンバー 1 名を利用することに同意しています。${annualSubscriptionEndDate} 以降、 自動更新を無効にすることで、従量課金サブスクリプションに切り替え、Collect プランへダウングレードできます。`, other: `あなたは、年間サブスクリプションが${annualSubscriptionEndDate}に終了するまで、Controlプランでアクティブメンバー${count}名を契約しています。${annualSubscriptionEndDate}以降は、自動更新を無効にすることで、従量課金制サブスクリプションに切り替え、Collectプランへダウングレードできます。その操作は、`, }), @@ -7554,7 +7516,7 @@ ${reportName}`, }, custom: {label: 'カスタム承認', description: 'Expensify で承認ワークフローを手動で設定します。'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Gusto 従業員を同期中'; @@ -7821,7 +7783,7 @@ ${reportName}`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `このワークスペースの名前を「${newName}」(以前は「${oldName}」)に更新しました`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `このワークスペースの説明を「${newDescription}」に設定する` : `このワークスペースの説明を「${newDescription}」(以前は「${oldDescription}」)に更新しました`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7839,7 +7801,7 @@ ${reportName}`, `${policyName} でのあなたのロールを ${oldRole} からユーザーに更新しました。あなた自身のものを除き、すべての申請者経費チャットから削除されました。`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `デフォルト通貨を${newCurrency}(以前は${oldCurrency})に更新しました`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `自動レポート頻度を「${newFrequency}」(以前は「${oldFrequency}」)に更新しました`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `承認モードを「${newValue}」(以前は「${oldValue}」)に更新しました`, + updateApprovalMode: (newValue: string, oldValue?: string) => `承認モードを「${newValue}」(以前は「${oldValue}」)に更新しました`, upgradedWorkspace: 'このワークスペースを Control プランにアップグレードしました', forcedCorporateUpgrade: `このワークスペースは Control プランにアップグレードされました。詳しくはこちらをクリックしてください。`, downgradedWorkspace: 'このワークスペースを Collect プランにダウングレードしました', @@ -8571,8 +8533,8 @@ ${reportName}`, connectionSettings: '接続設定', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `${fieldName} を「${newValue}」(以前は「${oldValue}」)に変更しました`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `${fieldName} を「${newValue}」に設定`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `${fieldName} を「${newValue}」(以前は「${oldValue}」)に変更しました`, + changeFieldEmpty: (newValue: string, fieldName: string) => `${fieldName} を「${newValue}」に設定`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `ワークスペース${fromPolicyName ? `(以前は${fromPolicyName})` : ''}を変更しました`; @@ -8604,7 +8566,7 @@ ${reportName}`, managerAttachReceipt: `レシートを追加しました`, managerDetachReceipt: `領収書を削除しました`, markedReimbursed: (amount: string, currency: string) => `他の場所で${currency}${amount}を支払いました`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `連携経由で${currency}${amount}を支払いました`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `連携経由で${currency}${amount}を支払いました`, outdatedBankAccount: `支払元の銀行口座に問題があるため、支払いを処理できませんでした`, reimbursementACHBounceDefault: `ルーティング番号または口座番号の誤り、もしくは口座が閉鎖されているため、支払いを処理できませんでした`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `支払いを処理できませんでした:${returnReason}`, @@ -8613,8 +8575,8 @@ ${reportName}`, reimbursementDelayed: `支払いは処理されましたが、あと1~2営業日遅れています`, selectedForRandomAudit: `ランダムに選択されて審査中`, selectedForRandomAuditMarkdown: `審査のために[randomly selected](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule)`, - share: ({to}: ShareParams) => `メンバーを${to}に招待しました`, - unshare: ({to}: UnshareParams) => `メンバー ${to} を削除しました`, + share: (to: string) => `メンバーを${to}に招待しました`, + unshare: (to: string) => `メンバー ${to} を削除しました`, stripePaid: (amount: string, currency: string) => `支払い済み ${currency}${amount}`, takeControl: `管理権限を取得しました`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8629,7 +8591,7 @@ ${reportName}`, const article = role === CONST.POLICY.ROLE.AUDITOR ? '1つの' : 'a'; return didJoinPolicy ? `${email} さんがワークスペースの招待リンクから参加しました` : `${email} を ${article} ${translatedRole} として追加しました`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `${email} のロールを ${currentRole} から ${newRole} に更新しました`, + updateRole: (email: string, currentRole: string, newRole: string) => `${email} のロールを ${currentRole} から ${newRole} に更新しました`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `${email} のカスタムフィールド1を削除しました(以前の値:「${previousValue}」)`; @@ -8648,8 +8610,8 @@ ${reportName}`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} がワークスペースを退出しました`, removeMember: (email: string, role: string) => `${role} ${email} を削除しました`, - removedConnection: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} との連携を削除しました`, - addedConnection: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続済み`, + removedConnection: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} との連携を削除しました`, + addedConnection: (connectionName: AllConnectionName) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} に接続済み`, leftTheChat: 'チャットを退出しました', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `ビジネス銀行口座 ${maskedBankAccountNumber} は、払い戻しまたは Expensify カードの精算に問題が発生したため自動的にロックされました。問題を解決するには、ワークスペース設定で修正してください。`, @@ -8759,7 +8721,7 @@ ${reportName}`, reply: '返信', from: '差出人', in: '内', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `${reportName}${workspaceName ? `${workspaceName} の中` : ''} から`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `${reportName}${workspaceName ? `${workspaceName} の中` : ''} から`, }, qrCodes: { qrCode: 'QRコード', @@ -9010,7 +8972,7 @@ ${reportName}`, missingComment: '選択したカテゴリには説明が必要です', missingAttendees: 'このカテゴリには複数の参加者が必要です', missingTag: (tagName?: string) => `${tagName ?? 'タグ'} が見つかりません`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return '金額が計算された距離と一致しません'; @@ -9024,7 +8986,7 @@ ${reportName}`, } }, modifiedDate: '日付がスキャンしたレシートと異なります', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `距離が計算されたルート距離(${formattedRouteDistance})を超えています` : '距離が計算されたルートを超えています', nonExpensiworksExpense: 'Expensiworks 以外の経費', overAutoApprovalLimit: (formattedLimit: string) => `経費が自動承認限度額 ${formattedLimit} を超えています`, @@ -9324,8 +9286,8 @@ ${reportName}`, collect: { title: '回収', description: '経費、出張、チャットがすべて使える小規模ビジネス向けプラン。', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, + priceAnnual: (lower: string, upper: string) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, + pricePayPerUse: (lower: string, upper: string) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, benefit1: 'レシートのスキャン', benefit2: '精算払い', benefit3: 'コーポレートカード管理', @@ -9338,8 +9300,8 @@ ${reportName}`, control: { title: 'コントロール', description: '大企業向けの経費精算、出張管理、チャット。', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, + priceAnnual: (lower: string, upper: string) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, + pricePayPerUse: (lower: string, upper: string) => `Expensify カードありのアクティブメンバーは ${lower}、Expensify カードなしのアクティブメンバーは ${upper} です。`, benefit1: 'Collect プランのすべての内容', benefit2: '多段階承認ワークフロー', benefit3: 'カスタム経費ルール', @@ -9475,7 +9437,7 @@ ${reportName}`, addCopilot: 'コパイロットを追加', membersCanAccessYourAccount: '次のメンバーがあなたのアカウントにアクセスできます:', youCanAccessTheseAccounts: 'これらのアカウントにアクセスできます:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'フル'; @@ -9490,7 +9452,7 @@ ${reportName}`, accessLevel: 'アクセス権限レベル', confirmCopilot: '以下でコパイロットを確認してください。', accessLevelDescription: '以下からアクセスレベルを選択してください。フルアクセスと制限付きアクセスの両方で、コパイロットはすべての会話と経費を閲覧できます。', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '他のメンバーがあなたに代わってアカウント内のすべての操作を行えるようにします。チャット、申請、承認、支払い、設定の更新などが含まれます。'; @@ -9514,7 +9476,7 @@ ${reportName}`, `${accountOwnerEmail} のコパイロットとして、この操作を行う権限がありません。申し訳ありません。`, removeCopilotAccess: '自分のコパイロットアクセスを削除', removeCopilotAccessTitle: 'コパイロットアクセスを削除しますか?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `${delegatorName}のExpensifyアカウントへのコパイロットアクセスを削除してもよろしいですか?この操作は元に戻せません。`, removeCopilotAccessConfirm: 'アクセスを削除', copilotAccess: 'Copilot へのアクセス', @@ -9528,9 +9490,9 @@ ${reportName}`, nothingToPreview: 'プレビューするものはありません', editJson: 'JSON を編集:', preview: 'プレビュー:', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} がありません`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `無効なプロパティ: ${propertyName} - 期待される型: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `無効な値です - 期待される値: ${expectedValues}`, + missingProperty: (propertyName: string) => `${propertyName} がありません`, + invalidProperty: (propertyName: string, expectedType: string) => `無効なプロパティ: ${propertyName} - 期待される型: ${expectedType}`, + invalidValue: (expectedValues: string) => `無効な値です - 期待される値: ${expectedValues}`, missingValue: '値がありません', createReportAction: 'レポート作成アクション', reportAction: 'レポートアクション', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index bacbd9f0ac38..d823b570bcee 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -815,8 +780,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'E-mailadres kopiëren naar klembord', markAsUnread: 'Markeren als ongelezen', markAsRead: 'Markeren als gelezen', - editAction: ({action}: EditActionParams) => `Bewerken ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'uitgave' : 'reactie'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Bewerken ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'uitgave' : 'reactie'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'reactie'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -825,7 +790,7 @@ const translations: TranslationDeepObject = { } return `${type} verwijderen`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'reactie'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -909,16 +874,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Deze chatruimte is gearchiveerd.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `Deze chat is niet meer actief omdat ${displayName} de account heeft gesloten.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Deze chat is niet meer actief omdat ${displayName} de account heeft gesloten.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Deze chat is niet langer actief omdat ${oldDisplayName} zijn of haar account heeft samengevoegd met ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Deze chat is niet meer actief omdat je geen lid meer bent van de ${policyName}-werkruimte.` : `Deze chat is niet meer actief omdat ${displayName} geen lid meer is van de ${policyName}-werkruimte.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Deze chat is niet langer actief omdat ${policyName} geen actief werkruimte meer is.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Deze chat is niet langer actief omdat ${policyName} geen actief werkruimte meer is.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Deze boeking is gearchiveerd.', }, @@ -1397,7 +1362,7 @@ const translations: TranslationDeepObject = { canceledRequest: (amount: string, submitterDisplayName: string) => `heeft de betaling van ${amount} geannuleerd, omdat ${submitterDisplayName} hun Expensify Wallet niet binnen 30 dagen heeft geactiveerd`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} heeft een bankrekening toegevoegd. De betaling van ${amount} is voltooid.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}gemarkeerd als betaald${comment ? `, met de opmerking: "${comment}"` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}gemarkeerd als betaald${comment ? `, met de opmerking: "${comment}"` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}betaald met wallet`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}betaald met Expensify via werkruimteregels`, @@ -1454,7 +1419,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `voor ${comment}` : 'uitgave'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Factuurrapport nr. ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} verzonden${comment ? `voor ${comment}` : ''}`, - movedFromPersonalSpace: ({reportName, workspaceName}: MovedFromPersonalSpaceParams) => + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `heeft uitgave verplaatst van persoonlijke ruimte naar ${workspaceName ?? `chat met ${reportName}`}`, movedToPersonalSpace: 'heeft uitgave verplaatst naar persoonlijke ruimte', error: { @@ -1775,10 +1740,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Foto bekijken', imageUploadFailed: 'Uploaden van afbeelding is mislukt', deleteWorkspaceError: 'Sorry, er is een onverwacht probleem opgetreden bij het verwijderen van je workspace-avatar', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `De geselecteerde afbeelding overschrijdt de maximale uploadgrootte van ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `De geselecteerde afbeelding overschrijdt de maximale uploadgrootte van ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Upload een afbeelding die groter is dan ${minHeightInPx}x${minWidthInPx} pixels en kleiner dan ${maxHeightInPx}x${maxWidthInPx} pixels.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `Profielfoto moet een van de volgende typen zijn: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `Profielfoto moet een van de volgende typen zijn: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Profielfoto bewerken', @@ -2452,7 +2417,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'verbinden via Plaid.', fixCard: 'Kaart herstellen', brokenConnection: 'Je kaartkoppeling is verbroken.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `Je verbinding met de kaart ${cardName} is verbroken. Log in bij je bank om de kaart te herstellen.` : `Je verbinding met de kaart ${cardName} is verbroken. Log in bij je bank om de kaart te herstellen.`, @@ -3555,7 +3520,7 @@ ${amount} voor ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Je wijst ${nameOrEmail} aan als jouw vervang(st)er tijdens afwezigheid. Diegene zit nog niet in al je werkruimtes. Als je doorgaat, wordt er een e-mail naar alle beheerders van je werkruimtes gestuurd om diegene toe te voegen.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Stap ${step}`; if (total) { result = `${result} of ${total}`; @@ -4432,7 +4397,7 @@ ${amount} voor ${merchant} - ${date}`, subscription: 'Abonnement', markAsEntered: 'Markeren als handmatig ingevoerd', markAsExported: 'Markeren als geëxporteerd', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Exporteren naar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Exporteren naar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Laten we nog even controleren of alles er goed uitziet.', lineItemLevel: 'Op regelniveau', reportLevel: 'Rapportniveau', @@ -4443,11 +4408,11 @@ ${amount} voor ${merchant} - ${date}`, content: (adminsRoomLink: string) => `Deel deze QR-code of kopieer de link hieronder om het leden makkelijk te maken toegang tot je werkruimte aan te vragen. Alle verzoeken om lid te worden van de werkruimte verschijnen in de ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS}-ruimte ter beoordeling.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Verbind met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Verbind met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Nieuwe verbinding maken', reuseExistingConnection: 'Bestaande verbinding hergebruiken', existingConnections: 'Bestaande verbindingen', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Omdat je eerder verbinding hebt gemaakt met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}, kun je ervoor kiezen een bestaande verbinding opnieuw te gebruiken of een nieuwe verbinding te maken.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Laatst gesynchroniseerd op ${formattedDate}`, authenticationError: (connectionName: string) => `Kan geen verbinding maken met ${connectionName} vanwege een verificatiefout.`, @@ -5444,7 +5409,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ one: '1 UDD toegevoegd', other: (count: number) => `${count} UDD's toegevoegd`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'afdelingen'; @@ -6080,7 +6045,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ reportFieldNameRequiredError: 'Voer een naam voor een rapportveld in', reportFieldTypeRequiredError: 'Kies een veldtype voor het rapport', circularReferenceError: 'Dit veld kan niet naar zichzelf verwijzen. Werk het alsjeblieft bij.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Formuleveld ${value} niet herkend`, + unsupportedFormulaValueError: (value: string) => `Formuleveld ${value} niet herkend`, reportFieldInitialValueRequiredError: 'Kies een beginwaarde voor een rapportveld', genericFailureMessage: 'Er is een fout opgetreden bij het bijwerken van het rapportveld. Probeer het opnieuw.', }, @@ -6425,7 +6390,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ talkYourAccountManager: 'Chat met je accountmanager.', talkToConcierge: 'Chat met Concierge.', needAnotherAccounting: 'Nog een boekhoudprogramma nodig?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6453,13 +6418,13 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ syncNow: 'Nu synchroniseren', disconnect: 'Verbinding verbreken', reinstall: 'Connector opnieuw installeren', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integratie'; return `Verbinding met ${integrationName} verbreken`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Verbind ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'boekhoudintegratie'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `Verbind ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'boekhoudintegratie'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Kan geen verbinding maken met QuickBooks Online'; @@ -6488,12 +6453,12 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Geïmporteerd als rapportvelden', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Standaard NetSuite-medewerker', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'deze integratie'; return `Weet je zeker dat je ${integrationName} wilt ontkoppelen?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Weet je zeker dat je ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'deze boekhoudkoppeling'} wilt koppelen? Hierdoor worden alle bestaande boekhoudkundige koppelingen verwijderd.`, enterCredentials: 'Voer je inloggegevens in', reconnect: 'Opnieuw verbinden', @@ -6513,7 +6478,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6887,10 +6852,7 @@ Als je de facturering voor hun volledige abonnement wilt overnemen, laat hen je }, exportAgainModal: { title: 'Voorzichtig!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `De volgende rapporten zijn al geëxporteerd naar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Weet je zeker dat je ze opnieuw wilt exporteren? + description: (reportName: string, connectionName: ConnectionName) => `De volgende rapporten zijn al geëxporteerd naar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Weet je zeker dat je ze opnieuw wilt exporteren? ${reportName}`, confirmText: 'Ja, opnieuw exporteren', @@ -7576,7 +7538,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, }, description: 'Kies een abonnement dat bij je past.', subscriptionLink: 'Meer informatie', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Je hebt je vastgelegd op 1 actief lid in het Control-abonnement tot je jaarlijkse abonnement afloopt op ${annualSubscriptionEndDate}. Je kunt overstappen op een pay-per-use-abonnement en downgraden naar het Collect-abonnement vanaf ${annualSubscriptionEndDate} door automatisch verlengen uit te schakelen in`, other: `Je hebt je vastgelegd op ${count} actieve leden op het Control-abonnement totdat je jaarlijkse abonnement eindigt op ${annualSubscriptionEndDate}. Je kunt overschakelen naar een betaling-per-gebruik-abonnement en downgraden naar het Collect-abonnement vanaf ${annualSubscriptionEndDate} door automatisch verlengen uit te schakelen in`, }), @@ -7616,7 +7578,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, }, custom: {label: 'Aangepaste goedkeuring', description: 'Ik stel goedkeuringsworkflows handmatig in in Expensify.'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Gusto-medewerkers synchroniseren'; @@ -7883,7 +7845,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, !oldDescription ? `stel de beschrijving van deze workspace in op "${newDescription}"` : `heeft de beschrijving van deze workspace bijgewerkt naar „${newDescription}” (voorheen „${oldDescription}”)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7902,7 +7864,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `heeft de standaardvaluta bijgewerkt naar ${newCurrency} (voorheen ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `heeft de frequentie van automatisch rapporteren gewijzigd naar ‘${newFrequency}’ (voorheen ‘${oldFrequency}’)`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `heeft de goedkeuringsmodus gewijzigd naar ‘${newValue}’ (voorheen ‘${oldValue}’)`, + updateApprovalMode: (newValue: string, oldValue?: string) => `heeft de goedkeuringsmodus gewijzigd naar ‘${newValue}’ (voorheen ‘${oldValue}’)`, upgradedWorkspace: 'heeft deze workspace geüpgraded naar het Control-abonnement', forcedCorporateUpgrade: `Deze werkruimte is geüpgraded naar het Control-abonnement. Klik hier voor meer informatie.`, downgradedWorkspace: 'heeft deze workspace teruggezet naar het Collect-abonnement', @@ -8650,8 +8612,8 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, connectionSettings: 'Verbindingsinstellingen', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `heeft ${fieldName} gewijzigd in „${newValue}” (voorheen „${oldValue}”)`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `stel ${fieldName} in op "${newValue}"`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `heeft ${fieldName} gewijzigd in „${newValue}” (voorheen „${oldValue}”)`, + changeFieldEmpty: (newValue: string, fieldName: string) => `stel ${fieldName} in op "${newValue}"`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `heeft de werkruimte${fromPolicyName ? `(voorheen ${fromPolicyName})` : ''} gewijzigd`; @@ -8683,7 +8645,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, managerAttachReceipt: `heeft een bonnetje toegevoegd`, managerDetachReceipt: `heeft een bon verwijderd`, markedReimbursed: (amount: string, currency: string) => `elders ${currency}${amount} betaald`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `heeft ${currency}${amount} betaald via integratie`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `heeft ${currency}${amount} betaald via integratie`, outdatedBankAccount: `kon de betaling niet verwerken vanwege een probleem met de bankrekening van de betaler`, reimbursementACHBounceDefault: `kon de betaling niet verwerken vanwege een verkeerd bank-/rekeningnummer of een gesloten rekening`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `kon de betaling niet verwerken: ${returnReason}`, @@ -8692,8 +8654,8 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, reimbursementDelayed: `heeft de betaling verwerkt, maar deze is nog 1-2 extra werkdagen vertraagd`, selectedForRandomAudit: `willekeurig geselecteerd voor beoordeling`, selectedForRandomAuditMarkdown: `willekeurig geselecteerd voor controle`, - share: ({to}: ShareParams) => `heeft lid ${to} uitgenodigd`, - unshare: ({to}: UnshareParams) => `heeft lid ${to} verwijderd`, + share: (to: string) => `heeft lid ${to} uitgenodigd`, + unshare: (to: string) => `heeft lid ${to} verwijderd`, stripePaid: (amount: string, currency: string) => `betaald ${currency}${amount}`, takeControl: `nam de controle over`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8708,7 +8670,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, const article = role === CONST.POLICY.ROLE.AUDITOR ? 'een' : 'een'; return didJoinPolicy ? `${email} is lid geworden via de uitnodigingslink voor de workspace` : `${email} toegevoegd als ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `heeft de rol van ${email} bijgewerkt naar ${newRole} (voorheen ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `heeft de rol van ${email} bijgewerkt naar ${newRole} (voorheen ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `heeft aangepaste veld 1 van ${email} verwijderd (voorheen "${previousValue}")`; @@ -8727,8 +8689,8 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} heeft de workspace verlaten`, removeMember: (email: string, role: string) => `${role} ${email} verwijderd`, - removedConnection: ({connectionName}: ConnectionNameParams) => `verbinding met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} verwijderd`, - addedConnection: ({connectionName}: ConnectionNameParams) => `verbonden met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `verbinding met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} verwijderd`, + addedConnection: (connectionName: AllConnectionName) => `verbonden met ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'heeft de chat verlaten', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `zakelijke bankrekening ${maskedBankAccountNumber} is automatisch vergrendeld vanwege een probleem met terugbetalingen of Expensify Kaart-afwikkeling. Los het probleem op in je werkruimte-instellingen.`, @@ -8838,7 +8800,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, reply: 'Beantwoorden', from: 'Van', in: 'in', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `Van ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `Van ${reportName}${workspaceName ? `in ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'QR-code', @@ -9094,7 +9056,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, missingComment: 'Beschrijving vereist voor geselecteerde categorie', missingAttendees: 'Meerdere deelnemers vereist voor deze categorie', missingTag: (tagName?: string) => `Ontbreekt ${tagName ?? 'label'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Bedrag wijkt af van berekende afstand'; @@ -9108,7 +9070,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, } }, modifiedDate: 'Datum wijkt af van gescande bon', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `Afstand overschrijdt de berekende route van ${formattedRouteDistance}` : 'Afstand overschrijdt de berekende route', nonExpensiworksExpense: 'Niet-Expensiworks-uitgave', overAutoApprovalLimit: (formattedLimit: string) => `Kosten overschrijden de automatische goedkeuringslimiet van ${formattedLimit}`, @@ -9412,8 +9374,8 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, collect: { title: 'Incasseren', description: 'Het kleinzakelijke abonnement dat je onkosten, reizen en chat biedt.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, + priceAnnual: (lower: string, upper: string) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, + pricePayPerUse: (lower: string, upper: string) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, benefit1: 'Bonnetjes scannen', benefit2: 'Terugbetalingen', benefit3: 'Beheer van bedrijfskaarten', @@ -9426,8 +9388,8 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, control: { title: 'Beheer', description: 'Declareren, reizen en chatten voor grotere bedrijven.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, + priceAnnual: (lower: string, upper: string) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, + pricePayPerUse: (lower: string, upper: string) => `Van ${lower}/actief lid met de Expensify Kaart, ${upper}/actief lid zonder de Expensify Kaart.`, benefit1: 'Alles in het Collect-abonnement', benefit2: 'Meerlagige goedkeuringsworkflows', benefit3: 'Aangepaste onkostregels', @@ -9564,7 +9526,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, addCopilot: 'Co-piloot toevoegen', membersCanAccessYourAccount: 'Deze leden hebben toegang tot je account:', youCanAccessTheseAccounts: 'Je hebt toegang tot deze accounts:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Volledig'; @@ -9579,7 +9541,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, accessLevel: 'Toegangsniveau', confirmCopilot: 'Bevestig je copiloot hieronder.', accessLevelDescription: 'Kies hieronder een toegangs­niveau. Zowel Volledige als Beperkte toegang geven copilots de mogelijkheid om alle gesprekken en uitgaven te bekijken.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Sta een ander lid toe om alle acties in je account namens jou uit te voeren. Omvat chatten, indienen, goedkeuren, betalingen, het bijwerken van instellingen en meer.'; @@ -9605,7 +9567,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, `Als copiloot voor ${accountOwnerEmail} heb je geen toestemming om deze actie uit te voeren. Sorry!`, removeCopilotAccess: 'Mijn copilot-toegang verwijderen', removeCopilotAccessTitle: 'Copilot-toegang verwijderen?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Weet je zeker dat je je copilot-toegang tot het Expensify-account van ${delegatorName} wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.`, removeCopilotAccessConfirm: 'Toegang verwijderen', copilotAccess: 'Copilot-toegang', @@ -9619,9 +9581,9 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, nothingToPreview: 'Niets om te bekijken', editJson: 'JSON bewerken:', preview: 'Voorbeeld:', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} ontbreekt`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Ongeldige eigenschap: ${propertyName} - Verwacht: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Ongeldige waarde - Verwacht: ${expectedValues}`, + missingProperty: (propertyName: string) => `${propertyName} ontbreekt`, + invalidProperty: (propertyName: string, expectedType: string) => `Ongeldige eigenschap: ${propertyName} - Verwacht: ${expectedType}`, + invalidValue: (expectedValues: string) => `Ongeldige waarde - Verwacht: ${expectedValues}`, missingValue: 'Ontbrekende waarde', createReportAction: 'Actie rapport maken', reportAction: 'Rapportactie', diff --git a/src/languages/params.ts b/src/languages/params.ts index b9c0884faab4..d6b9f04a0ffa 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -1,59 +1,7 @@ -import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; -import type {DelegateRole} from '@src/types/onyx/Account'; -import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; -import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; - -type EditActionParams = { - action: OnyxInputOrEntry; -}; - -type DeleteActionParams = { - action: OnyxInputOrEntry; -}; - -type DeleteConfirmationParams = { - action: OnyxInputOrEntry; -}; - -type ReportArchiveReasonsClosedParams = { - displayName: string; -}; - -type ReportArchiveReasonsMergedParams = { - displayName: string; - oldDisplayName: string; -}; - -type ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams = { - policyName: string; -}; - -type ReportArchiveReasonsRemovedFromPolicyParams = { - displayName: string; - policyName: string; - shouldUseYou?: boolean; -}; - -type PaidElsewhereParams = {payer?: string; comment?: string}; - -type MovedFromPersonalSpaceParams = {workspaceName?: string; reportName?: string}; - -type ResolutionConstraintsParams = {minHeightInPx: number; minWidthInPx: number; maxHeightInPx: number; maxWidthInPx: number}; - -type SizeExceededParams = {maxUploadSizeInMB: number}; - -type NotAllowedExtensionParams = {allowedExtensions: string[]}; - type StepCounterParams = {step: number; total?: number; text?: string}; type ParentNavigationSummaryParams = {reportName?: string; workspaceName?: string}; -type ViolationsModifiedAmountParams = {type?: ViolationDataType; displayPercentVariance?: number}; - -type ViolationsIncreasedDistanceParams = {formattedRouteDistance?: string}; - -type OptionalParam = Partial; - type ChangeFieldParams = {oldValue?: string; newValue: string; fieldName: string}; type ExportedToIntegrationParams = {label: string; markedManually?: boolean; inProgress?: boolean; lastModified?: string}; @@ -75,100 +23,15 @@ type MarkReimbursedFromIntegrationParams = {amount: string; currency: string}; type ShareParams = {to: string}; -type UnsupportedFormulaValueErrorParams = { - value: string; -}; - type UnshareParams = {to: string}; -type ConnectionNameParams = { - connectionName: AllConnectionName; -}; - -type ExportAgainModalDescriptionParams = { - reportName: string; - connectionName: ConnectionName; -}; - -type UpdateRoleParams = {email: string; currentRole: string; newRole: string}; - -type YourPlanPriceParams = {lower: string; upper: string}; - -type ExportIntegrationSelectedParams = {connectionName: ConnectionName}; - -type IntacctMappingTitleParams = {mappingName: SageIntacctMappingName}; - -type SyncStageNameConnectionsParams = {stage: PolicyConnectionSyncStage}; - -type DelegateRoleParams = {role: DelegateRole}; - -type RemoveCopilotAccessConfirmationParams = {delegatorName: string}; - -type RemovedFromApprovalWorkflowParams = { - submittersNames: string[]; -}; - -type MissingPropertyParams = { - propertyName: string; -}; - -type InvalidPropertyParams = { - propertyName: string; - expectedType: string; -}; - -type InvalidValueParams = { - expectedValues: string; -}; - -type WorkspaceLockedPlanTypeParams = { - count: number; - annualSubscriptionEndDate: string; -}; - -type ConciergeBrokenCardConnectionParams = { - cardName: string; - connectionLink?: string; -}; - export type { - MissingPropertyParams, - InvalidPropertyParams, - InvalidValueParams, - RemovedFromApprovalWorkflowParams, - DelegateRoleParams, - RemoveCopilotAccessConfirmationParams, - SyncStageNameConnectionsParams, - IntacctMappingTitleParams, - ExportIntegrationSelectedParams, - YourPlanPriceParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, ParentNavigationSummaryParams, - PaidElsewhereParams, - ConciergeBrokenCardConnectionParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - SizeExceededParams, StepCounterParams, - ViolationsModifiedAmountParams, - ViolationsIncreasedDistanceParams, ChangeFieldParams, ExportedToIntegrationParams, IntegrationsMessageParams, MarkReimbursedFromIntegrationParams, ShareParams, UnshareParams, - UnsupportedFormulaValueErrorParams, - ConnectionNameParams, - ExportAgainModalDescriptionParams, - UpdateRoleParams, - OptionalParam, - WorkspaceLockedPlanTypeParams, }; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 56cc410a07fe..26c1cadbd3b2 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -816,8 +781,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'Skopiuj e-mail do schowka', markAsUnread: 'Oznacz jako nieprzeczytane', markAsRead: 'Oznacz jako przeczytane', - editAction: ({action}: EditActionParams) => `Edytuj ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'wydatek' : 'komentarz'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Edytuj ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'wydatek' : 'komentarz'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'komentarz'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -826,7 +791,7 @@ const translations: TranslationDeepObject = { } return `Usuń ${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'komentarz'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -910,17 +875,17 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Ten czat został zarchiwizowany.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Ten czat nie jest już aktywny, ponieważ ${displayName} zamknął(-ęła) swoje konto.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Ten czat nie jest już aktywny, ponieważ ${oldDisplayName} połączył(-a) swoje konto z ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Ten czat nie jest już aktywny, ponieważ nie jesteś już członkiem przestrzeni roboczej ${policyName}.` : `Ten czat nie jest już aktywny, ponieważ ${displayName} nie jest już członkiem przestrzeni roboczej ${policyName}.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Ten czat nie jest już aktywny, ponieważ ${policyName} nie jest już aktywnym obszarem roboczym.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Ten czat nie jest już aktywny, ponieważ ${policyName} nie jest już aktywnym obszarem roboczym.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Ta rezerwacja jest zarchiwizowana.', }, @@ -1397,7 +1362,7 @@ const translations: TranslationDeepObject = { canceledRequest: (amount: string, submitterDisplayName: string) => `anulowano płatność ${amount}, ponieważ ${submitterDisplayName} nie aktywował(-a) swojego portfela Expensify w ciągu 30 dni`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} dodał konto bankowe. Płatność w wysokości ${amount} została wykonana.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}oznaczone jako opłacone${comment ? `, mówiąc „${comment}”` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}oznaczone jako opłacone${comment ? `, mówiąc „${comment}”` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}zapłacono z portfela`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}zapłacono przez Expensify za pomocą reguł przestrzeni roboczej`, @@ -1454,7 +1419,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `dla ${comment}` : 'wydatek'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Raport faktury nr ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `Wysłano ${formattedAmount}${comment ? `za ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `przeniesiono wydatek z przestrzeni osobistej do ${workspaceName ?? `czat z ${reportName}`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `przeniesiono wydatek z przestrzeni osobistej do ${workspaceName ?? `czat z ${reportName}`}`, movedToPersonalSpace: 'przeniesiono wydatek do przestrzeni prywatnej', error: { invalidCategoryLength: 'Nazwa kategorii przekracza 255 znaków. Skróć ją lub wybierz inną kategorię.', @@ -1776,10 +1741,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Zobacz zdjęcie', imageUploadFailed: 'Nie udało się przesłać obrazu', deleteWorkspaceError: 'Przepraszamy, wystąpił nieoczekiwany problem podczas usuwania awatara Twojego przestrzeni roboczej', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `Wybrany obraz przekracza maksymalny rozmiar przesyłania ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `Wybrany obraz przekracza maksymalny rozmiar przesyłania ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Prześlij obraz o rozmiarze większym niż ${minHeightInPx}x${minWidthInPx} pikseli i mniejszym niż ${maxHeightInPx}x${maxWidthInPx} pikseli.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `Zdjęcie profilowe musi być jednym z następujących typów: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `Zdjęcie profilowe musi być jednym z następujących typów: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Edytuj zdjęcie profilowe', @@ -2452,7 +2417,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'połączyć się przez Plaid.', fixCard: 'Napraw kartę', brokenConnection: 'Połączenie Twojej karty jest przerwane.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `Połączenie Twojej karty ${cardName} jest przerwane. Zaloguj się do swojego banku, aby naprawić kartę.` : `Połączenie Twojej karty ${cardName} jest przerwane. Zaloguj się do swojego banku, aby naprawić kartę.`, @@ -3547,7 +3512,7 @@ ${amount} dla ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Przydzielasz ${nameOrEmail} jako osobę zastępującą Cię podczas urlopu. Nie jest ona jeszcze we wszystkich Twoich przestrzeniach roboczych. Jeśli zdecydujesz się kontynuować, do wszystkich administratorów Twoich przestrzeni roboczych zostanie wysłany e-mail z prośbą o dodanie jej.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Krok ${step}`; if (total) { result = `${result} of ${total}`; @@ -4425,7 +4390,7 @@ ${amount} dla ${merchant} - ${date}`, subscription: 'Subskrypcja', markAsEntered: 'Oznacz jako wprowadzone ręcznie', markAsExported: 'Oznacz jako wyeksportowane', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Eksportuj do ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Eksportuj do ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Sprawdźmy jeszcze raz, czy wszystko wygląda poprawnie.', lineItemLevel: 'Poziom pozycji liniowej', reportLevel: 'Poziom raportu', @@ -4436,11 +4401,11 @@ ${amount} dla ${merchant} - ${date}`, content: (adminsRoomLink: string) => `Udostępnij ten kod QR lub skopiuj poniższy link, aby członkowie mogli łatwo poprosić o dostęp do Twojego obszaru roboczego. Wszystkie prośby o dołączenie do obszaru roboczego pojawią się w pokoju ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} do Twojej weryfikacji.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Połącz z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Połącz z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Utwórz nowe połączenie', reuseExistingConnection: 'Użyj istniejącego połączenia', existingConnections: 'Istniejące połączenia', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Ponieważ wcześniej połączyłeś(-aś) się z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}, możesz ponownie użyć istniejącego połączenia lub utworzyć nowe.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} – Ostatnia synchronizacja ${formattedDate}`, authenticationError: (connectionName: string) => `Nie można połączyć z ${connectionName} z powodu błędu uwierzytelniania.`, @@ -5437,7 +5402,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy one: 'Dodano 1 UDD', other: (count: number) => `Dodano ${count} polecenia zapłaty UDD`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'działy'; @@ -6075,7 +6040,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy reportFieldNameRequiredError: 'Wprowadź nazwę pola raportu', reportFieldTypeRequiredError: 'Wybierz typ pola raportu', circularReferenceError: 'To pole nie może odnosić się do siebie. Zaktualizuj je.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Pole formuły ${value} nie zostało rozpoznane`, + unsupportedFormulaValueError: (value: string) => `Pole formuły ${value} nie zostało rozpoznane`, reportFieldInitialValueRequiredError: 'Wybierz początkową wartość pola raportu', genericFailureMessage: 'Wystąpił błąd podczas aktualizowania pola raportu. Spróbuj ponownie.', }, @@ -6421,7 +6386,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy talkYourAccountManager: 'Porozmawiaj ze swoim opiekunem konta.', talkToConcierge: 'Czat z Concierge.', needAnotherAccounting: 'Potrzebujesz innego programu księgowego?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6449,13 +6414,13 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy syncNow: 'Synchronizuj teraz', disconnect: 'Rozłącz', reinstall: 'Zainstaluj ponownie konektor', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integracja'; return `Odłącz ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Połącz ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integracja z księgowością'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `Połącz ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integracja z księgowością'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Nie można połączyć się z QuickBooks Online'; @@ -6484,12 +6449,12 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Zaimportowano jako pola raportu', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Domyślny pracownik NetSuite', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'ta integracja'; return `Czy na pewno chcesz odłączyć ${integrationName}?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Czy na pewno chcesz połączyć ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'ta integracja księgowa'}? Spowoduje to usunięcie wszystkich istniejących połączeń księgowych.`, enterCredentials: 'Wprowadź swoje dane logowania', reconnect: 'Połącz ponownie', @@ -6509,7 +6474,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6881,10 +6846,7 @@ Jeśli chcesz przejąć rozliczenia za całą ich subskrypcję, poproś ich najp }, exportAgainModal: { title: 'Uwaga!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `Następujące raporty zostały już wyeksportowane do ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Na pewno chcesz wyeksportować je ponownie? + description: (reportName: string, connectionName: ConnectionName) => `Następujące raporty zostały już wyeksportowane do ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Na pewno chcesz wyeksportować je ponownie? ${reportName}`, confirmText: 'Tak, wyeksportuj ponownie', @@ -7569,7 +7531,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, }, description: 'Wybierz plan odpowiedni dla siebie.', subscriptionLink: 'Dowiedz się więcej', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Zobowiązałeś(-aś) się do 1 aktywnego członka w planie Control do końca rocznej subskrypcji ${annualSubscriptionEndDate}. Możesz przejść na subskrypcję z rozliczaniem za użycie i zmienić plan na Collect od ${annualSubscriptionEndDate}, wyłączając automatyczne odnawianie w`, other: `Zobowiązałeś(-aś) się do ${count} aktywnych członków w planie Control do końca rocznej subskrypcji ${annualSubscriptionEndDate}. Możesz przejść na subskrypcję płatną za użycie i zmienić plan na Collect od ${annualSubscriptionEndDate}, wyłączając automatyczne odnawianie w`, }), @@ -7609,7 +7571,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, }, custom: {label: 'Niestandardowe zatwierdzanie', description: 'Ręcznie skonfiguruję procesy zatwierdzania w Expensify.'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Synchronizowanie pracowników Gusto'; @@ -7877,7 +7839,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `zaktualizowano nazwę tego obszaru roboczego na „${newName}” (wcześniej „${oldName}”)`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `ustaw opis tego obszaru roboczego na „${newDescription}”` : `zaktualizowano opis tego workspace’u na „${newDescription}” (wcześniej „${oldDescription}”)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7896,7 +7858,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `zaktualizowano domyślną walutę na ${newCurrency} (wcześniej ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `zaktualizowano częstotliwość automatycznego raportowania na „${newFrequency}” (poprzednio „${oldFrequency}”)`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `zaktualizowano tryb zatwierdzania na „${newValue}” (wcześniej „${oldValue}”)`, + updateApprovalMode: (newValue: string, oldValue?: string) => `zaktualizowano tryb zatwierdzania na „${newValue}” (wcześniej „${oldValue}”)`, upgradedWorkspace: 'zaktualizowano ten workspace do planu Control', forcedCorporateUpgrade: `Ta przestrzeń robocza została zaktualizowana do planu Control. Kliknij tutaj, aby uzyskać więcej informacji.`, downgradedWorkspace: 'zmniejszono plan tego workspace’u do Collect', @@ -8642,8 +8604,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, connectionSettings: 'Ustawienia połączenia', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `zmieniono ${fieldName} na „${newValue}” (wcześniej „${oldValue}”)`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `ustaw ${fieldName} na „${newValue}”`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `zmieniono ${fieldName} na „${newValue}” (wcześniej „${oldValue}”)`, + changeFieldEmpty: (newValue: string, fieldName: string) => `ustaw ${fieldName} na „${newValue}”`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `zmieniono przestrzeń roboczą${fromPolicyName ? `(wcześniej ${fromPolicyName})` : ''}`; @@ -8675,7 +8637,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, managerAttachReceipt: `dodano paragon`, managerDetachReceipt: `usunął(-ę) paragon`, markedReimbursed: (amount: string, currency: string) => `zapłacono ${currency}${amount} gdzie indziej`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `zapłacono ${currency}${amount} przez integrację`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `zapłacono ${currency}${amount} przez integrację`, outdatedBankAccount: `nie można było przetworzyć płatności z powodu problemu z kontem bankowym płatnika`, reimbursementACHBounceDefault: `nie udało się przetworzyć płatności z powodu nieprawidłowego numeru rozliczeniowego/konta lub zamkniętego konta`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `nie udało się przetworzyć płatności: ${returnReason}`, @@ -8684,8 +8646,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, reimbursementDelayed: `przetworzono płatność, ale jest opóźniona o kolejne 1–2 dni robocze`, selectedForRandomAudit: `losowo wybrane do weryfikacji`, selectedForRandomAuditMarkdown: `[losowo wybrany](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) do weryfikacji`, - share: ({to}: ShareParams) => `zaprosił(-a) członka ${to}`, - unshare: ({to}: UnshareParams) => `usunięto członka ${to}`, + share: (to: string) => `zaprosił(-a) członka ${to}`, + unshare: (to: string) => `usunięto członka ${to}`, stripePaid: (amount: string, currency: string) => `zapłacono ${currency}${amount}`, takeControl: `przejął kontrolę`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8700,7 +8662,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, const article = role === CONST.POLICY.ROLE.AUDITOR ? 'an' : 'a'; return didJoinPolicy ? `${email} dołączył za pomocą linku z zaproszeniem do przestrzeni roboczej` : `dodano ${email} jako ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `zaktualizowano rolę użytkownika ${email} na ${newRole} (wcześniej ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `zaktualizowano rolę użytkownika ${email} na ${newRole} (wcześniej ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `usunięto własne pole 1 użytkownika ${email} (wcześniej „${previousValue}”)`; @@ -8719,8 +8681,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} opuścił(-a) przestrzeń roboczą`, removeMember: (email: string, role: string) => `usunięto ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `usunięto połączenie z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}: ConnectionNameParams) => `połączono z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `usunięto połączenie z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName: AllConnectionName) => `połączono z ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'opuścił czat', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `firmowe konto bankowe ${maskedBankAccountNumber} zostało automatycznie zablokowane z powodu problemu z rozliczeniami zwrotów lub Karty Expensify. Napraw problem w ustawieniach przestrzeni roboczej.`, @@ -8830,7 +8792,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, reply: 'Odpowiedz', from: 'Od', in: 'w', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `Z raportu ${reportName}${workspaceName ? `w ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `Z raportu ${reportName}${workspaceName ? `w ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'Kod QR', @@ -9082,7 +9044,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, missingComment: 'Wymagany opis dla wybranej kategorii', missingAttendees: 'Wymaganych jest wielu uczestników dla tej kategorii', missingTag: (tagName?: string) => `Brak ${tagName ?? 'etykieta'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Kwota różni się od obliczonego dystansu'; @@ -9096,7 +9058,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, } }, modifiedDate: 'Data różni się od zeskanowanego paragonu', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `Dystans przekracza obliczoną trasę ${formattedRouteDistance}` : 'Dystans przekracza obliczoną trasę', nonExpensiworksExpense: 'Wydatek spoza Expensiworks', overAutoApprovalLimit: (formattedLimit: string) => `Wydatek przekracza automatyczny limit zatwierdzania w wysokości ${formattedLimit}`, @@ -9399,8 +9361,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, collect: { title: 'Zbierz', description: 'Plan dla małych firm, który zapewnia wydatki, podróże i czat.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, + priceAnnual: (lower: string, upper: string) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, benefit1: 'Skanowanie paragonów', benefit2: 'Zwroty kosztów', benefit3: 'Zarządzanie kartami służbowymi', @@ -9413,8 +9375,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, control: { title: 'Sterowanie', description: 'Wydatki, podróże służbowe i czat dla większych firm.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, + priceAnnual: (lower: string, upper: string) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `Od ${lower}/aktywnego członka z Kartą Expensify do ${upper}/aktywnego członka bez Karty Expensify.`, benefit1: 'Wszystko w pakiecie Collect', benefit2: 'Wielopoziomowe przepływy zatwierdzania', benefit3: 'Niestandardowe zasady wydatków', @@ -9551,7 +9513,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, addCopilot: 'Dodaj kopilota', membersCanAccessYourAccount: 'Ci członkowie mają dostęp do Twojego konta:', youCanAccessTheseAccounts: 'Masz dostęp do tych kont:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Pełny'; @@ -9566,7 +9528,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, accessLevel: 'Poziom dostępu', confirmCopilot: 'Potwierdź swojego kopilota poniżej.', accessLevelDescription: 'Wybierz poziom dostępu poniżej. Zarówno Pełny, jak i Ograniczony dostęp pozwalają współprowadzącym przeglądać wszystkie konwersacje i wydatki.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Pozwól innemu członkowi wykonywać w Twoim imieniu wszystkie działania na Twoim koncie. Obejmuje to czat, zgłoszenia, zatwierdzenia, płatności, aktualizacje ustawień i więcej.'; @@ -9590,7 +9552,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, `Jako kopilot dla ${accountOwnerEmail} nie masz uprawnień do wykonania tej akcji. Przepraszamy!`, removeCopilotAccess: 'Usuń mój dostęp kopilota', removeCopilotAccessTitle: 'Usunąć dostęp kopilota?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Czy na pewno chcesz usunąć swój dostęp kopilota do konta Expensify użytkownika ${delegatorName}? Tej czynności nie można cofnąć.`, removeCopilotAccessConfirm: 'Usuń dostęp', copilotAccess: 'Dostęp do Copilota', @@ -9604,9 +9566,9 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, nothingToPreview: 'Brak podglądu', editJson: 'Edytuj JSON:', preview: 'Podgląd:', - missingProperty: ({propertyName}: MissingPropertyParams) => `Brak pola ${propertyName}`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Nieprawidłowa właściwość: ${propertyName} – Oczekiwano: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Nieprawidłowa wartość – oczekiwano: ${expectedValues}`, + missingProperty: (propertyName: string) => `Brak pola ${propertyName}`, + invalidProperty: (propertyName: string, expectedType: string) => `Nieprawidłowa właściwość: ${propertyName} – Oczekiwano: ${expectedType}`, + invalidValue: (expectedValues: string) => `Nieprawidłowa wartość – oczekiwano: ${expectedValues}`, missingValue: 'Brak wartości', createReportAction: 'Utwórz działanie raportu', reportAction: 'Działanie raportu', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 47b2bb090447..ecb62a8c8c35 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -815,8 +780,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: 'Copiar e-mail para a área de transferência', markAsUnread: 'Marcar como não lida', markAsRead: 'Marcar como lida', - editAction: ({action}: EditActionParams) => `Editar ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'despesa' : 'comentário'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `Editar ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'despesa' : 'comentário'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = 'comentário'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -825,7 +790,7 @@ const translations: TranslationDeepObject = { } return `Excluir ${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'comentário'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -909,16 +874,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Esta sala de chat foi arquivada.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `Este chat não está mais ativo porque ${displayName} encerrou a conta.`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `Este chat não está mais ativo porque ${displayName} encerrou a conta.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `Este chat não está mais ativo porque ${oldDisplayName} uniu a conta a ${displayName}.`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `Este chat não está mais ativo porque você não é mais membro do workspace ${policyName}.` : `Este chat não está mais ativo porque ${displayName} não é mais membro do workspace ${policyName}.`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `Este chat não está mais ativo porque ${policyName} não é mais um espaço de trabalho ativo.`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `Este chat não está mais ativo porque ${policyName} não é mais um espaço de trabalho ativo.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Esta reserva está arquivada.', }, @@ -1396,7 +1361,7 @@ const translations: TranslationDeepObject = { adminCanceledRequest: 'cancelou o pagamento', canceledRequest: (amount: string, submitterDisplayName: string) => `cancelou o pagamento de ${amount} porque ${submitterDisplayName} não ativou a Carteira Expensify em 30 dias`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} adicionou uma conta bancária. O pagamento de ${amount} foi efetuado.`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}marcou como pago${comment ? `, dizendo "${comment}"` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}marcou como pago${comment ? `, dizendo "${comment}"` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}pago com carteira`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}pagos com Expensify via regras do workspace`, @@ -1453,7 +1418,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `para ${comment}` : 'despesa'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `Relatório de fatura nº ${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} enviado${comment ? `para ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `moveu a despesa do espaço pessoal para ${workspaceName ?? `conversar com ${reportName}`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `moveu a despesa do espaço pessoal para ${workspaceName ?? `conversar com ${reportName}`}`, movedToPersonalSpace: 'moveu a despesa para o espaço pessoal', error: { invalidCategoryLength: 'O nome da categoria excede 255 caracteres. Reduza-o ou escolha uma categoria diferente.', @@ -1769,10 +1734,10 @@ const translations: TranslationDeepObject = { viewPhoto: 'Ver foto', imageUploadFailed: 'Falha no envio da imagem', deleteWorkspaceError: 'Desculpe, ocorreu um problema inesperado ao excluir o avatar do seu workspace', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `A imagem selecionada excede o tamanho máximo de upload de ${maxUploadSizeInMB} MB.`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `A imagem selecionada excede o tamanho máximo de upload de ${maxUploadSizeInMB} MB.`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `Envie uma imagem maior que ${minHeightInPx}x${minWidthInPx} pixels e menor que ${maxHeightInPx}x${maxWidthInPx} pixels.`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `A foto do perfil deve ser um dos seguintes tipos: ${allowedExtensions.join(', ')}.`, + notAllowedExtension: (allowedExtensions: string[]) => `A foto do perfil deve ser um dos seguintes tipos: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Editar foto do perfil', @@ -2445,7 +2410,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'conectar via Plaid.', fixCard: 'Corrigir cartão', brokenConnection: 'A conexão do seu cartão está com problema.', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `A conexão do seu cartão ${cardName} está com problemas. Acesse seu banco para corrigir o cartão.` : `A conexão do seu cartão ${cardName} está com problemas. Acesse seu banco para corrigir o cartão.`, @@ -3544,7 +3509,7 @@ ${amount} para ${merchant} - ${date}`, vacationDelegateWarning: (nameOrEmail: string) => `Você está atribuindo ${nameOrEmail} como seu delegado de férias. Elu ainda não está em todos os seus espaços de trabalho. Se você decidir continuar, será enviado um e-mail a todos os admins dos seus espaços de trabalho para que elu seja adicionado.`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `Etapa ${step}`; if (total) { result = `${result} of ${total}`; @@ -4422,7 +4387,7 @@ ${amount} para ${merchant} - ${date}`, subscription: 'Assinatura', markAsEntered: 'Marcar como inserido manualmente', markAsExported: 'Marcar como exportado', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `Exportar para ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `Exportar para ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: 'Vamos conferir se está tudo certo.', lineItemLevel: 'Nível de item de linha', reportLevel: 'Nível do relatório', @@ -4433,11 +4398,11 @@ ${amount} para ${merchant} - ${date}`, content: (adminsRoomLink: string) => `Compartilhe este código QR ou copie o link abaixo para facilitar que membros solicitem acesso ao seu espaço de trabalho. Todas as solicitações para entrar no espaço de trabalho aparecerão na sala ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} para sua análise.`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `Conectar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `Conectar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: 'Criar nova conexão', reuseExistingConnection: 'Reutilizar conexão existente', existingConnections: 'Conexões existentes', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `Como você já se conectou a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} antes, pode optar por reutilizar uma conexão existente ou criar uma nova.`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Última sincronização em ${formattedDate}`, authenticationError: (connectionName: string) => `Não é possível conectar a ${connectionName} devido a um erro de autenticação.`, @@ -5434,7 +5399,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS one: '1 UDD adicionado', other: (count: number) => `${count} UDDs adicionados`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return 'departamentos'; @@ -6076,7 +6041,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS reportFieldNameRequiredError: 'Insira um nome de campo de relatório', reportFieldTypeRequiredError: 'Escolha um tipo de campo de relatório', circularReferenceError: 'Este campo não pode fazer referência a si mesmo. Atualize, por favor.', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `Campo de fórmula ${value} não reconhecido`, + unsupportedFormulaValueError: (value: string) => `Campo de fórmula ${value} não reconhecido`, reportFieldInitialValueRequiredError: 'Escolha um valor inicial para o campo de relatório', genericFailureMessage: 'Ocorreu um erro ao atualizar o campo do relatório. Tente novamente.', }, @@ -6421,7 +6386,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS talkYourAccountManager: 'Converse com seu gerente de conta.', talkToConcierge: 'Converse com o Concierge.', needAnotherAccounting: 'Precisa de outro software de contabilidade?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6449,13 +6414,13 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS syncNow: 'Sincronizar agora', disconnect: 'Desconectar', reinstall: 'Reinstalar conector', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'integração'; return `Desconectar ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `Conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integração contábil'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `Conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'integração contábil'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'Não é possível conectar ao QuickBooks Online'; @@ -6484,12 +6449,12 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado como campos de relatório', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'Padrão de funcionário do NetSuite', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : 'esta integração'; return `Tem certeza de que deseja desconectar ${integrationName}?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `Tem certeza de que deseja conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'esta integração contábil'}? Isso removerá quaisquer conexões contábeis existentes.`, enterCredentials: 'Insira suas credenciais', reconnect: 'Reconectar', @@ -6509,7 +6474,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6882,10 +6847,7 @@ Se você quiser assumir a cobrança de toda a assinatura deles, peça para que a }, exportAgainModal: { title: 'Cuidado!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `Os seguintes relatórios já foram exportados para ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Tem certeza de que quer exportá-los novamente? + description: (reportName: string, connectionName: ConnectionName) => `Os seguintes relatórios já foram exportados para ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}. Tem certeza de que quer exportá-los novamente? ${reportName}`, confirmText: 'Sim, exportar novamente', @@ -7571,7 +7533,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, }, description: 'Escolha o plano ideal para você.', subscriptionLink: 'Saiba mais', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `Você se comprometeu com 1 membro ativo no plano Control até o fim da sua assinatura anual em ${annualSubscriptionEndDate}. Você pode mudar para a assinatura pré-paga por uso e fazer downgrade para o plano Collect a partir de ${annualSubscriptionEndDate}, desativando a renovação automática em`, other: `Você se comprometeu com ${count} membros ativos no plano Control até o fim da sua assinatura anual em ${annualSubscriptionEndDate}. Você pode mudar para a assinatura pós-paga e fazer downgrade para o plano Collect a partir de ${annualSubscriptionEndDate} desativando a renovação automática em`, }), @@ -7611,7 +7573,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, }, custom: {label: 'Aprovação personalizada', description: 'Vou configurar manualmente os fluxos de aprovação no Expensify.'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Sincronizando funcionários do Gusto'; @@ -7877,7 +7839,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `atualizou o nome deste workspace para "${newName}" (anteriormente "${oldName}")`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `definir a descrição deste workspace como "${newDescription}"` : `atualizou a descrição deste workspace para "${newDescription}" (antes "${oldDescription}")`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7896,7 +7858,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `atualizou a moeda padrão para ${newCurrency} (anteriormente ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `atualizou a frequência de preenchimento automático para "${newFrequency}" (antes "${oldFrequency}")`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `atualizou o modo de aprovação para "${newValue}" (antes "${oldValue}")`, + updateApprovalMode: (newValue: string, oldValue?: string) => `atualizou o modo de aprovação para "${newValue}" (antes "${oldValue}")`, upgradedWorkspace: 'atualizou este workspace para o plano Control', forcedCorporateUpgrade: `Este workspace foi atualizado para o plano Control. Clique aqui para mais informações.`, downgradedWorkspace: 'rebaixou este espaço de trabalho para o plano Collect', @@ -8641,8 +8603,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, connectionSettings: 'Configurações de conexão', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `alterou ${fieldName} para "${newValue}" (antes "${oldValue}")`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `definir ${fieldName} como "${newValue}"`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `alterou ${fieldName} para "${newValue}" (antes "${oldValue}")`, + changeFieldEmpty: (newValue: string, fieldName: string) => `definir ${fieldName} como "${newValue}"`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `alterou o espaço de trabalho${fromPolicyName ? `(antes ${fromPolicyName})` : ''}`; @@ -8674,7 +8636,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, managerAttachReceipt: `adicionou um recibo`, managerDetachReceipt: `removeu um recibo`, markedReimbursed: (amount: string, currency: string) => `pagou ${currency}${amount} em outro lugar`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `pagou ${currency}${amount} via integração`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `pagou ${currency}${amount} via integração`, outdatedBankAccount: `não foi possível processar o pagamento devido a um problema com a conta bancária do pagador`, reimbursementACHBounceDefault: `não foi possível processar o pagamento devido a um número de roteamento/conta incorreto ou conta encerrada`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `não foi possível processar o pagamento: ${returnReason}`, @@ -8683,8 +8645,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, reimbursementDelayed: `processou o pagamento, mas ele será atrasado em mais 1–2 dias úteis`, selectedForRandomAudit: `selecionado aleatoriamente para revisão`, selectedForRandomAuditMarkdown: `[selecionado aleatoriamente](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) para revisão`, - share: ({to}: ShareParams) => `convidou o membro ${to}`, - unshare: ({to}: UnshareParams) => `removeu o membro ${to}`, + share: (to: string) => `convidou o membro ${to}`, + unshare: (to: string) => `removeu o membro ${to}`, stripePaid: (amount: string, currency: string) => `pagou ${currency}${amount}`, takeControl: `assumiu o controle`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8699,7 +8661,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, const article = role === CONST.POLICY.ROLE.AUDITOR ? 'um' : 'um'; return didJoinPolicy ? `${email} entrou pelo link de convite do workspace` : `adicionou ${email} como ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `atualizou a função de ${email} para ${newRole} (anteriormente ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `atualizou a função de ${email} para ${newRole} (anteriormente ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `removeu o campo personalizado 1 de ${email} (antes "${previousValue}")`; @@ -8718,8 +8680,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} saiu do espaço de trabalho`, removeMember: (email: string, role: string) => `removeu ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `removeu a conexão com ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, - addedConnection: ({connectionName}: ConnectionNameParams) => `conectado a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `removeu a conexão com ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + addedConnection: (connectionName: AllConnectionName) => `conectado a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: 'saiu do chat', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `a conta bancária empresarial ${maskedBankAccountNumber} foi bloqueada automaticamente devido a um problema com Reembolso ou liquidação do Cartão Expensify. Corrija o problema nas suas configurações de workspace.`, @@ -8829,7 +8791,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, reply: 'Responder', from: 'De', in: 'em', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `De ${reportName}${workspaceName ? `em ${workspaceName}` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `De ${reportName}${workspaceName ? `em ${workspaceName}` : ''}`, }, qrCodes: { qrCode: 'Código QR', @@ -9085,7 +9047,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, missingComment: 'Descrição obrigatória para a categoria selecionada', missingAttendees: 'Vários participantes são obrigatórios para esta categoria', missingTag: (tagName?: string) => `Faltando ${tagName ?? 'etiqueta'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return 'Valor difere da distância calculada'; @@ -9099,7 +9061,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, } }, modifiedDate: 'Data diferente do recibo digitalizado', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `A distância excede a rota calculada de ${formattedRouteDistance}` : 'A distância excede a rota calculada', nonExpensiworksExpense: 'Despesa fora do Expensiworks', overAutoApprovalLimit: (formattedLimit: string) => `Despesa excede o limite de aprovação automática de ${formattedLimit}`, @@ -9402,8 +9364,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, collect: { title: 'Cobrar', description: 'O plano para pequenas empresas que oferece despesas, viagens e chat.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, + priceAnnual: (lower: string, upper: string) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, benefit1: 'Digitalização de recibos', benefit2: 'Reembolsos', benefit3: 'Gerenciamento de cartão corporativo', @@ -9416,8 +9378,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, control: { title: 'Controle', description: 'Despesas, viagens e chat para grandes empresas.', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, + priceAnnual: (lower: string, upper: string) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, + pricePayPerUse: (lower: string, upper: string) => `De membro ${lower}/ativo com o Cartão Expensify a membro ${upper}/ativo sem o Cartão Expensify.`, benefit1: 'Tudo no plano Collect', benefit2: 'Fluxos de aprovação em múltiplos níveis', benefit3: 'Regras de despesa personalizadas', @@ -9554,7 +9516,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, addCopilot: 'Adicionar um copiloto', membersCanAccessYourAccount: 'Esses membros podem acessar sua conta:', youCanAccessTheseAccounts: 'Você pode acessar essas contas:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Cheio'; @@ -9569,7 +9531,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, accessLevel: 'Nível de acesso', confirmCopilot: 'Confirme seu copiloto abaixo.', accessLevelDescription: 'Escolha um nível de acesso abaixo. Tanto o acesso Completo quanto o Limitado permitem que copilotos vejam todas as conversas e despesas.', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'Permita que outra pessoa membro realize todas as ações na sua conta em seu nome. Inclui chat, envios, aprovações, pagamentos, atualizações de configurações e mais.'; @@ -9594,7 +9556,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, `Como copiloto de ${accountOwnerEmail}, você não tem permissão para realizar esta ação. Desculpe!`, removeCopilotAccess: 'Remover meu acesso de copiloto', removeCopilotAccessTitle: 'Remover acesso de copiloto?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => + removeCopilotAccessConfirmation: (delegatorName: string) => `Tem certeza de que deseja remover seu acesso de copiloto à conta Expensify de ${delegatorName}? Esta ação não pode ser desfeita.`, removeCopilotAccessConfirm: 'Remover acesso', copilotAccess: 'Acesso ao Copilot', @@ -9608,9 +9570,9 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, nothingToPreview: 'Nada para pré-visualizar', editJson: 'Editar JSON:', preview: 'Prévia:', - missingProperty: ({propertyName}: MissingPropertyParams) => `Faltando ${propertyName}`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `Propriedade inválida: ${propertyName} - Esperado: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `Valor inválido - Esperado: ${expectedValues}`, + missingProperty: (propertyName: string) => `Faltando ${propertyName}`, + invalidProperty: (propertyName: string, expectedType: string) => `Propriedade inválida: ${propertyName} - Esperado: ${expectedType}`, + invalidValue: (expectedValues: string) => `Valor inválido - Esperado: ${expectedValues}`, missingValue: 'Valor ausente', createReportAction: 'Ação de criar relatório', reportAction: 'Ação do relatório', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 0b46b7513aee..1c2c87d0f29b 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -20,45 +20,10 @@ import type {Country} from '@src/CONST'; import type OriginalMessage from '@src/types/onyx/OriginalMessage'; import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - ExportAgainModalDescriptionParams, - ExportIntegrationSelectedParams, - IntacctMappingTitleParams, - InvalidPropertyParams, - InvalidValueParams, - MarkReimbursedFromIntegrationParams, - MissingPropertyParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, - OptionalParam, - PaidElsewhereParams, - ParentNavigationSummaryParams, - RemoveCopilotAccessConfirmationParams, - RemovedFromApprovalWorkflowParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - ShareParams, - SizeExceededParams, - StepCounterParams, - SyncStageNameConnectionsParams, - UnshareParams, - UnsupportedFormulaValueErrorParams, - UpdateRoleParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; +import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx'; +import type {DelegateRole} from '@src/types/onyx/Account'; +import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -796,8 +761,8 @@ const translations: TranslationDeepObject = { copyEmailToClipboard: '复制邮箱到剪贴板', markAsUnread: '标记为未读', markAsRead: '标记为已读', - editAction: ({action}: EditActionParams) => `编辑 ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? '报销' : '评论'}`, - deleteAction: ({action}: DeleteActionParams) => { + editAction: (action: OnyxInputOrEntry) => `编辑 ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? '报销' : '评论'}`, + deleteAction: (action: OnyxInputOrEntry) => { let type = '评论'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -806,7 +771,7 @@ const translations: TranslationDeepObject = { } return `删除${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = '评论'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -885,14 +850,14 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: '此聊天室已被归档。', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => `此聊天已不再活动,因为 ${displayName} 已关闭其账户。`, - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: ReportArchiveReasonsMergedParams) => + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: (displayName: string) => `此聊天已不再活动,因为 ${displayName} 已关闭其账户。`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: (displayName: string, oldDisplayName: string) => `此聊天已不再活跃,因为${oldDisplayName}已将其账户与${displayName}合并。`, - [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: ReportArchiveReasonsRemovedFromPolicyParams) => + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: (displayName: string, policyName: string, shouldUseYou = false) => shouldUseYou ? `此聊天已不再活跃,因为已不再是 ${policyName} 工作区的成员。` : `此聊天已不再活动,因为${displayName}已不再是${policyName}工作区的成员。`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: (policyName: string) => `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: (policyName: string) => `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: '此预订已归档。', }, @@ -1350,7 +1315,7 @@ const translations: TranslationDeepObject = { adminCanceledRequest: '已取消付款', canceledRequest: (amount: string, submitterDisplayName: string) => `已取消金额为 ${amount} 的付款,因为 ${submitterDisplayName} 未在 30 天内启用其 Expensify 钱包`, settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} 已添加了一个银行账户。已完成 ${amount} 付款。`, - paidElsewhere: ({payer, comment}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}标记为已支付${comment ? `,内容为“${comment}”` : ''}`, + paidElsewhere: (payer?: string, comment?: string) => `${payer ? `${payer} ` : ''}标记为已支付${comment ? `,内容为“${comment}”` : ''}`, paidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}用钱包支付`, automaticallyPaidWithExpensify: (payer?: string) => `${payer ? `${payer} ` : ''}已通过工作区规则使用 Expensify 支付`, reimbursedThisReport: '已报销此报表', @@ -1406,7 +1371,7 @@ const translations: TranslationDeepObject = { threadExpenseReportName: (formattedAmount: string, comment?: string) => `${formattedAmount} ${comment ? `用于 ${comment}` : '报销'}`, invoiceReportName: ({linkedReportID}: OriginalMessage) => `发票报告 #${linkedReportID}`, threadPaySomeoneReportName: (formattedAmount: string, comment?: string) => `已发送 ${formattedAmount}${comment ? `用于 ${comment}` : ''}`, - movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `已将报销从个人空间移动到 ${workspaceName ?? `与 ${reportName} 聊天`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `已将报销从个人空间移动到 ${workspaceName ?? `与 ${reportName} 聊天`}`, movedToPersonalSpace: '已将报销移动到个人空间', error: { invalidCategoryLength: '类别名称超过 255 个字符。请缩短名称或选择其他类别。', @@ -1711,10 +1676,10 @@ const translations: TranslationDeepObject = { viewPhoto: '查看照片', imageUploadFailed: '图片上传失败', deleteWorkspaceError: '抱歉,删除您的工作区头像时出现了意外问题', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `所选图片超过了最大上传大小 ${maxUploadSizeInMB} MB。`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: (maxUploadSizeInMB: number) => `所选图片超过了最大上传大小 ${maxUploadSizeInMB} MB。`, + resolutionConstraints: (minHeightInPx: number, minWidthInPx: number, maxHeightInPx: number, maxWidthInPx: number) => `请上传尺寸大于 ${minHeightInPx}x${minWidthInPx} 像素且小于 ${maxHeightInPx}x${maxWidthInPx} 像素的图片。`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `头像必须为以下类型之一:${allowedExtensions.join(', ')}。`, + notAllowedExtension: (allowedExtensions: string[]) => `头像必须为以下类型之一:${allowedExtensions.join(', ')}。`, }, avatarPage: { title: '编辑头像', @@ -2382,7 +2347,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: '通过 Plaid 连接。', fixCard: '修复卡片', brokenConnection: '您的银行卡连接已断开。', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `您的 ${cardName} 卡连接已中断。登录您的网上银行以修复该卡。` : `您的 ${cardName} 卡连接已中断。登录您的网上银行以修复该卡。`, addAdditionalCards: '添加其他卡片', upgradeDescription: '需要添加更多卡片吗?创建工作区以添加其他个人卡片或将公司卡片分配给整个团队。', @@ -3459,7 +3424,7 @@ ${amount},商户:${merchant} - 日期:${date}`, vacationDelegateWarning: (nameOrEmail: string) => `您正在将 ${nameOrEmail} 设为您的休假代理人。TA 还未加入您所有的工作区。如果继续操作,将会向您所有工作区的管理员发送一封邮件,请他们将 TA 添加进来。`, }, - stepCounter: ({step, total, text}: StepCounterParams) => { + stepCounter: (step: number, total?: number, text?: string) => { let result = `步骤 ${step}`; if (total) { result = `${result} of ${total}`; @@ -4320,7 +4285,7 @@ ${amount},商户:${merchant} - 日期:${date}`, subscription: '订阅', markAsEntered: '标记为手动输入', markAsExported: '标记为已导出', - exportIntegrationSelected: ({connectionName}: ExportIntegrationSelectedParams) => `导出到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + exportIntegrationSelected: (connectionName: ConnectionName) => `导出到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, letsDoubleCheck: '我们再仔细检查一下,确保一切都正确。', lineItemLevel: '单行项目级别', reportLevel: '报表级别', @@ -4331,11 +4296,11 @@ ${amount},商户:${merchant} - 日期:${date}`, content: (adminsRoomLink: string) => `将此二维码分享给他人或复制下方链接,方便成员请求访问你的工作区。所有加入工作区的请求都会显示在 ${CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} 聊天室中,供你审核。`, }, - connectTo: ({connectionName}: ConnectionNameParams) => `连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + connectTo: (connectionName: AllConnectionName) => `连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, createNewConnection: '创建新连接', reuseExistingConnection: '复用现有连接', existingConnections: '现有连接', - existingConnectionsDescription: ({connectionName}: ConnectionNameParams) => + existingConnectionsDescription: (connectionName: AllConnectionName) => `由于你之前已连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]},你可以选择复用现有连接或创建新连接。`, lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - 上次同步时间:${formattedDate}`, authenticationError: (connectionName: string) => `由于身份验证错误,无法连接到 ${connectionName}。`, @@ -5298,7 +5263,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM one: '已添加 1 个 UDD', other: (count: number) => `已添加 ${count} 个UDD`, }), - mappingTitle: ({mappingName}: IntacctMappingTitleParams) => { + mappingTitle: (mappingName: SageIntacctMappingName) => { switch (mappingName) { case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS: return '部门'; @@ -5911,7 +5876,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM reportFieldNameRequiredError: '请输入报表字段名称', reportFieldTypeRequiredError: '请选择报表字段类型', circularReferenceError: '此字段不能引用自身。请更新。', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `无法识别公式字段 ${value}`, + unsupportedFormulaValueError: (value: string) => `无法识别公式字段 ${value}`, reportFieldInitialValueRequiredError: '请选择报表字段的初始值', genericFailureMessage: '更新报表字段时出错。请重试。', }, @@ -6251,7 +6216,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM talkYourAccountManager: '与您的客户经理聊天。', talkToConcierge: '与 Concierge 聊天。', needAnotherAccounting: '需要其他会计软件吗?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6278,12 +6243,12 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM syncNow: '立即同步', disconnect: '断开连接', reinstall: '重新安装连接器', - disconnectTitle: ({connectionName}: OptionalParam = {}) => { + disconnectTitle: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : '集成'; return `断开连接 ${integrationName}`; }, - connectTitle: ({connectionName}: ConnectionNameParams) => `连接 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '会计集成'}`, - syncError: ({connectionName}: ConnectionNameParams) => { + connectTitle: (connectionName: AllConnectionName) => `连接 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '会计集成'}`, + syncError: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return '无法连接到 QuickBooks Online'; @@ -6312,12 +6277,12 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: '已作为报表字段导入', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'NetSuite 员工默认值', }, - disconnectPrompt: ({connectionName}: OptionalParam = {}) => { + disconnectPrompt: (connectionName?: AllConnectionName) => { const integrationName = connectionName && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] : '此集成'; return `你确定要断开与 ${integrationName} 的连接吗?`; }, - connectPrompt: ({connectionName}: ConnectionNameParams) => + connectPrompt: (connectionName: AllConnectionName) => `确定要连接 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '此会计集成'} 吗?这将删除所有现有的会计连接。`, enterCredentials: '请输入您的凭证', reconnect: '重新连接', @@ -6337,7 +6302,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6702,10 +6667,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM }, exportAgainModal: { title: '小心!', - description: ({ - reportName, - connectionName, - }: ExportAgainModalDescriptionParams) => `以下报表已导出到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}。确定要再次导出吗? + description: (reportName: string, connectionName: ConnectionName) => `以下报表已导出到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}。确定要再次导出吗? ${reportName}`, confirmText: '是,再次导出', @@ -7372,7 +7334,7 @@ ${reportName}`, }, description: '选择适合你的方案。', subscriptionLink: '了解详情', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ one: `在 Control 方案中,你已承诺在年度订阅到期(${annualSubscriptionEndDate})前保持 1 位活跃成员。你可以在 ${annualSubscriptionEndDate} 起关闭自动续订,以改为按使用付费订阅并降级到 Collect 方案,操作入口在`, other: `在年费订阅于${annualSubscriptionEndDate}结束之前,你已承诺在 Control 方案中保留 ${count} 名活跃成员。你可以在${annualSubscriptionEndDate}起,通过关闭自动续订,改为按使用量付费订阅并降级到 Collect 方案,操作入口在`, }), @@ -7411,7 +7373,7 @@ ${reportName}`, }, custom: {label: '自定义审批', description: '我将在 Expensify 中手动设置审批工作流程。'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return '同步 Gusto 员工'; @@ -7672,7 +7634,7 @@ ${reportName}`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `已将此工作区的名称更新为“${newName}”(原为“${oldName}”)`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `将此工作区的描述设置为“${newDescription}”` : `已将此工作区的描述更新为“${newDescription}”(之前为“${oldDescription}”)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: (submittersNames: string[]) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -7689,7 +7651,7 @@ ${reportName}`, demotedFromWorkspace: (policyName: string, oldRole: string) => `已将你在 ${policyName} 中的角色从 ${oldRole} 更新为用户。你已从所有报销人费用聊天中移除,但你自己的除外。`, updatedWorkspaceCurrencyAction: (oldCurrency: string, newCurrency: string) => `已将默认货币更新为 ${newCurrency}(之前为 ${oldCurrency})`, updatedWorkspaceFrequencyAction: (oldFrequency: string, newFrequency: string) => `已将自动报表频率更新为“${newFrequency}”(此前为“${oldFrequency}”)`, - updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `将审批模式更新为“${newValue}”(之前为“${oldValue}”)`, + updateApprovalMode: (newValue: string, oldValue?: string) => `将审批模式更新为“${newValue}”(之前为“${oldValue}”)`, upgradedWorkspace: '已将此工作区升级到 Control 方案', forcedCorporateUpgrade: `此工作区已升级为 Control 方案。点击此处了解更多信息。`, downgradedWorkspace: '将此工作区降级为 Collect 方案', @@ -8400,8 +8362,8 @@ ${reportName}`, connectionSettings: '连接设置', actions: { type: { - changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `将${fieldName}更改为“${newValue}”(先前为“${oldValue}”)`, - changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `将 ${fieldName} 设置为“${newValue}”`, + changeField: (oldValue: string | undefined, newValue: string, fieldName: string) => `将${fieldName}更改为“${newValue}”(先前为“${oldValue}”)`, + changeFieldEmpty: (newValue: string, fieldName: string) => `将 ${fieldName} 设置为“${newValue}”`, changeReportPolicy: (toPolicyName: string, fromPolicyName?: string) => { if (!toPolicyName) { return `更改了工作区${fromPolicyName ? `(原为 ${fromPolicyName})` : ''}`; @@ -8433,7 +8395,7 @@ ${reportName}`, managerAttachReceipt: `已添加一张收据`, managerDetachReceipt: `移除了报销单`, markedReimbursed: (amount: string, currency: string) => `在其他地方已支付${currency}${amount}`, - markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `通过集成支付了 ${currency}${amount}`, + markedReimbursedFromIntegration: (amount: string, currency: string) => `通过集成支付了 ${currency}${amount}`, outdatedBankAccount: `由于付款方的银行账户出现问题,无法处理该付款`, reimbursementACHBounceDefault: `由于路由号/账户号不正确或账户已关闭,无法处理付款`, reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `无法处理付款:${returnReason}`, @@ -8442,8 +8404,8 @@ ${reportName}`, reimbursementDelayed: `已处理付款,但将再延迟 1–2 个工作日`, selectedForRandomAudit: `随机抽选进行审核`, selectedForRandomAuditMarkdown: `[随机选择](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule)进行审核`, - share: ({to}: ShareParams) => `已邀请成员 ${to}`, - unshare: ({to}: UnshareParams) => `已移除成员 ${to}`, + share: (to: string) => `已邀请成员 ${to}`, + unshare: (to: string) => `已移除成员 ${to}`, stripePaid: (amount: string, currency: string) => `已支付 ${currency}${amount}`, takeControl: `取得控制权`, integrationSyncFailed: (label: string, errorMessage: string, workspaceAccountingLink?: string) => @@ -8458,7 +8420,7 @@ ${reportName}`, const article = role === CONST.POLICY.ROLE.AUDITOR ? '一个' : 'a'; return didJoinPolicy ? `${email} 通过工作区邀请链接加入` : `已将 ${email} 添加为 ${article} ${translatedRole}`; }, - updateRole: ({email, currentRole, newRole}: UpdateRoleParams) => `已将 ${email} 的角色更新为 ${newRole}(先前为 ${currentRole})`, + updateRole: (email: string, currentRole: string, newRole: string) => `已将 ${email} 的角色更新为 ${newRole}(先前为 ${currentRole})`, updatedCustomField1: (email: string, newValue: string, previousValue: string) => { if (!newValue) { return `已移除 ${email} 的自定义字段 1(先前为“${previousValue}”)`; @@ -8473,8 +8435,8 @@ ${reportName}`, }, leftWorkspace: (nameOrEmail: string) => `${nameOrEmail} 离开了工作区`, removeMember: (email: string, role: string) => `已移除 ${role} ${email}`, - removedConnection: ({connectionName}: ConnectionNameParams) => `已移除与 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} 的连接`, - addedConnection: ({connectionName}: ConnectionNameParams) => `已连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, + removedConnection: (connectionName: AllConnectionName) => `已移除与 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]} 的连接`, + addedConnection: (connectionName: AllConnectionName) => `已连接到 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName]}`, leftTheChat: '已离开聊天', settlementAccountLocked: ({maskedBankAccountNumber}: OriginalMessageSettlementAccountLocked, linkURL: string) => `由于报销或 Expensify 卡结算问题,企业银行账户 ${maskedBankAccountNumber} 已被自动锁定。请在工作区设置中解决该问题。`, @@ -8584,7 +8546,7 @@ ${reportName}`, reply: '回复', from: '来自', in: '在', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `来自${reportName}${workspaceName ? `在 ${workspaceName} 中` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `来自${reportName}${workspaceName ? `在 ${workspaceName} 中` : ''}`, }, qrCodes: { qrCode: '二维码', @@ -8830,7 +8792,7 @@ ${reportName}`, missingComment: '所选类别需要填写说明', missingAttendees: '此类别需要多个参与者', missingTag: (tagName?: string) => `缺少 ${tagName ?? '标签'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return '金额与计算出的距离不符'; @@ -8844,7 +8806,7 @@ ${reportName}`, } }, modifiedDate: '日期与已扫描收据不符', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `距离超过计算出的路线 ${formattedRouteDistance}` : '距离超过计算的路线', nonExpensiworksExpense: '非 Expensiworks 报销', overAutoApprovalLimit: (formattedLimit: string) => `报销金额超出自动审批上限 ${formattedLimit}`, @@ -9145,8 +9107,8 @@ ${reportName}`, collect: { title: '收款', description: '为您提供报销、差旅和聊天功能的小型企业方案。', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, + priceAnnual: (lower: string, upper: string) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, + pricePayPerUse: (lower: string, upper: string) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, benefit1: '收据扫描', benefit2: '报销', benefit3: '公司卡管理', @@ -9159,8 +9121,8 @@ ${reportName}`, control: { title: '控制', description: '适用于大型企业的报销、差旅和聊天。', - priceAnnual: ({lower, upper}: YourPlanPriceParams) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, - pricePayPerUse: ({lower, upper}: YourPlanPriceParams) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, + priceAnnual: (lower: string, upper: string) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, + pricePayPerUse: (lower: string, upper: string) => `从使用 Expensify 卡的每位活跃成员 ${lower} 起,到未使用 Expensify 卡的每位活跃成员 ${upper}。`, benefit1: 'Collect 方案中的所有内容', benefit2: '多级审批工作流程', benefit3: '自定义报销规则', @@ -9294,7 +9256,7 @@ ${reportName}`, addCopilot: '添加副驾驶', membersCanAccessYourAccount: '这些成员可以访问你的账户:', youCanAccessTheseAccounts: '您可以访问这些账户:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '完整'; @@ -9309,7 +9271,7 @@ ${reportName}`, accessLevel: '访问级别', confirmCopilot: '在下方确认你的副驾驶。', accessLevelDescription: '请选择下方的访问级别。完整和有限访问都允许副驾驶查看所有会话和报销。', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '允许其他成员代表你在你的账户中执行所有操作。包括聊天、提交、审批、付款、更新设置等。'; @@ -9332,7 +9294,7 @@ ${reportName}`, notAllowedMessage: (accountOwnerEmail: string) => `作为${accountOwnerEmail}的副驾驶,你没有权限执行此操作。抱歉!`, removeCopilotAccess: '移除我的副驾驶访问权限', removeCopilotAccessTitle: '移除副驾驶访问权限?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => `您确定要移除对${delegatorName}的 Expensify 账户的副驾驶访问权限吗?此操作无法撤销。`, + removeCopilotAccessConfirmation: (delegatorName: string) => `您确定要移除对${delegatorName}的 Expensify 账户的副驾驶访问权限吗?此操作无法撤销。`, removeCopilotAccessConfirm: '移除访问权限', copilotAccess: 'Copilot 访问', }, @@ -9345,9 +9307,9 @@ ${reportName}`, nothingToPreview: '无可预览内容', editJson: '编辑 JSON:', preview: '预览:', - missingProperty: ({propertyName}: MissingPropertyParams) => `缺少 ${propertyName}`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `无效属性:${propertyName} - 预期:${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `无效的值 - 预期为:${expectedValues}`, + missingProperty: (propertyName: string) => `缺少 ${propertyName}`, + invalidProperty: (propertyName: string, expectedType: string) => `无效属性:${propertyName} - 预期:${expectedType}`, + invalidValue: (expectedValues: string) => `无效的值 - 预期为:${expectedValues}`, missingValue: '缺少值', createReportAction: '创建报表操作', reportAction: '报告操作', diff --git a/src/libs/AvatarUtils.ts b/src/libs/AvatarUtils.ts index e6313b5f8693..0c86b8c61bbd 100644 --- a/src/libs/AvatarUtils.ts +++ b/src/libs/AvatarUtils.ts @@ -12,7 +12,7 @@ import type {AvatarSource} from './UserUtils'; type ValidationResult = { isValid: boolean; errorKey?: TranslationPaths; - errorParams?: Record; + errorArgs?: unknown[]; }; /** @@ -62,7 +62,7 @@ async function isValidResolution(image: FileObject): Promise { * ```typescript * const result = await validateAvatarImage(file); * if (!result.isValid) { - * showError(result.errorKey, result.errorParams); + * showError(result.errorKey, result.errorArgs); * } * ``` */ @@ -71,7 +71,7 @@ async function validateAvatarImage(image: FileObject): Promise return { isValid: false, errorKey: 'avatarWithImagePicker.notAllowedExtension', - errorParams: {allowedExtensions: CONST.AVATAR_ALLOWED_EXTENSIONS}, + errorArgs: [CONST.AVATAR_ALLOWED_EXTENSIONS], }; } @@ -79,7 +79,7 @@ async function validateAvatarImage(image: FileObject): Promise return { isValid: false, errorKey: 'avatarWithImagePicker.sizeExceeded', - errorParams: {maxUploadSizeInMB: CONST.AVATAR_MAX_ATTACHMENT_SIZE / (1024 * 1024)}, + errorArgs: [CONST.AVATAR_MAX_ATTACHMENT_SIZE / (1024 * 1024)], }; } @@ -89,7 +89,7 @@ async function validateAvatarImage(image: FileObject): Promise return { isValid: false, errorKey: 'attachmentPicker.errorWhileSelectingCorruptedAttachment', - errorParams: {}, + errorArgs: [], }; } @@ -98,12 +98,7 @@ async function validateAvatarImage(image: FileObject): Promise return { isValid: false, errorKey: 'avatarWithImagePicker.resolutionConstraints', - errorParams: { - minHeightInPx: CONST.AVATAR_MIN_HEIGHT_PX, - minWidthInPx: CONST.AVATAR_MIN_WIDTH_PX, - maxHeightInPx: CONST.AVATAR_MAX_HEIGHT_PX, - maxWidthInPx: CONST.AVATAR_MAX_WIDTH_PX, - }, + errorArgs: [CONST.AVATAR_MIN_HEIGHT_PX, CONST.AVATAR_MIN_WIDTH_PX, CONST.AVATAR_MAX_HEIGHT_PX, CONST.AVATAR_MAX_WIDTH_PX], }; } diff --git a/src/libs/ModifiedExpenseMessage.ts b/src/libs/ModifiedExpenseMessage.ts index 8fd3ccd48173..e32b92df0cf2 100644 --- a/src/libs/ModifiedExpenseMessage.ts +++ b/src/libs/ModifiedExpenseMessage.ts @@ -159,7 +159,7 @@ function getForExpenseMovedFromSelfDM(translate: LocalizedTranslate, destination if (isEmpty(policyName) && !reportName) { return translate('iou.changedTheExpense'); } - return translate('iou.movedFromPersonalSpace', {reportName, workspaceName: !isEmpty(policyName) ? policyName : undefined}); + return translate('iou.movedFromPersonalSpace', reportName, !isEmpty(policyName) ? policyName : undefined); } function getMovedReportID(reportAction: OnyxEntry, type: ValueOf): string | undefined { diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index a21c1f1644f9..809b245e3dbc 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -749,20 +749,25 @@ function getLastMessageTextForReport({ (isClosedAction(lastOriginalReportAction) && getOriginalMessage(lastOriginalReportAction)?.reason) || CONST.REPORT.ARCHIVE_REASON.DEFAULT; switch (archiveReason) { case CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED: + lastMessageTextFromReport = translate('reportArchiveReasons.accountClosed', formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails))); + break; case CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY: + lastMessageTextFromReport = translate( + 'reportArchiveReasons.removedFromPolicy', + formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails)), + getPolicyName({report, policy}), + ); + break; case CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED: { - lastMessageTextFromReport = translate(`reportArchiveReasons.${archiveReason}`, { - displayName: formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails)), - policyName: getPolicyName({report, policy}), - }); + lastMessageTextFromReport = translate('reportArchiveReasons.policyDeleted', getPolicyName({report, policy})); break; } case CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED: { - lastMessageTextFromReport = translate(`reportArchiveReasons.${archiveReason}`); + lastMessageTextFromReport = translate('reportArchiveReasons.bookingEndDateHasPassed'); break; } default: { - lastMessageTextFromReport = translate(`reportArchiveReasons.default`); + lastMessageTextFromReport = translate('reportArchiveReasons.default'); } } } else if (isMoneyRequestAction(lastReportAction)) { diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 41094f686eeb..d342a648804d 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -461,7 +461,7 @@ function getOriginalMessage(reportAction: OnyxInputO function getCardConnectionBrokenMessage(card: Card | undefined, originalCardName: string | undefined, translate: LocaleContextProps['translate'], connectionLink?: string) { const personalCardName = originalCardName ?? card?.cardName ?? getBankName(card?.bank as CompanyCardFeed); - return translate('personalCard.conciergeBrokenConnection', {cardName: personalCardName, connectionLink}); + return translate('personalCard.conciergeBrokenConnection', personalCardName, connectionLink); } function getElsewherePaymentReportActionMessage(translate: LocalizedTranslate, originalMessage: OriginalMessageIOU | undefined, payer?: string): string { @@ -469,12 +469,12 @@ function getElsewherePaymentReportActionMessage(translate: LocalizedTranslate, o return translate('iou.receivedPaymentReportAction', payer); } - return translate('iou.paidElsewhere', {payer, comment: originalMessage?.comment?.trim()}); + return translate('iou.paidElsewhere', payer, originalMessage?.comment?.trim()); } function getMarkedReimbursedMessage(translate: LocalizedTranslate, reportAction: OnyxInputOrEntry): string { const originalMessage = getOriginalMessage(reportAction) as OriginalMessageMarkedReimbursed | undefined; - return translate('iou.paidElsewhere', {comment: originalMessage?.message?.trim()}); + return translate('iou.paidElsewhere', undefined, originalMessage?.message?.trim()); } function getReimbursedMessage( @@ -2164,9 +2164,9 @@ function getMessageOfOldDotReportAction(translate: LocalizedTranslate, oldDotAct case CONST.REPORT.ACTIONS.TYPE.CHANGE_FIELD: { const {oldValue, newValue, fieldName} = originalMessage; if (!oldValue) { - return translate('report.actions.type.changeFieldEmpty', {newValue, fieldName}); + return translate('report.actions.type.changeFieldEmpty', newValue, fieldName); } - return translate('report.actions.type.changeField', {oldValue, newValue, fieldName}); + return translate('report.actions.type.changeField', oldValue, newValue, fieldName); } case CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_CSV: return translate('report.actions.type.exportedToCSV'); @@ -2191,7 +2191,7 @@ function getMessageOfOldDotReportAction(translate: LocalizedTranslate, oldDotAct if (!amount || !currency) { return getMessageOfOldDotLegacyAction(oldDotAction as PartialReportAction); } - return translate('report.actions.type.markedReimbursedFromIntegration', {amount, currency}); + return translate('report.actions.type.markedReimbursedFromIntegration', amount, currency); } case CONST.REPORT.ACTIONS.TYPE.OUTDATED_BANK_ACCOUNT: return translate('report.actions.type.outdatedBankAccount'); @@ -2208,9 +2208,9 @@ function getMessageOfOldDotReportAction(translate: LocalizedTranslate, oldDotAct case CONST.REPORT.ACTIONS.TYPE.SELECTED_FOR_RANDOM_AUDIT: return translate(`report.actions.type.selectedForRandomAudit${withMarkdown ? 'Markdown' : ''}`); case CONST.REPORT.ACTIONS.TYPE.SHARE: - return translate('report.actions.type.share', {to: originalMessage.to}); + return translate('report.actions.type.share', originalMessage.to); case CONST.REPORT.ACTIONS.TYPE.UNSHARE: - return translate('report.actions.type.unshare', {to: originalMessage.to}); + return translate('report.actions.type.unshare', originalMessage.to); case CONST.REPORT.ACTIONS.TYPE.TAKE_CONTROL: return translate('report.actions.type.takeControl'); default: @@ -2880,7 +2880,7 @@ function buildPolicyChangeLogUpdateEmployeeSingleFieldMessage(translate: Localiz const newRole = translate('workspace.common.roleName', stringNewValue).toLowerCase(); const oldRole = translate('workspace.common.roleName', stringOldValue).toLowerCase(); - return translate('report.actions.type.updateRole', {email, newRole, currentRole: oldRole}); + return translate('report.actions.type.updateRole', email, oldRole, newRole); } function getPolicyChangeLogUpdateEmployee(translate: LocalizedTranslate, reportAction: OnyxInputOrEntry): string { @@ -3386,11 +3386,7 @@ function getWorkspaceUpdateFieldMessage(translate: LocalizedTranslate, action: R const oldValueTranslationKey = CONST.POLICY.APPROVAL_MODE_TRANSLATION_KEYS[oldValue as keyof typeof CONST.POLICY.APPROVAL_MODE_TRANSLATION_KEYS]; if (updatedField && updatedField === CONST.POLICY.COLLECTION_KEYS.APPROVAL_MODE && oldValueTranslationKey && newValueTranslationKey) { - return translate('workspaceActions.updateApprovalMode', { - newValue: translate(`workspaceApprovalModes.${newValueTranslationKey}`), - oldValue: translate(`workspaceApprovalModes.${oldValueTranslationKey}`), - fieldName: updatedField, - }); + return translate('workspaceActions.updateApprovalMode', translate(`workspaceApprovalModes.${newValueTranslationKey}`), translate(`workspaceApprovalModes.${oldValueTranslationKey}`)); } if (updatedField && updatedField === CONST.POLICY.EXPENSE_REPORT_RULES.PREVENT_SELF_APPROVAL && typeof oldValue === 'string' && typeof newValue === 'string') { @@ -3903,7 +3899,7 @@ function getAddedConnectionMessage(translate: LocalizedTranslate, reportAction: } const originalMessage = getOriginalMessage(reportAction); const connectionName = originalMessage?.connectionName; - return connectionName ? translate('report.actions.type.addedConnection', {connectionName}) : ''; + return connectionName ? translate('report.actions.type.addedConnection', connectionName) : ''; } function getRemovedConnectionMessage(translate: LocalizedTranslate, reportAction: OnyxEntry): string { @@ -3912,7 +3908,7 @@ function getRemovedConnectionMessage(translate: LocalizedTranslate, reportAction } const originalMessage = getOriginalMessage(reportAction); const connectionName = originalMessage?.connectionName; - return connectionName ? translate('report.actions.type.removedConnection', {connectionName}) : ''; + return connectionName ? translate('report.actions.type.removedConnection', connectionName) : ''; } function getAddedCardFeedMessage(translate: LocalizedTranslate, reportAction: OnyxEntry): string { @@ -4050,7 +4046,9 @@ function getUpdatedApprovalRuleMessage(translate: LocalizedTranslate, reportActi } function getRemovedFromApprovalChainMessage(translate: LocalizedTranslate, submittersNames: string[]) { - return translate('workspaceActions.removedFromApprovalWorkflow', {submittersNames, count: submittersNames.length}); + const params = [...submittersNames] as string[] & {count: number}; + params.count = submittersNames.length; + return translate('workspaceActions.removedFromApprovalWorkflow', params); } function getActionableCardFraudAlertMessage( diff --git a/src/libs/Violations/ViolationsUtils.ts b/src/libs/Violations/ViolationsUtils.ts index 80c0e78fca89..503d8f7784ba 100644 --- a/src/libs/Violations/ViolationsUtils.ts +++ b/src/libs/Violations/ViolationsUtils.ts @@ -822,13 +822,13 @@ const ViolationsUtils = { case 'missingTag': return translate('violations.missingTag', tagName); case 'modifiedAmount': - return translate('violations.modifiedAmount', {type, displayPercentVariance: violation.data?.displayPercentVariance}); + return translate('violations.modifiedAmount', type, violation.data?.displayPercentVariance); case 'modifiedDate': return translate('violations.modifiedDate'); case 'increasedDistance': { const distance = routeDistanceMeters ?? 0; const formattedRouteDistance = distance > 0 && distanceUnit ? DistanceRequestUtils.getDistanceForDisplayLabel(distance, distanceUnit) : undefined; - return translate('violations.increasedDistance', {formattedRouteDistance}); + return translate('violations.increasedDistance', formattedRouteDistance); } case 'nonExpensiworksExpense': return translate('violations.nonExpensiworksExpense'); diff --git a/src/pages/Debug/DebugDetails.tsx b/src/pages/Debug/DebugDetails.tsx index 25fb2f699e29..58e3b1c1c086 100644 --- a/src/pages/Debug/DebugDetails.tsx +++ b/src/pages/Debug/DebugDetails.tsx @@ -17,7 +17,6 @@ import type {ObjectType, OnyxDataType} from '@libs/DebugUtils'; import DebugUtils from '@libs/DebugUtils'; import Debug from '@userActions/Debug'; import type CONST from '@src/CONST'; -import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import TRANSACTION_FORM_INPUT_IDS from '@src/types/form/DebugTransactionForm'; import type {Report, ReportAction, Transaction, TransactionViolation} from '@src/types/onyx'; @@ -106,7 +105,18 @@ function DebugDetails({formType, data, policyHasEnabledTags, policyID, children, validate(key, DebugUtils.onyxDataToString(value)); } catch (e) { const {cause, message} = e as SyntaxError; - newErrors[key] = cause || message === 'debug.missingValue' ? translate(message as TranslationPaths, cause as never) : message; + if (message === 'debug.missingProperty') { + newErrors[key] = translate('debug.missingProperty', (cause as {propertyName: string}).propertyName); + } else if (message === 'debug.invalidProperty') { + const {propertyName, expectedType} = cause as {propertyName: string; expectedType: string}; + newErrors[key] = translate('debug.invalidProperty', propertyName, expectedType); + } else if (message === 'debug.invalidValue') { + newErrors[key] = translate('debug.invalidValue', (cause as {expectedValues: string}).expectedValues); + } else if (message === 'debug.missingValue') { + newErrors[key] = translate('debug.missingValue'); + } else { + newErrors[key] = message; + } } } return newErrors; diff --git a/src/pages/DynamicReportDetailsPage.tsx b/src/pages/DynamicReportDetailsPage.tsx index 6509a9447e36..88c202e1a0fa 100644 --- a/src/pages/DynamicReportDetailsPage.tsx +++ b/src/pages/DynamicReportDetailsPage.tsx @@ -337,7 +337,7 @@ function DynamicReportDetailsPage({policy, report, route, reportMetadata, report const isCardTransactionCanBeDeleted = canDeleteCardTransactionByLiabilityType(iouTransaction); const shouldShowDeleteButton = shouldShowTaskDeleteButton || (canDeleteRequest && isCardTransactionCanBeDeleted) || isDemoTransaction(iouTransaction); const shouldShowEditSplitOnDeleteAction = iouTransactionID ? shouldOpenSplitExpenseEditFlowOnDelete([iouTransactionID]) : false; - let deleteMenuItemTitle = translate('reportActionContextMenu.deleteAction', {action: requestParentReportAction}); + let deleteMenuItemTitle = translate('reportActionContextMenu.deleteAction', requestParentReportAction); if (shouldShowEditSplitOnDeleteAction) { deleteMenuItemTitle = translate('iou.editSplits'); } else if (caseID === CASES.DEFAULT) { diff --git a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx index 2e39c3061236..eda89fc55c7c 100755 --- a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx @@ -437,8 +437,7 @@ function BaseReportActionContextMenu({ const {textTranslateKey} = contextAction; const isKeyInActionUpdateKeys = textTranslateKey === 'reportActionContextMenu.editAction' || textTranslateKey === 'reportActionContextMenu.deleteConfirmation'; - const text = - textTranslateKey && (isKeyInActionUpdateKeys ? translate(textTranslateKey, {action: moneyRequestAction ?? reportAction}) : translate(textTranslateKey)); + const text = textTranslateKey && (isKeyInActionUpdateKeys ? translate(textTranslateKey, moneyRequestAction ?? reportAction) : translate(textTranslateKey)); const transactionPayload = textTranslateKey === 'reportActionContextMenu.copyMessage' && transaction && {transaction}; const isMenuAction = textTranslateKey === 'reportActionContextMenu.menu'; const successIcon = contextAction.successIcon ? icons[contextAction.successIcon] : undefined; diff --git a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx index e1d4745f89e6..ae2b771f61cd 100644 --- a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -510,7 +510,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro /> { const result = await showConfirmModal({ title: translate('workspace.exportAgainModal.title'), - prompt: translate('workspace.exportAgainModal.description', {reportName: report?.reportName ?? '', connectionName}), + prompt: translate('workspace.exportAgainModal.description', report?.reportName ?? '', connectionName), confirmText: translate('workspace.exportAgainModal.confirmText'), cancelText: translate('workspace.exportAgainModal.cancelText'), }); @@ -77,7 +77,7 @@ function DynamicReportDetailsExportPage({route}: DynamicReportDetailsExportPageP const exportSelectorOptions: ExportSelectorType[] = [ { value: CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION, - text: translate('workspace.common.exportIntegrationSelected', {connectionName}), + text: translate('workspace.common.exportIntegrationSelected', connectionName), icons: [ { source: iconToDisplay ?? '', diff --git a/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx b/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx index e78f1d0d2645..d3b3fac6f322 100644 --- a/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx +++ b/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx @@ -71,7 +71,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset const [imageData, setImageData] = useState(EMPTY_IMAGE_DATA); const [cropImageData, setCropImageData] = useState(EMPTY_IMAGE_DATA); const [isAvatarCropModalOpen, setIsAvatarCropModalOpen] = useState(false); - const [errorData, setErrorData] = useState<{validationError: TranslationPaths | null; phraseParam: Record}>({validationError: null, phraseParam: {}}); + const [errorData, setErrorData] = useState<{validationError: TranslationPaths | null; phraseArgs: unknown[]}>({validationError: null, phraseArgs: []}); const isSavingRef = useRef(false); const isDirty = selectedBotAvatar !== initialBotAvatar || imageData.uri !== ''; @@ -91,11 +91,11 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset validateAvatarImage(image) .then((result) => { if (!result.isValid) { - setErrorData({validationError: result.errorKey ?? null, phraseParam: result.errorParams ?? {}}); + setErrorData({validationError: result.errorKey ?? null, phraseArgs: result.errorArgs ?? []}); return; } setIsAvatarCropModalOpen(true); - setErrorData({validationError: null, phraseParam: {}}); + setErrorData({validationError: null, phraseArgs: []}); setCropImageData({ uri: image.uri ?? '', name: image.name ?? '', @@ -104,7 +104,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset }); }) .catch(() => { - setErrorData({validationError: 'attachmentPicker.errorWhileSelectingCorruptedAttachment', phraseParam: {}}); + setErrorData({validationError: 'attachmentPicker.errorWhileSelectingCorruptedAttachment', phraseArgs: []}); }); }; @@ -223,7 +223,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset {!!errorData.validationError && ( string)(errorData.validationError, ...errorData.phraseArgs)}} type="error" /> )} diff --git a/src/pages/settings/Copilot/CopilotPage.tsx b/src/pages/settings/Copilot/CopilotPage.tsx index f92d288e62d4..0ff372ef1765 100644 --- a/src/pages/settings/Copilot/CopilotPage.tsx +++ b/src/pages/settings/Copilot/CopilotPage.tsx @@ -89,7 +89,7 @@ function CopilotPage() { return showConfirmModal({ title: translate('delegate.removeCopilotAccessTitle'), - prompt: translate('delegate.removeCopilotAccessConfirmation', {delegatorName}), + prompt: translate('delegate.removeCopilotAccessConfirmation', delegatorName), confirmText: translate('delegate.removeCopilotAccessConfirm'), cancelText: translate('common.cancel'), shouldShowCancelButton: true, @@ -174,7 +174,7 @@ function CopilotPage() { {!!role && ( diff --git a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx index 98653dd09418..829c0a715f92 100644 --- a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx +++ b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx @@ -33,7 +33,7 @@ type AvatarPreviewProps = { /** The function to set the image data */ setImageData: (imageData: ImageData) => void; /** The function to set the error */ - setError: (error: TranslationPaths | null, phraseParam: Record) => void; + setError: (error: TranslationPaths | null, phraseArgs?: unknown[]) => void; /** The function to set the crop image data */ setCropImageData: (cropImageData: ImageData) => void; /** Whether the avatar crop modal is open */ @@ -83,12 +83,12 @@ function AvatarPreview({selected, avatarCaptureRef, setSelected, isAvatarCropMod validateAvatarImage(image) .then((validationResult) => { if (!validationResult.isValid) { - setError(validationResult.errorKey ?? null, validationResult.errorParams ?? {}); + setError(validationResult.errorKey ?? null, validationResult.errorArgs ?? []); return; } setIsAvatarCropModalOpen(true); - setError(null, {}); + setError(null, []); setCropImageData({ uri: image.uri ?? '', name: image.name ?? '', @@ -97,7 +97,7 @@ function AvatarPreview({selected, avatarCaptureRef, setSelected, isAvatarCropMod }); }) .catch(() => { - setError('attachmentPicker.errorWhileSelectingCorruptedAttachment', {}); + setError('attachmentPicker.errorWhileSelectingCorruptedAttachment', []); }); }; @@ -112,7 +112,7 @@ function AvatarPreview({selected, avatarCaptureRef, setSelected, isAvatarCropMod }; const clearError = () => { - setError(null, {}); + setError(null, []); }; const {createMenuItems} = useAvatarMenu({ diff --git a/src/pages/settings/Profile/Avatar/EditUserAvatarContent.tsx b/src/pages/settings/Profile/Avatar/EditUserAvatarContent.tsx index bdc7c99c76ff..a7ae2ef60714 100644 --- a/src/pages/settings/Profile/Avatar/EditUserAvatarContent.tsx +++ b/src/pages/settings/Profile/Avatar/EditUserAvatarContent.tsx @@ -25,7 +25,7 @@ import type {ErrorData, ImageData} from './types'; const EMPTY_FILE = {uri: '', name: '', type: '', file: null}; function EditUserAvatarContent() { - const [errorData, setErrorData] = useState({validationError: null, phraseParam: {}}); + const [errorData, setErrorData] = useState({validationError: null, phraseArgs: []}); const [isAvatarCropModalOpen, setIsAvatarCropModalOpen] = useState(false); const [selected, setSelected] = useState(); @@ -46,10 +46,10 @@ function EditUserAvatarContent() { const currentUserPersonalDetails = useCurrentUserPersonalDetails(); - const setError = (error: TranslationPaths | null, phraseParam: Record) => { + const setError = (error: TranslationPaths | null, phraseArgs: unknown[] = []) => { setErrorData({ validationError: error, - phraseParam, + phraseArgs, }); }; @@ -177,7 +177,7 @@ function EditUserAvatarContent() { string)(errorData.validationError, ...errorData.phraseArgs)}} type="error" /> )} diff --git a/src/pages/settings/Profile/Avatar/types.ts b/src/pages/settings/Profile/Avatar/types.ts index 0f915b13c345..eb4cde963ae8 100644 --- a/src/pages/settings/Profile/Avatar/types.ts +++ b/src/pages/settings/Profile/Avatar/types.ts @@ -10,7 +10,7 @@ type ImageData = { type ErrorData = { validationError?: TranslationPaths | null | ''; - phraseParam: Record; + phraseArgs: unknown[]; }; export type {ImageData, ErrorData}; diff --git a/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx b/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx index 6cdd3425c6f3..d3885fe3966c 100644 --- a/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx +++ b/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx @@ -69,9 +69,9 @@ function ConfirmDelegatePage({route}: ConfirmDelegatePageProps) { interactive={false} /> Navigation.navigate(ROUTES.SETTINGS_DELEGATE_ROLE.getRoute(login, role, ROUTES.SETTINGS_DELEGATE_CONFIRM.getRoute(login, role)))} shouldShowRightIcon /> diff --git a/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx b/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx index e497fd9f25b1..1c486f900d17 100644 --- a/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx +++ b/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx @@ -43,8 +43,8 @@ function SelectDelegateRolePage({route}: SelectDelegateRolePageProps) { const roleOptions = Object.values(CONST.DELEGATE_ROLE).map((role) => ({ value: role, - text: translate('delegate.role', {role}), - alternateText: translate('delegate.roleDescription', {role}), + text: translate('delegate.role', role), + alternateText: translate('delegate.roleDescription', role), isSelected: role === route.params.role, keyForList: role, })); diff --git a/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx b/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx index 640e5cd1d392..c42fcb487932 100644 --- a/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx +++ b/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx @@ -50,9 +50,9 @@ function UpdateDelegateRolePage({route}: UpdateDelegateRolePageProps) { const roleOptions = Object.values(CONST.DELEGATE_ROLE).map((role) => ({ value: role, - text: translate('delegate.role', {role}), + text: translate('delegate.role', role), keyForList: role, - alternateText: translate('delegate.roleDescription', {role}), + alternateText: translate('delegate.roleDescription', role), isSelected: role === matchingRole, })); diff --git a/src/pages/settings/Subscription/PaymentCard/index.tsx b/src/pages/settings/Subscription/PaymentCard/index.tsx index 245084fc2f0e..93a56a3a4b9d 100644 --- a/src/pages/settings/Subscription/PaymentCard/index.tsx +++ b/src/pages/settings/Subscription/PaymentCard/index.tsx @@ -66,10 +66,11 @@ function AddPaymentCard() { const subscriptionPricingInfo = hasTeam2025Pricing && isCollect ? translate('subscription.yourPlan.pricePerMemberPerMonth', convertToShortDisplayString(subscriptionPrice, preferredCurrency)) - : translate(`subscription.yourPlan.${isCollect ? 'collect' : 'control'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, { - lower: convertToShortDisplayString(subscriptionPrice, preferredCurrency), - upper: convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), - }); + : translate( + `subscription.yourPlan.${isCollect ? 'collect' : 'control'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, + convertToShortDisplayString(subscriptionPrice, preferredCurrency), + convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), + ); useEffect(() => { clearPaymentCardFormErrorAndSubmit(); diff --git a/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx b/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx index 1d6dde59d83e..82e1a41a67c9 100644 --- a/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx +++ b/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx @@ -48,10 +48,11 @@ function SubscriptionSettings() { const hasTeam2025Pricing = useHasTeam2025Pricing(); const subscriptionPrice = getSubscriptionPrice(subscriptionPlan, preferredCurrency, privateSubscription?.type, hasTeam2025Pricing); const illustrations = useMemoizedLazyIllustrations(['SubscriptionAnnual', 'SubscriptionPPU']); - const priceDetails = translate(`subscription.yourPlan.${subscriptionPlan === CONST.POLICY.TYPE.CORPORATE ? 'control' : 'collect'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, { - lower: convertToShortDisplayString(subscriptionPrice, preferredCurrency), - upper: convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), - }); + const priceDetails = translate( + `subscription.yourPlan.${subscriptionPlan === CONST.POLICY.TYPE.CORPORATE ? 'control' : 'collect'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, + convertToShortDisplayString(subscriptionPrice, preferredCurrency), + convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), + ); const adminsChatReportID = isActivePolicyAdmin && activePolicy?.chatReportIDAdmins ? activePolicy.chatReportIDAdmins?.toString() : undefined; const shouldUseSimplifiedCollectUI = shouldUseSimplifiedCollectSubscriptionUI(subscriptionPlan, hasTeam2025Pricing); const collectPriceDisplay = convertToShortDisplayString(subscriptionPrice, preferredCurrency); diff --git a/src/pages/settings/Subscription/SubscriptionSettings/index.tsx b/src/pages/settings/Subscription/SubscriptionSettings/index.tsx index 6990b7f218f1..f3303dd1b075 100644 --- a/src/pages/settings/Subscription/SubscriptionSettings/index.tsx +++ b/src/pages/settings/Subscription/SubscriptionSettings/index.tsx @@ -86,10 +86,11 @@ function SubscriptionSettings() { const isExpensifyCodeApplied = !!privatePromoCode; const shouldShowExpensifyCodeHintText = isExpensifyCodeApplied && promoDiscountValue !== undefined; const subscriptionPrice = getSubscriptionPrice(subscriptionPlan, preferredCurrency, privateSubscription?.type, hasTeam2025Pricing); - const priceDetails = translate(`subscription.yourPlan.${subscriptionPlan === CONST.POLICY.TYPE.CORPORATE ? 'control' : 'collect'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, { - lower: convertToShortDisplayString(subscriptionPrice, preferredCurrency), - upper: convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), - }); + const priceDetails = translate( + `subscription.yourPlan.${subscriptionPlan === CONST.POLICY.TYPE.CORPORATE ? 'control' : 'collect'}.${isAnnual ? 'priceAnnual' : 'pricePayPerUse'}`, + convertToShortDisplayString(subscriptionPrice, preferredCurrency), + convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), + ); const adminsChatReportID = isActivePolicyAdmin && activePolicy?.chatReportIDAdmins ? activePolicy.chatReportIDAdmins?.toString() : undefined; const shouldUseSimplifiedCollectUI = shouldUseSimplifiedCollectSubscriptionUI(subscriptionPlan, hasTeam2025Pricing); const collectPriceDisplay = convertToShortDisplayString(subscriptionPrice, preferredCurrency); diff --git a/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx b/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx index a4cc41193ab5..97cb2d138172 100644 --- a/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx +++ b/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx @@ -144,10 +144,7 @@ function DynamicWorkspaceOverviewPlanTypePage({policy}: WithPolicyProps) { <> {isPlanTypeLocked ? ( - {translate('workspace.planTypePage.lockedPlanDescription', { - count: privateSubscription?.userCount ?? 1, - annualSubscriptionEndDate: autoRenewalDate, - })}{' '} + {translate('workspace.planTypePage.lockedPlanDescription', privateSubscription?.userCount ?? 1, autoRenewalDate)}{' '} Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION.getRoute(Navigation.getActiveRoute()))}> {translate('workspace.planTypePage.subscriptions')} diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index bf857385ae60..5c1cd3c773b7 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -194,8 +194,8 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { text: translate('workspace.accounting.disconnect'), onSelected: () => { showConfirmModal({ - title: translate('workspace.accounting.disconnectTitle', {connectionName: connectedIntegration}), - prompt: translate('workspace.accounting.disconnectPrompt', {connectionName: connectedIntegration}), + title: translate('workspace.accounting.disconnectTitle', connectedIntegration), + prompt: translate('workspace.accounting.disconnectPrompt', connectedIntegration), confirmText: translate('workspace.accounting.disconnect'), cancelText: translate('common.cancel'), danger: true, @@ -468,7 +468,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { let connectionMessage; if (isSyncInProgress && connectionSyncProgress?.stageInProgress) { - connectionMessage = translate('workspace.accounting.connections.syncStageName', {stage: connectionSyncProgress?.stageInProgress}); + connectionMessage = translate('workspace.accounting.connections.syncStageName', connectionSyncProgress?.stageInProgress); } else if (!isConnectionVerified) { connectionMessage = translate('workspace.accounting.notSync'); } else { diff --git a/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx b/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx index 1185e6a7d638..0ee7696fc56b 100644 --- a/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx +++ b/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx @@ -53,12 +53,12 @@ function CertiniaExistingConnectionsPage({route}: CertiniaExistingConnectionsPag testID="CertiniaExistingConnectionsPage" > Navigation.goBack()} /> - {translate('workspace.common.existingConnectionsDescription', {connectionName: CONST.POLICY.CONNECTIONS.NAME.CERTINIA})} + {translate('workspace.common.existingConnectionsDescription', CONST.POLICY.CONNECTIONS.NAME.CERTINIA)} Navigation.goBack()} /> - {translate('workspace.common.existingConnectionsDescription', {connectionName: CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT})} + {translate('workspace.common.existingConnectionsDescription', CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT)} { const menuItemTitleKey = getDisplayTypeTranslationKey(sageIntacctConfig?.mappings?.[mapping]); return { - description: Str.recapitalize(translate('workspace.intacct.mappingTitle', {mappingName: mapping})), + description: Str.recapitalize(translate('workspace.intacct.mappingTitle', mapping)), action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_TOGGLE_MAPPINGS.getRoute(policyID, mapping)), title: menuItemTitleKey ? translate(menuItemTitleKey) : undefined, subscribedSettings: [mapping], diff --git a/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx b/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx index 6d848571eb82..8ee5e0dcdf95 100644 --- a/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx +++ b/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx @@ -74,7 +74,7 @@ function SageIntacctToggleMappingsPage({route}: SageIntacctToggleMappingsPagePro return ( Navigation.goBack(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_IMPORT.getRoute(policyID))} > - + Navigation.goBack()} /> - {translate('workspace.common.existingConnectionsDescription', {connectionName: CONST.POLICY.CONNECTIONS.NAME.QBD})} + {translate('workspace.common.existingConnectionsDescription', CONST.POLICY.CONNECTIONS.NAME.QBD)} 0) { - errors[INPUT_IDS.INITIAL_VALUE] = translate('workspace.reportFields.unsupportedFormulaValueError', { - value: unsupportedFormulaParts.join(', '), - }); + errors[INPUT_IDS.INITIAL_VALUE] = translate('workspace.reportFields.unsupportedFormulaValueError', unsupportedFormulaParts.join(', ')); } } diff --git a/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx b/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx index 00e5f16fc426..9d0cba78ae5a 100644 --- a/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx +++ b/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx @@ -79,9 +79,7 @@ function ReportFieldsInitialValuePage({ if ((reportField?.type === CONST.REPORT_FIELD_TYPES.TEXT || reportField?.type === CONST.REPORT_FIELD_TYPES.FORMULA) && !!formInitialValue && !errors[INPUT_IDS.INITIAL_VALUE]) { const unsupportedFormulaParts = getUnsupportedReportFieldFormulaParts(formInitialValue); if (unsupportedFormulaParts.length > 0) { - errors[INPUT_IDS.INITIAL_VALUE] = translate('workspace.reportFields.unsupportedFormulaValueError', { - value: unsupportedFormulaParts.join(', '), - }); + errors[INPUT_IDS.INITIAL_VALUE] = translate('workspace.reportFields.unsupportedFormulaValueError', unsupportedFormulaParts.join(', ')); } } diff --git a/tests/ui/ReportActionItemTest.tsx b/tests/ui/ReportActionItemTest.tsx index 680196a26d6c..a1938584a045 100644 --- a/tests/ui/ReportActionItemTest.tsx +++ b/tests/ui/ReportActionItemTest.tsx @@ -770,7 +770,7 @@ describe('ReportActionItem', () => { await waitForBatchedUpdatesWithAct(); // Then the action message should be displayed - expect(screen.getByText(translateLocal('iou.paidElsewhere', {}))).toBeOnTheScreen(); + expect(screen.getByText(translateLocal('iou.paidElsewhere'))).toBeOnTheScreen(); }); }); diff --git a/tests/unit/ModifiedExpenseMessageTest.ts b/tests/unit/ModifiedExpenseMessageTest.ts index 3f4082220901..48b2aa5b4951 100644 --- a/tests/unit/ModifiedExpenseMessageTest.ts +++ b/tests/unit/ModifiedExpenseMessageTest.ts @@ -132,7 +132,7 @@ describe('ModifiedExpenseMessage', () => { it('returns "moved expense from personal space to chat with reportName" message when moving an expense to policy expense chat with only reportName', () => { const policyExpenseReport = createRandomReport(1, CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT); const result = getMovedFromOrToReportMessage(translateLocal, undefined, policyExpenseReport, CURRENT_USER_LOGIN, undefined); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', {reportName: policyExpenseReport.reportName}); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', policyExpenseReport.reportName); expect(result).toEqual(expectedResult); }); it('returns "moved expense from personal space to policyName" message when moving an expense to policy expense chat with reportName and policyName', () => { @@ -141,10 +141,10 @@ describe('ModifiedExpenseMessage', () => { policyName: 'Policy', }; const result = getMovedFromOrToReportMessage(translateLocal, undefined, policyExpenseReport, CURRENT_USER_LOGIN, undefined); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', { - reportName: policyExpenseReport.reportName, - workspaceName: policyExpenseReport.policyName, - }); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', + policyExpenseReport.reportName, + policyExpenseReport.policyName, + ); expect(result).toEqual(expectedResult); }); it('returns "moved expense from personal space to workspaceName" using policy name from policy object when moving to policy expense chat', () => { @@ -162,10 +162,10 @@ describe('ModifiedExpenseMessage', () => { isPolicyExpenseChatEnabled: true, }; const result = getMovedFromOrToReportMessage(translateLocal, undefined, policyExpenseReport, CURRENT_USER_LOGIN, policy); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', { - reportName: policyExpenseReport.reportName, - workspaceName: policy.name, - }); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', + policyExpenseReport.reportName, + policy.name, + ); expect(result).toEqual(expectedResult); }); it('returns "changed the expense" message when moving an expense to policy expense chat without reportName', () => { @@ -195,7 +195,7 @@ describe('ModifiedExpenseMessage', () => { const result = getMovedFromOrToReportMessage(translateLocal, undefined, policyExpenseReport, CURRENT_USER_LOGIN, policy); // When a valid policy provides a name, the movedFromPersonalSpace message is returned // even if the report has no reportName, because policyName is sufficient. - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', {workspaceName: policy.name}); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', policy.name); expect(result).toEqual(expectedResult); }); it('returns "moved from personal space to reportName" message when moving an expense to a 1:1 DM', async () => { @@ -215,7 +215,7 @@ describe('ModifiedExpenseMessage', () => { }); const result = getMovedFromOrToReportMessage(translateLocal, undefined, dmReport, CURRENT_USER_LOGIN, undefined); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', {reportName: dmReportName}); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', dmReportName); expect(result).toEqual(expectedResult); }); }); @@ -1931,10 +1931,10 @@ describe('ModifiedExpenseMessage', () => { policyTags: undefined, currentUserLogin: 'test@example.com', }); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', { - reportName: movedToReport.reportName, - workspaceName: policy.name, - }); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', + movedToReport.reportName, + policy.name, + ); expect(result).toEqual(expectedResult); }); @@ -1957,10 +1957,9 @@ describe('ModifiedExpenseMessage', () => { policyTags: undefined, currentUserLogin: 'test@example.com', }); - const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', { - reportName: movedToReport.reportName, - workspaceName: movedToReport.policyName, - }); + const expectedResult = translate(CONST.LOCALES.EN as 'en', 'iou.movedFromPersonalSpace', movedToReport.reportName, + movedToReport.policyName, + ); expect(result).toEqual(expectedResult); }); }); diff --git a/tests/unit/OptionsListUtilsTest.tsx b/tests/unit/OptionsListUtilsTest.tsx index 4dbb529ccf9a..47360fcc736b 100644 --- a/tests/unit/OptionsListUtilsTest.tsx +++ b/tests/unit/OptionsListUtilsTest.tsx @@ -5444,9 +5444,9 @@ describe('OptionsListUtils', () => { }); expect(lastMessage).toBe( - translateLocal('reportArchiveReasons.policyDeleted', { - policyName: policy.name, - }), + translateLocal('reportArchiveReasons.policyDeleted', + policy.name, + ), ); }); @@ -5486,10 +5486,10 @@ describe('OptionsListUtils', () => { }); expect(lastMessage).toBe( - translateLocal('reportArchiveReasons.removedFromPolicy', { - displayName: 'Hidden', - policyName: policy.name, - }), + translateLocal('reportArchiveReasons.removedFromPolicy', + 'Hidden', + policy.name, + ), ); }); }); diff --git a/tests/unit/ReportActionsUtilsTest.ts b/tests/unit/ReportActionsUtilsTest.ts index 9bdae0749c5b..fb21b27b7959 100644 --- a/tests/unit/ReportActionsUtilsTest.ts +++ b/tests/unit/ReportActionsUtilsTest.ts @@ -2315,11 +2315,8 @@ describe('ReportActionsUtils', () => { const formattedEmail = formatPhoneNumber(email); const expectedCustomFieldMessage = translateLocal('report.actions.type.updatedCustomField1', formattedEmail, customFieldNewValue, customFieldOldValue); - const expectedRoleMessage = translateLocal('report.actions.type.updateRole', { - email: formattedEmail, - newRole: translateLocal('workspace.common.roleName', newRole).toLowerCase(), - currentRole: translateLocal('workspace.common.roleName', previousRole).toLowerCase(), - }); + const expectedRoleMessage = translateLocal('report.actions.type.updateRole', formattedEmail, translateLocal('workspace.common.roleName', newRole).toLowerCase(), translateLocal('workspace.common.roleName', previousRole).toLowerCase(), + ); const actual = ReportActionsUtils.getPolicyChangeLogUpdateEmployee(translateLocal, action); expect(actual).toBe(`${expectedCustomFieldMessage}, ${expectedRoleMessage}`); From 8226a4c222a6f8419ea0d5608bf5b3b4c1711f1b Mon Sep 17 00:00:00 2001 From: jakubstec Date: Tue, 21 Jul 2026 11:40:25 +0200 Subject: [PATCH 2/5] refactor: remove types from tranlations and update callsites part 2 --- src/components/AvatarPageFooter.tsx | 11 +++++------ src/components/AvatarWithImagePicker.tsx | 4 ++-- src/components/InteractiveStepSubHeader.tsx | 5 +---- src/components/InteractiveStepSubPageHeader.tsx | 5 +---- src/languages/de.ts | 4 ++-- src/languages/en.ts | 4 ++-- src/languages/es.ts | 4 ++-- src/languages/fr.ts | 4 ++-- src/languages/it.ts | 4 ++-- src/languages/ja.ts | 4 ++-- src/languages/nl.ts | 4 ++-- src/languages/params.ts | 3 --- src/languages/pl.ts | 4 ++-- src/languages/pt-BR.ts | 4 ++-- src/languages/zh-hans.ts | 4 ++-- src/libs/OptionsListUtils/index.ts | 15 +++++++++------ src/libs/Violations/ViolationsUtils.ts | 2 +- .../Agents/Fields/EditAgentAvatarPage.tsx | 6 +++--- .../settings/Profile/Avatar/AvatarPreview.tsx | 8 ++++---- .../settings/Profile/Avatar/UserProfileAvatar.tsx | 2 +- .../Profile/Avatar/useProfileAvatarForm.ts | 6 +++--- .../DynamicWorkspaceOverviewPlanTypePage.tsx | 2 +- .../rillet/RilletExistingConnectionsPage.tsx | 4 ++-- src/pages/workspace/hr/HRProviderCard.tsx | 2 +- 24 files changed, 54 insertions(+), 61 deletions(-) diff --git a/src/components/AvatarPageFooter.tsx b/src/components/AvatarPageFooter.tsx index 263252bd150d..f68d6aae46a8 100644 --- a/src/components/AvatarPageFooter.tsx +++ b/src/components/AvatarPageFooter.tsx @@ -13,8 +13,8 @@ type AvatarPageFooterProps = { /** Translation key of the validation error to show, if any */ validationError?: TranslationPaths | null | ''; - /** Params for the validation error translation */ - phraseParam?: Record; + /** Standalone params for the validation error translation */ + phraseArgs?: unknown[]; /** Whether the save button is enabled */ isDirty: boolean; @@ -23,7 +23,7 @@ type AvatarPageFooterProps = { onSave: () => void; }; -function AvatarPageFooter({validationError, phraseParam = {}, isDirty, onSave}: AvatarPageFooterProps) { +function AvatarPageFooter({validationError, phraseArgs = [], isDirty, onSave}: AvatarPageFooterProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -32,10 +32,9 @@ function AvatarPageFooter({validationError, phraseParam = {}, isDirty, onSave}: {!!validationError && ( string)(validationError, ...phraseArgs)}} type="error" /> )} diff --git a/src/components/AvatarWithImagePicker.tsx b/src/components/AvatarWithImagePicker.tsx index b0a82966ec00..b11fcdf54d2c 100644 --- a/src/components/AvatarWithImagePicker.tsx +++ b/src/components/AvatarWithImagePicker.tsx @@ -113,7 +113,7 @@ function AvatarWithImagePicker({ const isFocused = useIsFocused(); const [popoverPosition, setPopoverPosition] = useState({horizontal: 0, vertical: 0}); const [isMenuVisible, setIsMenuVisible] = useState(false); - const [errorData, setErrorData] = useState({validationError: null, phraseParam: {}}); + const [errorData, setErrorData] = useState({validationError: null, phraseArgs: []}); const {calculatePopoverPosition} = usePopoverPosition(); const anchorRef = useRef(null); const {translate} = useLocalize(); @@ -150,7 +150,7 @@ function AvatarWithImagePicker({ return; } - setError(null, {}); + setError(null); setIsMenuVisible(false); openCropper(image); }) diff --git a/src/components/InteractiveStepSubHeader.tsx b/src/components/InteractiveStepSubHeader.tsx index dccc78656859..ed3ea2a7a72e 100644 --- a/src/components/InteractiveStepSubHeader.tsx +++ b/src/components/InteractiveStepSubHeader.tsx @@ -95,10 +95,7 @@ function InteractiveStepSubHeader({stepNames, startStepIndex = 0, currentStepAcc > ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Sie haben sich bis zum Ende Ihres Jahresabonnements am ${annualSubscriptionEndDate} zu 1 aktivem Mitglied im Control-Tarif verpflichtet. Sie können ab dem ${annualSubscriptionEndDate} zu einem nutzungsbasierten Abonnement wechseln und in den Collect-Tarif herabstufen, indem Sie die automatische Verlängerung in`, other: `Sie haben sich bis zum Ende Ihres Jahresabonnements am ${annualSubscriptionEndDate} zu ${count} aktiven Mitgliedern im Control-Tarif verpflichtet. Ab dem ${annualSubscriptionEndDate} können Sie durch Deaktivieren der automatischen Verlängerung in ein nutzungsabhängiges Abonnement wechseln und auf den Collect-Tarif herabstufen in`, }), @@ -9490,7 +9490,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc duplicatedTransaction: 'Möglicherweise dupliziert', fieldRequired: 'Berichtsfelder sind erforderlich', futureDate: 'Zukünftiges Datum nicht erlaubt', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Lieferant nicht mehr gültig' : 'Anbieter nicht mehr gültig'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Lieferant nicht mehr gültig' : 'Anbieter nicht mehr gültig'), invoiceMarkup: (invoiceMarkup: number) => `Um ${invoiceMarkup}% erhöht`, maxAge: (maxAge: number) => `Datum ist älter als ${maxAge} Tage`, missingCategory: 'Fehlende Kategorie', diff --git a/src/languages/en.ts b/src/languages/en.ts index 5800ed3e4419..0a77a0fe55eb 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -8073,7 +8073,7 @@ const translations = { }, description: "Choose a plan that's right for you.", subscriptionLink: 'Learn more', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `You've committed to 1 active member on the Control plan until your annual subscription ends on ${annualSubscriptionEndDate}. You can switch to pay-per-use subscription and downgrade to the Collect plan starting ${annualSubscriptionEndDate} by disabling auto-renew in`, other: `You've committed to ${count} active members on the Control plan until your annual subscription ends on ${annualSubscriptionEndDate}. You can switch to pay-per-use subscription and downgrade to the Collect plan starting ${annualSubscriptionEndDate} by disabling auto-renew in`, }), @@ -9600,7 +9600,7 @@ const translations = { duplicatedTransaction: 'Potential duplicate', fieldRequired: 'Report fields are required', futureDate: 'Future date not allowed', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Supplier no longer valid' : 'Vendor no longer valid'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Supplier no longer valid' : 'Vendor no longer valid'), invoiceMarkup: (invoiceMarkup: number) => `Marked up by ${invoiceMarkup}%`, maxAge: (maxAge: number) => `Date older than ${maxAge} days`, missingCategory: 'Missing category', diff --git a/src/languages/es.ts b/src/languages/es.ts index 89e3c035243a..8495a7eae357 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -7083,7 +7083,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, }, description: 'Elige el plan adecuado para ti.', subscriptionLink: 'Más información', - lockedPlanDescription: (count, annualSubscriptionEndDate) => ({ + lockedPlanDescription: ({count}, annualSubscriptionEndDate) => ({ one: `Tienes un compromiso anual de 1 miembro activo en el plan Controlar hasta el ${annualSubscriptionEndDate}. Puedes cambiar a una suscripción de pago por uso y desmejorar al plan Recopilar a partir del ${annualSubscriptionEndDate} desactivando la renovación automática en`, other: `Tienes un compromiso anual de ${count} miembros activos en el plan Controlar hasta el ${annualSubscriptionEndDate}. Puedes cambiar a una suscripción de pago por uso y desmejorar al plan Recopilar a partir del ${annualSubscriptionEndDate} desactivando la renovación automática en`, }), @@ -9690,7 +9690,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, duplicatedTransaction: 'Posible duplicado', fieldRequired: 'Los campos del informe son obligatorios', futureDate: 'Fecha futura no permitida', - inactiveVendor: ({isSupplier = false} = {}) => (isSupplier ? 'El proveedor ya no es válido' : 'El proveedor ya no es válido'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'El proveedor ya no es válido' : 'El proveedor ya no es válido'), invoiceMarkup: (invoiceMarkup) => `Incrementado un ${invoiceMarkup}%`, maxAge: (maxAge) => `Fecha de más de ${maxAge} días`, missingCategory: 'Falta categoría', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 0a41e46fc3f3..a83077ac90f0 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -7938,7 +7938,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e }, description: 'Choisissez l’offre qui vous convient.', subscriptionLink: 'En savoir plus', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Vous vous êtes engagé à 1 membre actif sur le plan Control jusqu'à la fin de votre abonnement annuel, le ${annualSubscriptionEndDate}. Vous pourrez passer à un abonnement à l’usage et rétrograder vers le plan Collect à partir du ${annualSubscriptionEndDate} en désactivant le renouvellement automatique dans`, other: `Vous vous êtes engagé·e à avoir ${count} membres actifs sur le forfait Control jusqu’à la fin de votre abonnement annuel le ${annualSubscriptionEndDate}. Vous pouvez passer à un abonnement à l’usage et rétrograder vers le forfait Collect à partir du ${annualSubscriptionEndDate} en désactivant le renouvellement automatique dans`, }), @@ -9527,7 +9527,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e duplicatedTransaction: 'Doublon potentiel', fieldRequired: 'Les champs de note de frais sont obligatoires', futureDate: 'Date future non autorisée', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Fournisseur plus valide' : 'Fournisseur plus valide'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Fournisseur plus valide' : 'Fournisseur plus valide'), invoiceMarkup: (invoiceMarkup: number) => `Majoration de ${invoiceMarkup} %`, maxAge: (maxAge: number) => `Date antérieure de plus de ${maxAge} jours`, missingCategory: 'Catégorie manquante', diff --git a/src/languages/it.ts b/src/languages/it.ts index a2f2ab212cad..b412da3bfc36 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -7888,7 +7888,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, }, description: 'Scegli il piano più adatto a te.', subscriptionLink: 'Scopri di più', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Ti sei impegnato per 1 membro attivo nel piano Control fino al termine dell’abbonamento annuale, il ${annualSubscriptionEndDate}. Puoi passare all’abbonamento a consumo e effettuare il downgrade al piano Collect a partire dal ${annualSubscriptionEndDate} disattivando il rinnovo automatico in`, other: `Ti sei impegnato per ${count} membri attivi nel piano Control fino alla fine dell’abbonamento annuale, il ${annualSubscriptionEndDate}. Puoi passare all’abbonamento a consumo e effettuare il downgrade al piano Collect a partire dal ${annualSubscriptionEndDate} disattivando il rinnovo automatico in`, }), @@ -9476,7 +9476,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, duplicatedTransaction: 'Duplice potenziale', fieldRequired: 'I campi del report sono obbligatori', futureDate: 'Data futura non consentita', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Fornitore non più valido' : 'Fornitore non più valido'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Fornitore non più valido' : 'Fornitore non più valido'), invoiceMarkup: (invoiceMarkup: number) => `Maggiorato del ${invoiceMarkup}%`, maxAge: (maxAge: number) => `Data precedente a ${maxAge} giorni`, missingCategory: 'Categoria mancante', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 65c3e5e677d4..09b0ba07bb75 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -7793,7 +7793,7 @@ ${reportName}`, }, description: '自分に合ったプランをお選びください。', subscriptionLink: '詳しく見る', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `${annualSubscriptionEndDate} までの年間サブスクリプション期間中、Control プランでアクティブメンバー 1 名を利用することに同意しています。${annualSubscriptionEndDate} 以降、 自動更新を無効にすることで、従量課金サブスクリプションに切り替え、Collect プランへダウングレードできます。`, other: `あなたは、年間サブスクリプションが${annualSubscriptionEndDate}に終了するまで、Controlプランでアクティブメンバー${count}名を契約しています。${annualSubscriptionEndDate}以降は、自動更新を無効にすることで、従量課金制サブスクリプションに切り替え、Collectプランへダウングレードできます。その操作は、`, }), @@ -9348,7 +9348,7 @@ ${reportName}`, duplicatedTransaction: '重複の可能性', fieldRequired: 'レポートの項目は必須です', futureDate: '将来の日付は使用できません', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'サプライヤーは無効です' : 'ベンダーは無効です'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'サプライヤーは無効です' : 'ベンダーは無効です'), invoiceMarkup: (invoiceMarkup: number) => `${invoiceMarkup}%値上げ済み`, maxAge: (maxAge: number) => `日付が${maxAge}日より前です`, missingCategory: 'カテゴリが未選択です', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 0455a70c6dc3..5670a3e1f0f5 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -7865,7 +7865,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, }, description: 'Kies een abonnement dat bij je past.', subscriptionLink: 'Meer informatie', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Je hebt je vastgelegd op 1 actief lid in het Control-abonnement tot je jaarlijkse abonnement afloopt op ${annualSubscriptionEndDate}. Je kunt overstappen op een pay-per-use-abonnement en downgraden naar het Collect-abonnement vanaf ${annualSubscriptionEndDate} door automatisch verlengen uit te schakelen in`, other: `Je hebt je vastgelegd op ${count} actieve leden op het Control-abonnement totdat je jaarlijkse abonnement eindigt op ${annualSubscriptionEndDate}. Je kunt overschakelen naar een betaling-per-gebruik-abonnement en downgraden naar het Collect-abonnement vanaf ${annualSubscriptionEndDate} door automatisch verlengen uit te schakelen in`, }), @@ -9443,7 +9443,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, duplicatedTransaction: 'Mogelijke duplicaat', fieldRequired: 'Rapportvelden zijn verplicht', futureDate: 'Toekomstige datum niet toegestaan', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Leverancier niet meer geldig' : 'Leverancier niet meer geldig'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Leverancier niet meer geldig' : 'Leverancier niet meer geldig'), invoiceMarkup: (invoiceMarkup: number) => `Met ${invoiceMarkup}% verhoogd`, maxAge: (maxAge: number) => `Datum ouder dan ${maxAge} dagen`, missingCategory: 'Ontbrekende categorie', diff --git a/src/languages/params.ts b/src/languages/params.ts index 32c4a75ffb0e..d6b9f04a0ffa 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -6,8 +6,6 @@ type ChangeFieldParams = {oldValue?: string; newValue: string; fieldName: string type ExportedToIntegrationParams = {label: string; markedManually?: boolean; inProgress?: boolean; lastModified?: string}; -type ViolationsInactiveVendorParams = {isSupplier?: boolean}; - type IntegrationsMessageParams = { label: string; result: { @@ -30,7 +28,6 @@ type UnshareParams = {to: string}; export type { ParentNavigationSummaryParams, StepCounterParams, - ViolationsInactiveVendorParams, ChangeFieldParams, ExportedToIntegrationParams, IntegrationsMessageParams, diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 07f89ba281f9..3ecedeec0cef 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -7847,7 +7847,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, }, description: 'Wybierz plan odpowiedni dla siebie.', subscriptionLink: 'Dowiedz się więcej', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Zobowiązałeś(-aś) się do 1 aktywnego członka w planie Control do końca rocznej subskrypcji ${annualSubscriptionEndDate}. Możesz przejść na subskrypcję z rozliczaniem za użycie i zmienić plan na Collect od ${annualSubscriptionEndDate}, wyłączając automatyczne odnawianie w`, other: `Zobowiązałeś(-aś) się do ${count} aktywnych członków w planie Control do końca rocznej subskrypcji ${annualSubscriptionEndDate}. Możesz przejść na subskrypcję płatną za użycie i zmienić plan na Collect od ${annualSubscriptionEndDate}, wyłączając automatyczne odnawianie w`, }), @@ -9420,7 +9420,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, duplicatedTransaction: 'Potencjalny duplikat', fieldRequired: 'Pola raportu są wymagane', futureDate: 'Przyszła data jest niedozwolona', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Dostawca nie jest już prawidłowy' : 'Dostawca nie jest już prawidłowy'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Dostawca nie jest już prawidłowy' : 'Dostawca nie jest już prawidłowy'), invoiceMarkup: (invoiceMarkup: number) => `Podwyższono o ${invoiceMarkup}%`, maxAge: (maxAge: number) => `Data starsza niż ${maxAge} dni`, missingCategory: 'Brak kategorii', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 9bee6a259ca4..8812b7430927 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -7858,7 +7858,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, }, description: 'Escolha o plano ideal para você.', subscriptionLink: 'Saiba mais', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `Você se comprometeu com 1 membro ativo no plano Control até o fim da sua assinatura anual em ${annualSubscriptionEndDate}. Você pode mudar para a assinatura pré-paga por uso e fazer downgrade para o plano Collect a partir de ${annualSubscriptionEndDate}, desativando a renovação automática em`, other: `Você se comprometeu com ${count} membros ativos no plano Control até o fim da sua assinatura anual em ${annualSubscriptionEndDate}. Você pode mudar para a assinatura pós-paga e fazer downgrade para o plano Collect a partir de ${annualSubscriptionEndDate} desativando a renovação automática em`, }), @@ -9432,7 +9432,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, duplicatedTransaction: 'Possível duplicata', fieldRequired: 'Os campos do relatório são obrigatórios', futureDate: 'Data futura não permitida', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'Fornecedor não é mais válido' : 'Fornecedor não é mais válido'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'Fornecedor não é mais válido' : 'Fornecedor não é mais válido'), invoiceMarkup: (invoiceMarkup: number) => `Reajustado em ${invoiceMarkup}%`, maxAge: (maxAge: number) => `Data anterior a ${maxAge} dias`, missingCategory: 'Categoria ausente', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 397b53512be4..3d95d3c0fa31 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -7616,7 +7616,7 @@ ${reportName}`, }, description: '选择适合你的方案。', subscriptionLink: '了解详情', - lockedPlanDescription: (count: number, annualSubscriptionEndDate: string) => ({ + lockedPlanDescription: ({count}: {count: number}, annualSubscriptionEndDate: string) => ({ one: `在 Control 方案中,你已承诺在年度订阅到期(${annualSubscriptionEndDate})前保持 1 位活跃成员。你可以在 ${annualSubscriptionEndDate} 起关闭自动续订,以改为按使用付费订阅并降级到 Collect 方案,操作入口在`, other: `在年费订阅于${annualSubscriptionEndDate}结束之前,你已承诺在 Control 方案中保留 ${count} 名活跃成员。你可以在${annualSubscriptionEndDate}起,通过关闭自动续订,改为按使用量付费订阅并降级到 Collect 方案,操作入口在`, }), @@ -9134,7 +9134,7 @@ ${reportName}`, duplicatedTransaction: '可能重复', fieldRequired: '报表字段为必填项', futureDate: '不允许使用未来日期', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? '供应商不再有效' : '供应商不再有效'), + inactiveVendor: (isSupplier = false) => (isSupplier ? '供应商不再有效' : '供应商不再有效'), invoiceMarkup: (invoiceMarkup: number) => `加价 ${invoiceMarkup}%`, maxAge: (maxAge: number) => `日期早于 ${maxAge} 天`, missingCategory: '缺少类别', diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index d80db9ef9f48..a1907c2da662 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -722,20 +722,23 @@ function getLastMessageTextForReport({ (isClosedAction(lastOriginalReportAction) && getOriginalMessage(lastOriginalReportAction)?.reason) || CONST.REPORT.ARCHIVE_REASON.DEFAULT; switch (archiveReason) { case CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED: - lastMessageTextFromReport = translate('reportArchiveReasons.accountClosed', formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails))); + lastMessageTextFromReport = translate( + 'reportArchiveReasons.accountClosed', + formatPhoneNumberPhoneUtils(temporaryGetDisplayNameOrDefault({passedPersonalDetails: lastActorDetails, translate})), + ); break; case CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY: lastMessageTextFromReport = translate( 'reportArchiveReasons.removedFromPolicy', - formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails)), + formatPhoneNumberPhoneUtils(temporaryGetDisplayNameOrDefault({passedPersonalDetails: lastActorDetails, translate})), getPolicyName({report, policy}), ); break; case CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED: { - lastMessageTextFromReport = translate(`reportArchiveReasons.${archiveReason}`, { - displayName: formatPhoneNumberPhoneUtils(temporaryGetDisplayNameOrDefault({passedPersonalDetails: lastActorDetails, translate})), - policyName: getPolicyName({report, policy, unavailableTranslation: translate('workspace.common.unavailable')}), - }); + lastMessageTextFromReport = translate( + 'reportArchiveReasons.policyDeleted', + getPolicyName({report, policy, unavailableTranslation: translate('workspace.common.unavailable')}), + ); break; } case CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED: { diff --git a/src/libs/Violations/ViolationsUtils.ts b/src/libs/Violations/ViolationsUtils.ts index 8ae6ce5e7ec6..7ac21d41b1ee 100644 --- a/src/libs/Violations/ViolationsUtils.ts +++ b/src/libs/Violations/ViolationsUtils.ts @@ -997,7 +997,7 @@ const ViolationsUtils = { case 'futureDate': return translate('violations.futureDate'); case 'inactiveVendor': - return translate('violations.inactiveVendor', {isSupplier: isSupplierViolation}); + return translate('violations.inactiveVendor', isSupplierViolation); case 'invoiceMarkup': return translate('violations.invoiceMarkup', invoiceMarkup); case 'maxAge': diff --git a/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx b/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx index a5130b5620e0..ebcd91c628a1 100644 --- a/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx +++ b/src/pages/settings/Agents/Fields/EditAgentAvatarPage.tsx @@ -73,7 +73,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset const [selectedBotAvatar, setSelectedBotAvatar] = useState(() => initialBotAvatar); const [imageData, setImageData] = useState(EMPTY_IMAGE_DATA); - const [errorData, setErrorData] = useState<{validationError: TranslationPaths | null; phraseParam: Record}>({validationError: null, phraseParam: {}}); + const [errorData, setErrorData] = useState<{validationError: TranslationPaths | null; phraseArgs: unknown[]}>({validationError: null, phraseArgs: []}); const isDirty = selectedBotAvatar !== initialBotAvatar || imageData.uri !== ''; @@ -107,7 +107,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset setErrorData({validationError: result.errorKey ?? null, phraseArgs: result.errorArgs ?? []}); return; } - setErrorData({validationError: null, phraseParam: {}}); + setErrorData({validationError: null, phraseArgs: []}); openCropper(image); }) .catch(() => { @@ -216,7 +216,7 @@ function EditAgentAvatarContent({accountID, fallbackRoute, onSave, initialPreset diff --git a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx index e89a8fd09203..6363228aacf1 100644 --- a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx +++ b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx @@ -39,7 +39,7 @@ type AvatarPreviewProps = { /** The image data */ imageData: ImageData; /** The function to set the error */ - setError: (error: TranslationPaths | null, phraseParam: Record) => void; + setError: (error: TranslationPaths | null, phraseArgs?: unknown[]) => void; /** Opens the avatar crop screen for the picked image */ openCropper: (image: FileObject) => void; }; @@ -98,16 +98,16 @@ function AvatarPreview({selected, isRemoved, onImageRemoved, avatarCaptureRef, i return; } - setError(null, {}); + setError(null); openCropper(image); }) .catch(() => { - setError('attachmentPicker.errorWhileSelectingCorruptedAttachment', []); + setError('attachmentPicker.errorWhileSelectingCorruptedAttachment'); }); }; const clearError = () => { - setError(null, []); + setError(null); }; const {createMenuItems} = useAvatarMenu({ diff --git a/src/pages/settings/Profile/Avatar/UserProfileAvatar.tsx b/src/pages/settings/Profile/Avatar/UserProfileAvatar.tsx index f2d9738f3a1b..7e1a6b0d7b0d 100644 --- a/src/pages/settings/Profile/Avatar/UserProfileAvatar.tsx +++ b/src/pages/settings/Profile/Avatar/UserProfileAvatar.tsx @@ -66,7 +66,7 @@ function UserProfileAvatar() { diff --git a/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts b/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts index a47b6f9d4bec..4ac93b367df0 100644 --- a/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts +++ b/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts @@ -21,7 +21,7 @@ const EMPTY_FILE = {uri: '', name: '', type: '', file: null}; function useProfileAvatarForm() { const [errorData, setErrorData] = useState({ validationError: null, - phraseParam: {}, + phraseArgs: [], }); const [selected, setSelected] = useState(); const [imageData, setImageData] = useState({...EMPTY_FILE}); @@ -37,8 +37,8 @@ function useProfileAvatarForm() { getHasUnsavedChanges: () => isDirty, }); - const setError = (error: TranslationPaths | null, phraseParam: Record) => { - setErrorData({validationError: error, phraseParam}); + const setError = (error: TranslationPaths | null, phraseArgs: unknown[] = []) => { + setErrorData({validationError: error, phraseArgs}); }; const onImageSelected = (file: File | CustomRNImageManipulatorResult) => { diff --git a/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx b/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx index 4ab5154dab3d..24d149a156f3 100644 --- a/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx +++ b/src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx @@ -153,7 +153,7 @@ function DynamicWorkspaceOverviewPlanTypePage({policy}: WithPolicyProps) { <> {isPlanTypeLocked ? ( - {translate('workspace.planTypePage.lockedPlanDescription', privateSubscription?.userCount ?? 1, autoRenewalDate)}{' '} + {translate('workspace.planTypePage.lockedPlanDescription', {count: privateSubscription?.userCount ?? 1}, autoRenewalDate)}{' '} Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION.getRoute(Navigation.getActiveRoute()))}> {translate('workspace.planTypePage.subscriptions')} diff --git a/src/pages/workspace/accounting/rillet/RilletExistingConnectionsPage.tsx b/src/pages/workspace/accounting/rillet/RilletExistingConnectionsPage.tsx index f2840272eab3..2968a802b9bf 100644 --- a/src/pages/workspace/accounting/rillet/RilletExistingConnectionsPage.tsx +++ b/src/pages/workspace/accounting/rillet/RilletExistingConnectionsPage.tsx @@ -56,12 +56,12 @@ function RilletExistingConnectionsPage({route}: RilletExistingConnectionsPagePro testID="RilletExistingConnectionsPage" > Navigation.goBack()} /> - {translate('workspace.common.existingConnectionsDescription', {connectionName: CONST.POLICY.CONNECTIONS.NAME.RILLET})} + {translate('workspace.common.existingConnectionsDescription', CONST.POLICY.CONNECTIONS.NAME.RILLET)} Date: Tue, 21 Jul 2026 11:56:28 +0200 Subject: [PATCH 3/5] fix: tests, eslint --- src/components/AvatarPageFooter.tsx | 1 + src/components/AvatarWithImagePicker.tsx | 4 +++- .../ExportPrimaryAction.tsx | 2 ++ src/hooks/useExportActions.ts | 2 ++ src/libs/OptionsListUtils/index.ts | 2 +- src/libs/ReportActionsUtils.ts | 5 ++--- tests/unit/AvatarUtilsTest.ts | 20 +++++-------------- tests/unit/ModifiedExpenseMessageTest.ts | 2 +- tests/unit/ReportActionsUtilsTest.ts | 2 +- 9 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/components/AvatarPageFooter.tsx b/src/components/AvatarPageFooter.tsx index f68d6aae46a8..996cf3a7d2ba 100644 --- a/src/components/AvatarPageFooter.tsx +++ b/src/components/AvatarPageFooter.tsx @@ -34,6 +34,7 @@ function AvatarPageFooter({validationError, phraseArgs = [], isDirty, onSave}: A style={styles.mv5} // `phraseArgs` is an open list but `translate` accepts only the params shape for the // given key; the cast is safe because callers always pass params matching `validationError`. + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion messages={{validationError: (translate as (key: TranslationPaths, ...args: unknown[]) => string)(validationError, ...phraseArgs)}} type="error" /> diff --git a/src/components/AvatarWithImagePicker.tsx b/src/components/AvatarWithImagePicker.tsx index b11fcdf54d2c..ddbd0ca056c8 100644 --- a/src/components/AvatarWithImagePicker.tsx +++ b/src/components/AvatarWithImagePicker.tsx @@ -291,7 +291,9 @@ function AvatarWithImagePicker({ {!!errorData.validationError && ( string)(errorData.validationError, ...errorData.phraseArgs)}} type="error" /> diff --git a/src/components/MoneyReportHeaderPrimaryAction/ExportPrimaryAction.tsx b/src/components/MoneyReportHeaderPrimaryAction/ExportPrimaryAction.tsx index 169af015e86a..dcaaaff63d5b 100644 --- a/src/components/MoneyReportHeaderPrimaryAction/ExportPrimaryAction.tsx +++ b/src/components/MoneyReportHeaderPrimaryAction/ExportPrimaryAction.tsx @@ -33,6 +33,8 @@ function ExportPrimaryAction({reportID, onExportModalOpen}: ExportPrimaryActionP return (