diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index 22e345be2c17..8e6fa9538eb1 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -237,7 +237,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 bfc23d856cb6..cf69f6fc290c 100644 --- a/src/components/AccountingConnectionConfirmationModal.tsx +++ b/src/components/AccountingConnectionConfirmationModal.tsx @@ -17,11 +17,11 @@ function AccountingConnectionConfirmationModal({integrationToConnect, onCancel, return ( ; /** Whether the save button is enabled */ @@ -32,8 +32,6 @@ function AvatarPageFooter({validationError, phraseParam = {}, isDirty, onSave}: {!!validationError && ( ) => { + const setError = (error: TranslationPaths | null, phraseParam: Record = {}) => { setErrorData({ validationError: error, phraseParam, @@ -291,7 +291,7 @@ function AvatarWithImagePicker({ {!!errorData.validationError && ( diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index ee5e7a94eb30..d0880825f4f6 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -117,8 +117,9 @@ function HeaderWithBackButton({ ); const middleContent = useMemo(() => { + const stepCounterTranslation = stepCounter ? translate('stepCounter', stepCounter.step, stepCounter.total, stepCounter.text) : undefined; if (progressBarPercentage) { - const progressBarLabel = stepCounter ? `${translate('common.progressBarLabel')}, ${translate('stepCounter', stepCounter)}` : undefined; + const progressBarLabel = stepCounter ? `${translate('common.progressBarLabel')}, ${stepCounterTranslation}` : undefined; return ( <> {/* Reserves as much space for the middleContent as possible */} @@ -156,7 +157,7 @@ function HeaderWithBackButton({ return (
- {translate('workspace.common.exportIntegrationSelected', { + {translate( + 'workspace.common.exportIntegrationSelected', // connectedIntegration is guaranteed non-null when EXPORT_TO_ACCOUNTING is the primary action // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - connectionName: connectedIntegration!, - })} + connectedIntegration!, + )} ); diff --git a/src/components/ParentNavigationSubtitle.tsx b/src/components/ParentNavigationSubtitle.tsx index 5537e13351f5..4cead0565944 100644 --- a/src/components/ParentNavigationSubtitle.tsx +++ b/src/components/ParentNavigationSubtitle.tsx @@ -304,7 +304,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 8270c86c6cb7..38f99ae96ae3 100644 --- a/src/components/ReportActionItem/ExportWithDropdownMenu.tsx +++ b/src/components/ReportActionItem/ExportWithDropdownMenu.tsx @@ -76,7 +76,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, }, { @@ -122,7 +122,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 503ba94bf501..5e814cfcdd28 100644 --- a/src/hooks/useExportActions.ts +++ b/src/hooks/useExportActions.ts @@ -157,10 +157,9 @@ 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!, - }), + // connectedIntegrationFallback is guaranteed when this export option is offered + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + 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 c0ecc3b98659..bcef4373e550 100644 --- a/src/hooks/useExportAgainModal.ts +++ b/src/hooks/useExportAgainModal.ts @@ -32,10 +32,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 bb77d41a79d8..3cf912cd2ebc 100644 --- a/src/hooks/useLifecycleActions.tsx +++ b/src/hooks/useLifecycleActions.tsx @@ -150,11 +150,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 76b520f7924d..905aa0adf865 100644 --- a/src/hooks/useSearchBulkActions.ts +++ b/src/hooks/useSearchBulkActions.ts @@ -1691,10 +1691,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 8010af4208e0..c597b8320345 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -837,8 +798,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'; @@ -847,7 +808,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'; @@ -932,16 +893,15 @@ 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}: {displayName: string}) => `Dieser Chat ist nicht mehr aktiv, weil ${displayName} ihr Konto geschlossen hat.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => - `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.POLICY_DELETED]: ({policyName}: {policyName: string}) => `Dieser Chat ist nicht mehr aktiv, weil ${policyName} kein aktiver Workspace mehr ist.`, + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {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.', }, @@ -1464,7 +1424,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`, @@ -1524,8 +1484,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) => - `Ausgabe von persönlichem Bereich nach ${workspaceName ?? `Chat mit ${reportName}`} verschoben`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `Ausgabe von persönlichem Bereich nach ${workspaceName ?? `Chat mit ${reportName}`} verschoben`, movedToPersonalSpace: 'Ausgabe in persönlichen Bereich verschoben', error: { invalidCategoryLength: 'Der Kategoriename überschreitet 255 Zeichen. Bitte kürzen Sie ihn oder wählen Sie eine andere Kategorie.', @@ -1860,10 +1819,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}: {maxUploadSizeInMB: number}) => `Das ausgewählte Bild überschreitet die maximale Uploadgröße von ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `Das Profilbild muss einer der folgenden Typen sein: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Profilbild bearbeiten', @@ -2536,7 +2495,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.`, @@ -3698,7 +3657,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}`; @@ -4610,7 +4569,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', @@ -4621,11 +4580,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.`, @@ -5641,7 +5600,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'; @@ -6390,7 +6349,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.', }, @@ -6770,7 +6729,7 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`, 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'; @@ -6800,13 +6759,13 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`, 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'; @@ -6835,12 +6794,12 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`, [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', @@ -6860,7 +6819,7 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -7028,12 +6987,11 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`, exportCompanyCard: 'Firmenkartenausgaben exportieren als', exportDate: 'Exportdatum', defaultVendor: 'Standardanbieter', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Spesen, die nicht automatisch abgeglichen werden, werden standardmäßig diesem Anbieter zugeordnet.` : `Ausgaben, die nicht automatisch abgeglichen werden, werden standardmäßig diesem Lieferanten zugeordnet. Andernfalls werden sie als „Credit Card Misc.“ exportiert.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Wählen Sie einen Standard-${connectionName}-Lieferanten für Ausgaben, die nicht automatisch zugeordnet werden.`, + defaultVendorSelectHeader: (connectionName: string) => `Wählen Sie einen Standard-${connectionName}-Lieferanten für Ausgaben, die nicht automatisch zugeordnet werden.`, defaultAccount: 'Standardkonto', autoSync: 'Automatische Synchronisierung', autoSyncDescription: 'NetSuite und Expensify automatisch jeden Tag synchronisieren. Finalisierte Berichte in Echtzeit exportieren', @@ -7253,10 +7211,10 @@ 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', @@ -8081,7 +8039,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, annualSubscriptionEndDate}: {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`, }), @@ -8121,7 +8079,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'; @@ -8397,7 +8355,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8415,7 +8373,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', @@ -8950,7 +8908,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc subtitle: 'Keine Ergebnisse. Bitte passe deine Filter an.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `Verstöße werden erst ab dem ${formattedDate} erfasst. Bitte passen Sie Ihre Datumsfilter an.`, + subtitle: (formattedDate: string) => `Verstöße werden erst ab dem ${formattedDate} erfasst. Bitte passen Sie Ihre Datumsfilter an.`, }, emptyUnapprovedResults: { title: 'Keine Ausgaben zum Genehmigen', @@ -9239,8 +9197,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`; @@ -9272,7 +9230,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}`, @@ -9281,8 +9239,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) => @@ -9297,7 +9255,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}“)`; @@ -9316,8 +9274,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.`, @@ -9429,7 +9387,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', @@ -9683,14 +9641,14 @@ 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', 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'; @@ -9704,7 +9662,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}`, @@ -10011,8 +9969,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', @@ -10025,8 +9983,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', @@ -10164,7 +10122,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'; @@ -10179,7 +10137,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.'; @@ -10204,7 +10162,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', @@ -10218,9 +10176,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}: {propertyName: string}) => `${propertyName} fehlt`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Ungültige Eigenschaft: ${propertyName} – Erwartet: ${expectedType}`, + invalidValue: ({expectedValues}: {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 5d7335852ba3..d4c389f08abb 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -3,57 +3,18 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - ConnectionNameParams, - DefaultVendorHelperTextParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { @@ -878,8 +839,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'; @@ -888,7 +849,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'; @@ -972,16 +933,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}: {displayName: string}) => `This chat is no longer active because ${displayName} closed their account.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: {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}: {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.', }, @@ -1540,7 +1500,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`, @@ -1599,7 +1559,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.', @@ -1923,10 +1883,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}: {maxUploadSizeInMB: number}) => `The selected image exceeds the maximum upload size of ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `Profile picture must be one of the following types: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Edit profile picture', @@ -2628,7 +2588,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.`, @@ -3797,7 +3757,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) { @@ -4723,7 +4683,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', @@ -4734,11 +4694,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.`, @@ -5718,7 +5678,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'; @@ -6489,7 +6449,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.', }, @@ -6874,7 +6834,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'; @@ -6904,14 +6864,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"; @@ -6940,12 +6900,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.`, @@ -6967,7 +6927,7 @@ const translations = { }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -7135,11 +7095,11 @@ const translations = { exportCompanyCard: 'Export company card expenses as', exportDate: 'Export date', defaultVendor: 'Default vendor', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Expenses that don't auto-match will default to this vendor.` : `Expenses that don't auto-match will default to this vendor. Otherwise, they'll export as Credit Card Misc.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => `Choose a default ${connectionName} vendor for expenses that don't match automatically.`, + defaultVendorSelectHeader: (connectionName: string) => `Choose a default ${connectionName} vendor for expenses that don't match automatically.`, defaultAccount: 'Default account', autoSync: 'Auto-sync', autoSyncDescription: 'Sync NetSuite and Expensify automatically, every day. Export finalized report in realtime', @@ -7202,7 +7162,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'; @@ -7445,7 +7405,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', @@ -8259,7 +8219,7 @@ const translations = { }, description: "Choose a plan that's right for you.", subscriptionLink: 'Learn more', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: ({count, annualSubscriptionEndDate}: {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`, }), @@ -8595,7 +8555,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8613,7 +8573,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', @@ -9082,7 +9042,7 @@ const translations = { subtitle: 'No results. Please try adjusting your filters.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `Violations are only tracked from ${formattedDate} onwards. Try adjusting your date filters.`, + subtitle: (formattedDate: string) => `Violations are only tracked from ${formattedDate} onwards. Try adjusting your date filters.`, }, emptyUnapprovedResults: { title: 'No expenses to approve', @@ -9368,8 +9328,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})` : ''}`; @@ -9401,7 +9361,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}`, @@ -9410,8 +9370,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) => { @@ -9430,7 +9390,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}")`; @@ -9447,8 +9407,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) => @@ -9556,7 +9516,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', @@ -9818,14 +9778,14 @@ 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', 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'; @@ -9839,7 +9799,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}`, @@ -10147,8 +10107,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', @@ -10161,8 +10121,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', @@ -10300,7 +10260,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'; @@ -10315,7 +10275,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.'; @@ -10329,7 +10289,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', @@ -10354,9 +10314,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}: {propertyName: string}) => `Missing ${propertyName}`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Invalid property: ${propertyName} - Expected: ${expectedType}`, + invalidValue: ({expectedValues}: {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 02f98fe6ab66..01fcd1d02865 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -15,15 +15,6 @@ import type {OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields import {CONST as COMMON_CONST, Str} from 'expensify-common'; import type en from './en'; -import type { - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - EmptyViolationSnapshotResultsSubtitleParams, - PaidElsewhereParams, - RemoveCopilotAccessConfirmationParams, - UnsupportedFormulaValueErrorParams, -} from './params'; import type {TranslationDeepObject} from './types'; const translations: TranslationDeepObject = { common: { @@ -785,8 +776,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'; @@ -795,7 +786,7 @@ const translations: TranslationDeepObject = { } return `Eliminar ${type}`; }, - deleteConfirmation: ({action}) => { + deleteConfirmation: (action) => { let type = 'comentario'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'gasto'; @@ -881,14 +872,16 @@ 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}: {displayName: string}) => `Este chat está desactivado porque ${displayName} ha cerrado tu cuenta.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {displayName: string; oldDisplayName: string}) => + `Este chat está desactivado porque ${oldDisplayName} ha combinado tu cuenta con ${displayName}`, + [CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => shouldUseYou ? `Este chat ya no está activo porque 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}: {policyName: string}) => `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {policyName: string}) => + `Este chat está desactivado porque el espacio de trabajo ${policyName} se ha eliminado.`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'Esta reserva está archivada.', }, writeCapabilityPage: { @@ -1431,7 +1424,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`, @@ -1493,7 +1486,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.', @@ -1815,10 +1808,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}: {maxUploadSizeInMB: number}) => `La imagen supera el tamaño máximo de ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {minHeightInPx: number; minWidthInPx: number; maxHeightInPx: number; maxWidthInPx: number}) => `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}: {allowedExtensions: string[]}) => `La foto de perfil debe ser de uno de los siguientes tipos: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Editar foto de perfil', @@ -2421,7 +2414,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.`, @@ -3579,7 +3572,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}`; @@ -4495,7 +4488,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', @@ -4506,11 +4499,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', @@ -5490,7 +5483,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'; @@ -6230,7 +6223,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.', }, @@ -6550,7 +6543,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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'; @@ -6580,13 +6573,13 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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'; @@ -6615,12 +6608,12 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, [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', @@ -6641,7 +6634,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, }, }, connections: { - syncStageName: ({stage}) => { + syncStageName: (stage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6809,12 +6802,11 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, exportCompanyCard: 'Exportar gastos de la tarjeta de empresa como', exportDate: 'Fecha de exportación', defaultVendor: 'Proveedor predeterminado', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Los gastos que no se asignen automáticamente se asociarán por defecto a este proveedor.` : `Los gastos que no se concilien automáticamente se asignarán a este proveedor de forma predeterminada. En caso contrario, se exportarán como Credit Card Misc.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Elige un proveedor predeterminado de ${connectionName} para los gastos que no se asignen automáticamente.`, + defaultVendorSelectHeader: (connectionName: string) => `Elige un proveedor predeterminado de ${connectionName} para los gastos que no se asignen automáticamente.`, defaultAccount: 'Cuenta predeterminada', autoSync: 'Autosincronización', autoSyncDescription: 'Sincroniza NetSuite y Expensify automáticamente, todos los días. Exporta el informe finalizado en tiempo real', @@ -6932,7 +6924,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, }, 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'; @@ -7173,7 +7165,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, }, 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', @@ -7195,7 +7187,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}: {count: number; annualSubscriptionEndDate: string}) => ({ 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`, }), @@ -8285,7 +8277,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, ? `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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8302,7 +8294,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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', @@ -8764,8 +8756,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, subtitle: 'Sin resultados. Intenta ajustar tus filtros.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => - `Las infracciones solo se registran a partir del ${formattedDate}. Intenta ajustar tus filtros de fecha.`, + subtitle: (formattedDate: string) => `Las infracciones solo se registran a partir del ${formattedDate}. Intenta ajustar tus filtros de fecha.`, }, emptyUnapprovedResults: { title: 'No hay gastos para aprobar', @@ -9029,8 +9020,8 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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})` : ''}`; @@ -9062,7 +9053,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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}`, @@ -9071,8 +9062,8 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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) => { @@ -9091,7 +9082,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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}")`; @@ -9110,8 +9101,8 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, }, 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) => @@ -9679,7 +9670,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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', @@ -9857,14 +9848,14 @@ 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', 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'; @@ -9878,7 +9869,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, } }, 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}` : ''}`, @@ -10174,8 +10165,8 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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', @@ -10188,8 +10179,8 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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', @@ -10327,7 +10318,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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'; @@ -10342,7 +10333,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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.'; @@ -10356,7 +10347,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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', @@ -10378,9 +10369,9 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`, 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}: {propertyName: string}) => `Falta ${propertyName}`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Propiedad inválida: ${propertyName} - Esperado: ${expectedType}`, + invalidValue: ({expectedValues}: {expectedValues: string}) => `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 046629242886..f72e176c2de0 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -839,8 +800,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'; @@ -849,7 +810,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'; @@ -935,16 +896,15 @@ 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}: {displayName: string}) => `Cette discussion n’est plus active, car ${displayName} a fermé son compte.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => - `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.POLICY_DELETED]: ({policyName}: {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}: {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.', }, @@ -1468,7 +1428,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`, @@ -1528,8 +1488,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) => - `a déplacé la dépense de l’espace personnel vers ${workspaceName ?? `discuter avec ${reportName}`}`, + 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: { invalidCategoryLength: 'Le nom de la catégorie dépasse 255 caractères. Veuillez le raccourcir ou choisir une autre catégorie.', @@ -1865,10 +1824,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}: {maxUploadSizeInMB: number}) => `L’image sélectionnée dépasse la taille maximale de téléversement de ${maxUploadSizeInMB} Mo.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `La photo de profil doit être de l’un des types suivants : ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Modifier la photo de profil', @@ -2542,7 +2501,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.`, @@ -3707,7 +3666,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}`; @@ -4619,7 +4578,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', @@ -4630,11 +4589,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.`, @@ -5651,7 +5610,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'; @@ -6416,7 +6375,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.', }, @@ -6796,7 +6755,7 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`, 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'; @@ -6826,13 +6785,13 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`, 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'; @@ -6861,12 +6820,12 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`, [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', @@ -6887,7 +6846,7 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -7055,12 +7014,11 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`, exportCompanyCard: 'Exporter les dépenses de carte d’entreprise en tant que', exportDate: 'Date d’exportation', defaultVendor: 'Fournisseur par défaut', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Les dépenses qui ne sont pas automatiquement rapprochées seront, par défaut, associées à ce fournisseur.` : `Les dépenses qui ne sont pas associées automatiquement seront attribuées par défaut à ce fournisseur. Sinon, elles seront exportées sous Crédit carte diverse.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Choisissez un fournisseur ${connectionName} par défaut pour les dépenses qui ne correspondent pas automatiquement.`, + defaultVendorSelectHeader: (connectionName: string) => `Choisissez un fournisseur ${connectionName} par défaut pour les dépenses qui ne correspondent pas automatiquement.`, defaultAccount: 'Compte par défaut', autoSync: 'Synchronisation automatique', autoSyncDescription: 'Synchronisez automatiquement NetSuite et Expensify, chaque jour. Exportez les notes de frais finalisées en temps réel', @@ -7279,10 +7237,10 @@ 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', @@ -8109,7 +8067,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, annualSubscriptionEndDate}: {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`, }), @@ -8155,7 +8113,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'; @@ -8430,7 +8388,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8449,7 +8407,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', @@ -8985,8 +8943,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e subtitle: 'Aucun résultat. Veuillez essayer de modifier vos filtres.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => - `Les violations ne sont suivies qu’à partir du ${formattedDate}. Essayez d’ajuster vos filtres de date.`, + subtitle: (formattedDate: string) => `Les violations ne sont suivies qu’à partir du ${formattedDate}. Essayez d’ajuster vos filtres de date.`, }, emptyUnapprovedResults: { title: 'Aucune dépense à approuver', @@ -9275,8 +9232,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})` : ''}`; @@ -9308,7 +9265,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}`, @@ -9317,8 +9274,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) => @@ -9333,7 +9290,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} »)`; @@ -9352,8 +9309,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.`, @@ -9465,7 +9422,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', @@ -9720,14 +9677,14 @@ 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', 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'; @@ -9741,7 +9698,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}`, @@ -10045,8 +10002,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', @@ -10059,8 +10016,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', @@ -10198,7 +10155,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'; @@ -10214,7 +10171,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.'; @@ -10238,7 +10195,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', @@ -10252,9 +10209,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}: {propertyName: string}) => `${propertyName} manquant`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Propriété non valide : ${propertyName} - Attendu : ${expectedType}`, + invalidValue: ({expectedValues}: {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 1d0e202af338..8602df251105 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -838,8 +799,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'; @@ -848,7 +809,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'; @@ -933,16 +894,15 @@ 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}: {displayName: string}) => `Questa chat non è più attiva perché ${displayName} ha chiuso il proprio account.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => - `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.POLICY_DELETED]: ({policyName}: {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}: {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.', }, @@ -1463,7 +1423,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`, @@ -1522,7 +1482,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.', @@ -1856,10 +1816,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}: {maxUploadSizeInMB: number}) => `L'immagine selezionata supera la dimensione massima di caricamento di ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `L’immagine del profilo deve essere di uno dei seguenti tipi: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Modifica immagine del profilo', @@ -2530,7 +2490,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.`, @@ -3684,7 +3644,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}`; @@ -4585,7 +4545,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', @@ -4596,11 +4556,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.`, @@ -5615,7 +5575,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'; @@ -6369,7 +6329,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.', }, @@ -6747,7 +6707,7 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`, 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'; @@ -6777,13 +6737,13 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`, 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'; @@ -6812,12 +6772,12 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`, [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', @@ -6837,7 +6797,7 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -7005,12 +6965,11 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`, exportCompanyCard: 'Esporta le spese con carta aziendale come', exportDate: 'Data di esportazione', defaultVendor: 'Fornitore predefinito', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Le spese che non vengono abbinate automaticamente verranno assegnate per impostazione predefinita a questo fornitore.` : `Le spese che non vengono abbinate automaticamente useranno questo fornitore per impostazione predefinita. In caso contrario, saranno esportate come Varie carta di credito.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Scegli un fornitore predefinito ${connectionName} per le spese che non vengono abbinate automaticamente.`, + defaultVendorSelectHeader: (connectionName: string) => `Scegli un fornitore predefinito ${connectionName} per le spese che non vengono abbinate automaticamente.`, defaultAccount: 'Conto predefinito', autoSync: 'Sincronizzazione automatica', autoSyncDescription: 'Sincronizza automaticamente NetSuite ed Expensify ogni giorno. Esporta i report finalizzati in tempo reale', @@ -7225,10 +7184,10 @@ 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', @@ -8050,7 +8009,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, annualSubscriptionEndDate}: {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`, }), @@ -8090,7 +8049,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'; @@ -8365,7 +8324,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8384,7 +8343,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', @@ -8926,8 +8885,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, subtitle: 'Nessun risultato. Prova a modificare i filtri.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => - `Le violazioni vengono tracciate solo a partire dal ${formattedDate}. Prova a modificare i filtri data.`, + subtitle: (formattedDate: string) => `Le violazioni vengono tracciate solo a partire dal ${formattedDate}. Prova a modificare i filtri data.`, }, emptyUnapprovedResults: { title: 'Nessuna spesa da approvare', @@ -9216,8 +9174,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})` : ''}`; @@ -9249,7 +9207,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}`, @@ -9258,8 +9216,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) => @@ -9274,7 +9232,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}”)`; @@ -9293,8 +9251,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.`, @@ -9406,7 +9364,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', @@ -9661,14 +9619,14 @@ 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', 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"; @@ -9682,7 +9640,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}`, @@ -9987,8 +9945,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', @@ -10001,8 +9959,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', @@ -10140,7 +10098,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'; @@ -10156,7 +10114,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.'; @@ -10180,7 +10138,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', @@ -10194,9 +10152,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}: {propertyName: string}) => `${propertyName} mancante`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Proprietà non valida: ${propertyName} - Previsto: ${expectedType}`, + invalidValue: ({expectedValues}: {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 9d0834cc19e1..f19819e2b3ed 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -827,8 +788,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'; @@ -837,7 +798,7 @@ const translations: TranslationDeepObject = { } return `${type}を削除`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = 'コメント'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -922,16 +883,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}: {displayName: string}) => `${displayName} がアカウントを閉鎖したため、このチャットは現在利用できません。`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => shouldUseYou ? `このチャットは、あなたが${policyName}ワークスペースのメンバーではなくなったため、これ以上利用できません。` : `${displayName}さんが${policyName}ワークスペースのメンバーではなくなったため、このチャットはこれ以上利用できません。`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: {policyName: string}) => `このチャットは、${policyName} がアクティブなワークスペースではなくなったため、これ以上利用できません。`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {policyName: string}) => `このチャットは、${policyName} がアクティブなワークスペースではなくなったため、これ以上利用できません。`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: 'この予約はアーカイブされています。', }, @@ -1445,7 +1406,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により支払われました`, @@ -1504,7 +1465,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文字を超えています。短くするか、別のカテゴリーを選択してください。', @@ -1836,10 +1797,10 @@ const translations: TranslationDeepObject = { viewPhoto: '写真を見る', imageUploadFailed: '画像のアップロードに失敗しました', deleteWorkspaceError: '申し訳ありません、ワークスペースのアバターを削除する際に予期せぬ問題が発生しました', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `選択された画像は、アップロード可能な最大サイズ ${maxUploadSizeInMB} MB を超えています。`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: ({maxUploadSizeInMB}: {maxUploadSizeInMB: number}) => `選択された画像は、アップロード可能な最大サイズ ${maxUploadSizeInMB} MB を超えています。`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {minHeightInPx: number; minWidthInPx: number; maxHeightInPx: number; maxWidthInPx: number}) => `${minHeightInPx}x${minWidthInPx}ピクセルより大きく、${maxHeightInPx}x${maxWidthInPx}ピクセルより小さい画像をアップロードしてください。`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `プロフィール写真は次のいずれかのタイプである必要があります:${allowedExtensions.join(', ')}。`, + notAllowedExtension: ({allowedExtensions}: {allowedExtensions: string[]}) => `プロフィール写真は次のいずれかのタイプである必要があります:${allowedExtensions.join(', ')}。`, }, avatarPage: { title: 'プロフィール写真を編集', @@ -2511,7 +2472,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: 'Plaid で接続できます。', fixCard: 'カードを修正', brokenConnection: 'カード接続が切断されています。', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `${cardName}カードとの接続が切れています。カードを修正するには、銀行にログインしてください。` : `${cardName}カードとの接続が切れています。カードを修正するには、銀行にログインしてください。`, @@ -3654,7 +3615,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}`; @@ -4549,7 +4510,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: 'レポートレベル', @@ -4560,11 +4521,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}に接続できません。`, @@ -5558,7 +5519,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 '部門'; @@ -6288,7 +6249,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO reportFieldNameRequiredError: 'レポート項目名を入力してください', reportFieldTypeRequiredError: 'レポートフィールドの種類を選択してください', circularReferenceError: 'このフィールドを自分自身に参照することはできません。更新してください。', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `数式フィールド ${value} が認識されません`, + unsupportedFormulaValueError: (value: string) => `数式フィールド ${value} が認識されません`, reportFieldInitialValueRequiredError: 'レポート項目の初期値を選択してください', genericFailureMessage: 'レポートフィールドの更新中にエラーが発生しました。もう一度お試しください。', }, @@ -6665,7 +6626,7 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から talkYourAccountManager: 'アカウントマネージャーとチャットする', talkToConcierge: 'Conciergeとチャットする', needAnotherAccounting: 'ほかの会計ソフトが必要ですか?', - connectionName: ({connectionName}: ConnectionNameParams) => { + connectionName: (connectionName: AllConnectionName) => { switch (connectionName) { case CONST.POLICY.CONNECTIONS.NAME.QBO: return 'QuickBooks Online'; @@ -6695,12 +6656,12 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から 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 に接続できません'; @@ -6729,12 +6690,12 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から [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: '再接続', @@ -6755,7 +6716,7 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6923,11 +6884,11 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から exportCompanyCard: '法人カード経費のエクスポート形式', exportDate: 'エクスポート日', defaultVendor: 'デフォルトのベンダー', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `自動照合されない経費は、デフォルトでこのベンダーに割り当てられます。` : `自動照合されない経費は、デフォルトでこのベンダーに割り当てられます。それ以外は「Credit Card Misc」としてエクスポートされます。`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => `自動的に照合されない経費に対して使用する、デフォルトの ${connectionName} 仕入先を選択します。`, + defaultVendorSelectHeader: (connectionName: string) => `自動的に照合されない経費に対して使用する、デフォルトの ${connectionName} 仕入先を選択します。`, defaultAccount: 'デフォルトのアカウント', autoSync: '自動同期', autoSyncDescription: 'NetSuite と Expensify を毎日自動で同期。確定したレポートをリアルタイムでエクスポート', @@ -7140,10 +7101,10 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から }, 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: 'はい、再度エクスポートします', @@ -7952,7 +7913,7 @@ ${reportName}`, }, description: '自分に合ったプランをお選びください。', subscriptionLink: '詳しく見る', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: ({count, annualSubscriptionEndDate}: {count: number; annualSubscriptionEndDate: string}) => ({ one: `${annualSubscriptionEndDate} までの年間サブスクリプション期間中、Control プランでアクティブメンバー 1 名を利用することに同意しています。${annualSubscriptionEndDate} 以降、 自動更新を無効にすることで、従量課金サブスクリプションに切り替え、Collect プランへダウングレードできます。`, other: `あなたは、年間サブスクリプションが${annualSubscriptionEndDate}に終了するまで、Controlプランでアクティブメンバー${count}名を契約しています。${annualSubscriptionEndDate}以降は、自動更新を無効にすることで、従量課金制サブスクリプションに切り替え、Collectプランへダウングレードできます。その操作は、`, }), @@ -7991,7 +7952,7 @@ ${reportName}`, }, custom: {label: 'カスタム承認', description: 'Expensify で承認ワークフローを手動で設定します。'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return 'Gusto 従業員を同期中'; @@ -8263,7 +8224,7 @@ ${reportName}`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `このワークスペースの名前を「${newName}」(以前は「${oldName}」)に更新しました`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `このワークスペースの説明を「${newDescription}」に設定する` : `このワークスペースの説明を「${newDescription}」(以前は「${oldDescription}」)に更新しました`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: ({submittersNames}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8281,7 +8242,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 プランにダウングレードしました', @@ -8811,7 +8772,7 @@ ${reportName}`, subtitle: '結果がありません。フィルターの条件を調整してください。', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `違反は ${formattedDate} 以降のみ記録されています。日付フィルターを調整してみてください。`, + subtitle: (formattedDate: string) => `違反は ${formattedDate} 以降のみ記録されています。日付フィルターを調整してみてください。`, }, emptyUnapprovedResults: { title: '承認する経費はありません', @@ -9089,8 +9050,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})` : ''}を変更しました`; @@ -9122,7 +9083,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}`, @@ -9131,8 +9092,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) => @@ -9147,7 +9108,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}」)`; @@ -9166,8 +9127,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 カードの精算に問題が発生したため自動的にロックされました。問題を解決するには、ワークスペース設定で修正してください。`, @@ -9279,7 +9240,7 @@ ${reportName}`, reply: '返信', from: '差出人', in: '内', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `${reportName}${workspaceName ? `${workspaceName} の中` : ''} から`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `${reportName}${workspaceName ? `${workspaceName} の中` : ''} から`, }, qrCodes: { qrCode: 'QRコード', @@ -9528,14 +9489,14 @@ ${reportName}`, duplicatedTransaction: '重複の可能性', fieldRequired: 'レポートの項目は必須です', futureDate: '将来の日付は使用できません', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? 'サプライヤーは無効です' : 'ベンダーは無効です'), + inactiveVendor: (isSupplier = false) => (isSupplier ? 'サプライヤーは無効です' : 'ベンダーは無効です'), invoiceMarkup: (invoiceMarkup: number) => `${invoiceMarkup}%値上げ済み`, maxAge: (maxAge: number) => `日付が${maxAge}日より前です`, missingCategory: 'カテゴリが未選択です', missingComment: '選択したカテゴリには説明が必要です', missingAttendees: 'このカテゴリには複数の参加者が必要です', missingTag: (tagName?: string) => `${tagName ?? 'タグ'} が見つかりません`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return '金額が計算された距離と一致しません'; @@ -9549,7 +9510,7 @@ ${reportName}`, } }, modifiedDate: '日付がスキャンしたレシートと異なります', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => + increasedDistance: (formattedRouteDistance?: string) => formattedRouteDistance ? `距離が計算されたルート距離(${formattedRouteDistance})を超えています` : '距離が計算されたルートを超えています', nonExpensiworksExpense: 'Expensiworks 以外の経費', overAutoApprovalLimit: (formattedLimit: string) => `経費が自動承認限度額 ${formattedLimit} を超えています`, @@ -9849,8 +9810,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: 'コーポレートカード管理', @@ -9863,8 +9824,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: 'カスタム経費ルール', @@ -10001,7 +9962,7 @@ ${reportName}`, addCopilot: 'コパイロットを追加', membersCanAccessYourAccount: '次のメンバーがあなたのアカウントにアクセスできます:', youCanAccessTheseAccounts: 'これらのアカウントにアクセスできます:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return 'フル'; @@ -10016,7 +9977,7 @@ ${reportName}`, accessLevel: 'アクセス権限レベル', confirmCopilot: '以下でコパイロットを確認してください。', accessLevelDescription: '以下からアクセスレベルを選択してください。フルアクセスと制限付きアクセスの両方で、コパイロットはすべての会話と経費を閲覧できます。', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '他のメンバーがあなたに代わってアカウント内のすべての操作を行えるようにします。チャット、申請、承認、支払い、設定の更新などが含まれます。'; @@ -10040,8 +10001,7 @@ ${reportName}`, `${accountOwnerEmail} のコパイロットとして、この操作を行う権限がありません。申し訳ありません。`, removeCopilotAccess: '自分のコパイロットアクセスを削除', removeCopilotAccessTitle: 'コパイロットアクセスを削除しますか?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => - `${delegatorName}のExpensifyアカウントへのコパイロットアクセスを削除してもよろしいですか?この操作は元に戻せません。`, + removeCopilotAccessConfirmation: (delegatorName: string) => `${delegatorName}のExpensifyアカウントへのコパイロットアクセスを削除してもよろしいですか?この操作は元に戻せません。`, removeCopilotAccessConfirm: 'アクセスを削除', copilotAccess: 'Copilot へのアクセス', }, @@ -10054,9 +10014,9 @@ ${reportName}`, nothingToPreview: 'プレビューするものはありません', editJson: 'JSON を編集:', preview: 'プレビュー:', - missingProperty: ({propertyName}: MissingPropertyParams) => `${propertyName} がありません`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `無効なプロパティ: ${propertyName} - 期待される型: ${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `無効な値です - 期待される値: ${expectedValues}`, + missingProperty: ({propertyName}: {propertyName: string}) => `${propertyName} がありません`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `無効なプロパティ: ${propertyName} - 期待される型: ${expectedType}`, + invalidValue: ({expectedValues}: {expectedValues: string}) => `無効な値です - 期待される値: ${expectedValues}`, missingValue: '値がありません', createReportAction: 'レポート作成アクション', reportAction: 'レポートアクション', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 0eab89c1b6b2..a19db652d936 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -836,8 +797,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'; @@ -846,7 +807,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'; @@ -931,16 +892,15 @@ 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}: {displayName: string}) => `Deze chat is niet meer actief omdat ${displayName} de account heeft gesloten.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => - `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.POLICY_DELETED]: ({policyName}: {policyName: string}) => `Deze chat is niet langer actief omdat ${policyName} geen actief werkruimte meer is.`, + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {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.', }, @@ -1461,7 +1421,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`, @@ -1520,8 +1480,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) => - `heeft uitgave verplaatst van persoonlijke ruimte naar ${workspaceName ?? `chat met ${reportName}`}`, + movedFromPersonalSpace: (reportName?: string, workspaceName?: string) => `heeft uitgave verplaatst van persoonlijke ruimte naar ${workspaceName ?? `chat met ${reportName}`}`, movedToPersonalSpace: 'heeft uitgave verplaatst naar persoonlijke ruimte', error: { invalidCategoryLength: 'De categorienaam is langer dan 255 tekens. Verkort deze of kies een andere categorie.', @@ -1852,10 +1811,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}: {maxUploadSizeInMB: number}) => `De geselecteerde afbeelding overschrijdt de maximale uploadgrootte van ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `Profielfoto moet een van de volgende typen zijn: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Profielfoto bewerken', @@ -2530,7 +2489,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.`, @@ -3684,7 +3643,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}`; @@ -4584,7 +4543,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', @@ -4595,11 +4554,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.`, @@ -5609,7 +5568,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'; @@ -6355,7 +6314,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.', }, @@ -6733,7 +6692,7 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`, 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'; @@ -6763,13 +6722,13 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`, 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'; @@ -6798,12 +6757,12 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`, [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', @@ -6823,7 +6782,7 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6991,12 +6950,11 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`, exportCompanyCard: 'Bedrijfspaskosten exporteren als', exportDate: 'Exportdatum', defaultVendor: 'Standaardleverancier', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Declaraties die niet automatisch worden gematcht, worden standaard aan deze leverancier gekoppeld.` : `Bonnetjes die niet automatisch worden gekoppeld, worden standaard aan deze leverancier toegewezen. Anders worden ze geëxporteerd als Credit Card Misc.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Kies een standaard ${connectionName}-leverancier voor uitgaven die niet automatisch worden gematcht.`, + defaultVendorSelectHeader: (connectionName: string) => `Kies een standaard ${connectionName}-leverancier voor uitgaven die niet automatisch worden gematcht.`, defaultAccount: 'Standaardrekening', autoSync: 'Automatisch synchroniseren', autoSyncDescription: 'Synchroniseer NetSuite en Expensify automatisch, elke dag. Exporteer een afgerond rapport in realtime', @@ -7212,10 +7170,10 @@ 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', @@ -8031,7 +7989,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, annualSubscriptionEndDate}: {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`, }), @@ -8071,7 +8029,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'; @@ -8343,7 +8301,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8362,7 +8320,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', @@ -8897,8 +8855,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, subtitle: 'Geen resultaten. Pas je filters aan en probeer het opnieuw.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => - `Overtredingen worden alleen bijgehouden vanaf ${formattedDate}. Probeer je datumfilters aan te passen.`, + subtitle: (formattedDate: string) => `Overtredingen worden alleen bijgehouden vanaf ${formattedDate}. Probeer je datumfilters aan te passen.`, }, emptyUnapprovedResults: { title: 'Geen declaraties om goed te keuren', @@ -9187,8 +9144,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`; @@ -9220,7 +9177,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}`, @@ -9229,8 +9186,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) => @@ -9245,7 +9202,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}")`; @@ -9264,8 +9221,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.`, @@ -9377,7 +9334,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', @@ -9631,14 +9588,14 @@ 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', 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'; @@ -9652,7 +9609,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}`, @@ -9956,8 +9913,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', @@ -9970,8 +9927,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', @@ -10109,7 +10066,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'; @@ -10124,7 +10081,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.'; @@ -10150,7 +10107,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', @@ -10164,9 +10121,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}: {propertyName: string}) => `${propertyName} ontbreekt`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Ongeldige eigenschap: ${propertyName} - Verwacht: ${expectedType}`, + invalidValue: ({expectedValues}: {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 301a8457198d..a6c9066b08ea 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -1,61 +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 ViolationsInactiveVendorParams = {isSupplier?: boolean}; - -type OptionalParam = Partial; - type ChangeFieldParams = {oldValue?: string; newValue: string; fieldName: string}; type ExportedToIntegrationParams = {label: string; markedManually?: boolean; inProgress?: boolean; lastModified?: string}; @@ -78,116 +24,15 @@ type MarkReimbursedFromIntegrationParams = {amount: string; currency: string}; type ShareParams = {to: string}; -type UnsupportedFormulaValueErrorParams = { - value: string; -}; - type UnshareParams = {to: string}; -type ConnectionNameParams = { - connectionName: AllConnectionName; -}; - -type ConnectionDisplayNameParams = { - connectionName: string; -}; - -type DefaultVendorHelperTextParams = { - isSet: boolean; -}; - -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; -}; - -type EmptyViolationSnapshotResultsSubtitleParams = { - formattedDate: string; -}; - export type { - MissingPropertyParams, - InvalidPropertyParams, - InvalidValueParams, - RemovedFromApprovalWorkflowParams, - DelegateRoleParams, - RemoveCopilotAccessConfirmationParams, - SyncStageNameConnectionsParams, - IntacctMappingTitleParams, - ExportIntegrationSelectedParams, - YourPlanPriceParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - MovedFromPersonalSpaceParams, - NotAllowedExtensionParams, ParentNavigationSummaryParams, - PaidElsewhereParams, - ConciergeBrokenCardConnectionParams, - EmptyViolationSnapshotResultsSubtitleParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ResolutionConstraintsParams, - SizeExceededParams, StepCounterParams, - ViolationsModifiedAmountParams, - ViolationsIncreasedDistanceParams, - ViolationsInactiveVendorParams, ChangeFieldParams, ExportedToIntegrationParams, IntegrationsMessageParams, MarkReimbursedFromIntegrationParams, ShareParams, UnshareParams, - UnsupportedFormulaValueErrorParams, - ConnectionNameParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ExportAgainModalDescriptionParams, - UpdateRoleParams, - OptionalParam, - WorkspaceLockedPlanTypeParams, }; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index ba6b80c7aa53..92f7f5554ca6 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -837,8 +798,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'; @@ -847,7 +808,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'; @@ -932,17 +893,16 @@ const translations: TranslationDeepObject = { }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Ten czat został zarchiwizowany.', - [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName}: ReportArchiveReasonsClosedParams) => - `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_CLOSED]: ({displayName}: {displayName: string}) => `Ten czat nie jest już aktywny, ponieważ ${displayName} zamknął(-ęła) swoje konto.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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}: {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}: {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.', }, @@ -1457,7 +1417,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`, @@ -1516,7 +1476,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ę.', @@ -1849,10 +1809,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}: {maxUploadSizeInMB: number}) => `Wybrany obraz przekracza maksymalny rozmiar przesyłania ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `Zdjęcie profilowe musi być jednym z następujących typów: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Edytuj zdjęcie profilowe', @@ -2526,7 +2486,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ę.`, @@ -3668,7 +3628,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}`; @@ -4569,7 +4529,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', @@ -4580,11 +4540,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.`, @@ -5594,7 +5554,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'; @@ -6335,7 +6295,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.', }, @@ -6713,7 +6673,7 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`, 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'; @@ -6743,13 +6703,13 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`, 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'; @@ -6778,12 +6738,12 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`, [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', @@ -6803,7 +6763,7 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6971,12 +6931,11 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`, exportCompanyCard: 'Eksportuj wydatki z firmowej karty jako', exportDate: 'Data eksportu', defaultVendor: 'Domyślny dostawca', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Wydatki, które nie dopasują się automatycznie, będą domyślnie przypisane do tego dostawcy.` : `Wydatki, które nie dopasują się automatycznie, zostaną domyślnie przypisane do tego dostawcy. W przeciwnym razie zostaną wyeksportowane jako Credit Card Misc.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Wybierz domyślnego dostawcę ${connectionName} dla wydatków, które nie zostaną dopasowane automatycznie.`, + defaultVendorSelectHeader: (connectionName: string) => `Wybierz domyślnego dostawcę ${connectionName} dla wydatków, które nie zostaną dopasowane automatycznie.`, defaultAccount: 'Domyślne konto', autoSync: 'Automatyczna synchronizacja', autoSyncDescription: 'Synchronizuj NetSuite i Expensify automatycznie, każdego dnia. Eksportuj sfinalizowany raport w czasie rzeczywistym', @@ -7191,10 +7150,10 @@ 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', @@ -8010,7 +7969,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, annualSubscriptionEndDate}: {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`, }), @@ -8050,7 +8009,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'; @@ -8323,7 +8282,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8342,7 +8301,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', @@ -8875,7 +8834,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, subtitle: 'Brak wyników. Spróbuj zmienić filtry.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `Naruszenia są śledzone dopiero od ${formattedDate}. Spróbuj zmienić filtry dat.`, + subtitle: (formattedDate: string) => `Naruszenia są śledzone dopiero od ${formattedDate}. Spróbuj zmienić filtry dat.`, }, emptyUnapprovedResults: { title: 'Brak wydatków do zatwierdzenia', @@ -9163,8 +9122,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})` : ''}`; @@ -9196,7 +9155,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}`, @@ -9205,8 +9164,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) => @@ -9221,7 +9180,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}”)`; @@ -9240,8 +9199,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.`, @@ -9353,7 +9312,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', @@ -9603,14 +9562,14 @@ 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', 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'; @@ -9624,7 +9583,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}`, @@ -9927,8 +9886,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', @@ -9941,8 +9900,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', @@ -10080,7 +10039,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'; @@ -10095,7 +10054,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.'; @@ -10119,7 +10078,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', @@ -10133,9 +10092,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}: {propertyName: string}) => `Brak pola ${propertyName}`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Nieprawidłowa właściwość: ${propertyName} – Oczekiwano: ${expectedType}`, + invalidValue: ({expectedValues}: {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 5b7d6b390e8a..6a3dfab50f38 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -836,8 +797,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'; @@ -846,7 +807,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'; @@ -931,16 +892,15 @@ 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}: {displayName: string}) => `Este chat não está mais ativo porque ${displayName} encerrou a conta.`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => 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) => - `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.POLICY_DELETED]: ({policyName}: {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}: {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.', }, @@ -1460,7 +1420,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`, @@ -1519,7 +1479,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.', @@ -1846,10 +1806,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}: {maxUploadSizeInMB: number}) => `A imagem selecionada excede o tamanho máximo de upload de ${maxUploadSizeInMB} MB.`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {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}: {allowedExtensions: string[]}) => `A foto do perfil deve ser um dos seguintes tipos: ${allowedExtensions.join(', ')}.`, }, avatarPage: { title: 'Editar foto do perfil', @@ -2523,7 +2483,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.`, @@ -3672,7 +3632,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}`; @@ -4578,7 +4538,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', @@ -4589,11 +4549,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.`, @@ -5603,7 +5563,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'; @@ -6351,7 +6311,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.', }, @@ -6729,7 +6689,7 @@ O plano Control começa em US$ 9 por membro ativo por mês.`, 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'; @@ -6759,13 +6719,13 @@ O plano Control começa em US$ 9 por membro ativo por mês.`, 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'; @@ -6794,12 +6754,12 @@ O plano Control começa em US$ 9 por membro ativo por mês.`, [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', @@ -6819,7 +6779,7 @@ O plano Control começa em US$ 9 por membro ativo por mês.`, }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6987,12 +6947,11 @@ O plano Control começa em US$ 9 por membro ativo por mês.`, exportCompanyCard: 'Exportar despesas de cartão corporativo como', exportDate: 'Data de exportação', defaultVendor: 'Fornecedor padrão', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => + defaultVendorHelperText: (isSet: boolean) => isSet ? `Despesas que não forem correspondidas automaticamente terão este fornecedor como padrão.` : `Despesas que não forem conciliadas automaticamente serão atribuídas a este fornecedor por padrão. Caso contrário, serão exportadas como Credit Card Misc.`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => - `Escolha um fornecedor padrão do ${connectionName} para despesas que não sejam correspondidas automaticamente.`, + defaultVendorSelectHeader: (connectionName: string) => `Escolha um fornecedor padrão do ${connectionName} para despesas que não sejam correspondidas automaticamente.`, defaultAccount: 'Conta padrão', autoSync: 'Sincronização automática', autoSyncDescription: 'Sincronize NetSuite e Expensify automaticamente, todos os dias. Exporte relatórios finalizados em tempo real', @@ -7207,10 +7166,10 @@ 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', @@ -8026,7 +7985,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, annualSubscriptionEndDate}: {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`, }), @@ -8066,7 +8025,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'; @@ -8337,7 +8296,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}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8356,7 +8315,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', @@ -8888,7 +8847,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, subtitle: 'Nenhum resultado. Tente ajustar seus filtros.', }, emptyViolationSnapshotResults: { - subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `Violações só são registradas a partir de ${formattedDate}. Tente ajustar seus filtros de data.`, + subtitle: (formattedDate: string) => `Violações só são registradas a partir de ${formattedDate}. Tente ajustar seus filtros de data.`, }, emptyUnapprovedResults: { title: 'Nenhuma despesa para aprovar', @@ -9177,8 +9136,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})` : ''}`; @@ -9210,7 +9169,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}`, @@ -9219,8 +9178,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) => @@ -9235,7 +9194,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}")`; @@ -9254,8 +9213,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.`, @@ -9367,7 +9326,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', @@ -9621,14 +9580,14 @@ 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', 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'; @@ -9642,7 +9601,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}`, @@ -9945,8 +9904,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', @@ -9959,8 +9918,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', @@ -10098,7 +10057,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'; @@ -10113,7 +10072,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.'; @@ -10138,7 +10097,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', @@ -10152,9 +10111,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}: {propertyName: string}) => `Faltando ${propertyName}`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `Propriedade inválida: ${propertyName} - Esperado: ${expectedType}`, + invalidValue: ({expectedValues}: {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 52b08d9f7bf8..1d23aa116b6b 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -14,8 +14,12 @@ import StringUtils from '@libs/StringUtils'; 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 {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy'; +import type {ViolationDataType} from '@src/types/onyx/TransactionViolation'; import type {ValueOf} from 'type-fest'; @@ -23,49 +27,6 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common'; import startCase from 'lodash/startCase'; import type en from './en'; -import type { - ChangeFieldParams, - ConciergeBrokenCardConnectionParams, - ConnectionDisplayNameParams, - DefaultVendorHelperTextParams, - ConnectionNameParams, - DelegateRoleParams, - DeleteActionParams, - DeleteConfirmationParams, - EditActionParams, - EmptyViolationSnapshotResultsSubtitleParams, - 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, - ViolationsInactiveVendorParams, - ViolationsIncreasedDistanceParams, - ViolationsModifiedAmountParams, - WorkspaceLockedPlanTypeParams, - YourPlanPriceParams, -} from './params'; import type {TranslationDeepObject} from './types'; type StateValue = { stateISO: string; @@ -817,8 +778,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'; @@ -827,7 +788,7 @@ const translations: TranslationDeepObject = { } return `删除${type}`; }, - deleteConfirmation: ({action}: DeleteConfirmationParams) => { + deleteConfirmation: (action: OnyxInputOrEntry) => { let type = '评论'; if (action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { type = 'expense'; @@ -907,15 +868,13 @@ 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}: {displayName: string}) => `此聊天已不再活动,因为 ${displayName} 已关闭其账户。`, + [CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName}: {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, policyName, shouldUseYou = false}: {displayName: string; policyName: string; shouldUseYou?: boolean}) => shouldUseYou ? `此聊天已不再活跃,因为已不再是 ${policyName} 工作区的成员。` : `此聊天已不再活动,因为${displayName}已不再是${policyName}工作区的成员。`, - [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => - `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, - [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams) => - `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, + [CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName}: {policyName: string}) => `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, + [CONST.REPORT.ARCHIVE_REASON.INVOICE_RECEIVER_POLICY_DELETED]: ({policyName}: {policyName: string}) => `此聊天已不再活动,因为 ${policyName} 已不再是一个活跃的工作区。`, [CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED]: '此预订已归档。', }, writeCapabilityPage: { @@ -1409,7 +1368,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: '已报销此报表', @@ -1467,7 +1426,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 个字符。请缩短名称或选择其他类别。', @@ -1783,10 +1742,10 @@ const translations: TranslationDeepObject = { viewPhoto: '查看照片', imageUploadFailed: '图片上传失败', deleteWorkspaceError: '抱歉,删除您的工作区头像时出现了意外问题', - sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `所选图片超过了最大上传大小 ${maxUploadSizeInMB} MB。`, - resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => + sizeExceeded: ({maxUploadSizeInMB}: {maxUploadSizeInMB: number}) => `所选图片超过了最大上传大小 ${maxUploadSizeInMB} MB。`, + resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: {minHeightInPx: number; minWidthInPx: number; maxHeightInPx: number; maxWidthInPx: number}) => `请上传尺寸大于 ${minHeightInPx}x${minWidthInPx} 像素且小于 ${maxHeightInPx}x${maxWidthInPx} 像素的图片。`, - notAllowedExtension: ({allowedExtensions}: NotAllowedExtensionParams) => `头像必须为以下类型之一:${allowedExtensions.join(', ')}。`, + notAllowedExtension: ({allowedExtensions}: {allowedExtensions: string[]}) => `头像必须为以下类型之一:${allowedExtensions.join(', ')}。`, }, avatarPage: { title: '编辑头像', @@ -2452,7 +2411,7 @@ const translations: TranslationDeepObject = { connectWithPlaid: '通过 Plaid 连接。', fixCard: '修复卡片', brokenConnection: '您的银行卡连接已断开。', - conciergeBrokenConnection: ({cardName, connectionLink}: ConciergeBrokenCardConnectionParams) => + conciergeBrokenConnection: (cardName: string, connectionLink?: string) => connectionLink ? `您的 ${cardName} 卡连接已中断。登录您的网上银行以修复该卡。` : `您的 ${cardName} 卡连接已中断。登录您的网上银行以修复该卡。`, addAdditionalCards: '添加其他卡片', upgradeDescription: '需要添加更多卡片吗?创建工作区以添加其他个人卡片或将公司卡片分配给整个团队。', @@ -3570,7 +3529,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}`; @@ -4447,7 +4406,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: '报表级别', @@ -4458,11 +4417,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}。`, @@ -5433,7 +5392,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 '部门'; @@ -6149,7 +6108,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM reportFieldNameRequiredError: '请输入报表字段名称', reportFieldTypeRequiredError: '请选择报表字段类型', circularReferenceError: '此字段不能引用自身。请更新。', - unsupportedFormulaValueError: ({value}: UnsupportedFormulaValueErrorParams) => `无法识别公式字段 ${value}`, + unsupportedFormulaValueError: (value: string) => `无法识别公式字段 ${value}`, reportFieldInitialValueRequiredError: '请选择报表字段的初始值', genericFailureMessage: '更新报表字段时出错。请重试。', }, @@ -6513,7 +6472,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'; @@ -6542,12 +6501,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'; @@ -6576,12 +6535,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: '重新连接', @@ -6601,7 +6560,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM }, }, connections: { - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'quickbooksOnlineImportCustomers': case 'quickbooksDesktopImportCustomers': @@ -6768,9 +6727,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM exportCompanyCard: '导出公司卡费用为', exportDate: '导出日期', defaultVendor: '默认供应商', - defaultVendorHelperText: ({isSet}: DefaultVendorHelperTextParams) => - isSet ? `未自动匹配的报销将默认归属到此供应商。` : `未自动匹配的报销将默认为此供应商,否则将以“信用卡杂项”导出。`, - defaultVendorSelectHeader: ({connectionName}: ConnectionDisplayNameParams) => `为未能自动匹配的报销选择一个默认的 ${connectionName} 供应商。`, + defaultVendorHelperText: (isSet: boolean) => (isSet ? `未自动匹配的报销将默认归属到此供应商。` : `未自动匹配的报销将默认为此供应商,否则将以“信用卡杂项”导出。`), + defaultVendorSelectHeader: (connectionName: string) => `为未能自动匹配的报销选择一个默认的 ${connectionName} 供应商。`, defaultAccount: '默认账户', autoSync: '自动同步', autoSyncDescription: '每天自动同步 NetSuite 和 Expensify。实时导出已完成报表', @@ -6978,10 +6936,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: '是,再次导出', @@ -7759,7 +7714,7 @@ ${reportName}`, }, description: '选择适合你的方案。', subscriptionLink: '了解详情', - lockedPlanDescription: ({count, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) => ({ + lockedPlanDescription: ({count, annualSubscriptionEndDate}: {count: number; annualSubscriptionEndDate: string}) => ({ one: `在 Control 方案中,你已承诺在年度订阅到期(${annualSubscriptionEndDate})前保持 1 位活跃成员。你可以在 ${annualSubscriptionEndDate} 起关闭自动续订,以改为按使用付费订阅并降级到 Collect 方案,操作入口在`, other: `在年费订阅于${annualSubscriptionEndDate}结束之前,你已承诺在 Control 方案中保留 ${count} 名活跃成员。你可以在${annualSubscriptionEndDate}起,通过关闭自动续订,改为按使用量付费订阅并降级到 Collect 方案,操作入口在`, }), @@ -7798,7 +7753,7 @@ ${reportName}`, }, custom: {label: '自定义审批', description: '我将在 Expensify 中手动设置审批工作流程。'}, }, - syncStageName: ({stage}: SyncStageNameConnectionsParams) => { + syncStageName: (stage: PolicyConnectionSyncStage) => { switch (stage) { case 'gustoSyncTitle': return '同步 Gusto 员工'; @@ -8064,7 +8019,7 @@ ${reportName}`, renamedWorkspaceNameAction: (oldName: string, newName: string) => `已将此工作区的名称更新为“${newName}”(原为“${oldName}”)`, updateWorkspaceDescription: (newDescription: string, oldDescription: string) => !oldDescription ? `将此工作区的描述设置为“${newDescription}”` : `已将此工作区的描述更新为“${newDescription}”(之前为“${oldDescription}”)`, - removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => { + removedFromApprovalWorkflow: ({submittersNames}: {submittersNames: string[]}) => { let joinedNames = ''; if (submittersNames.length === 1) { joinedNames = submittersNames.at(0) ?? ''; @@ -8081,7 +8036,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 方案', @@ -8589,7 +8544,7 @@ ${reportName}`, title: '没有可显示的报销记录', subtitle: '没有结果。请尝试调整筛选条件。', }, - emptyViolationSnapshotResults: {subtitle: ({formattedDate}: EmptyViolationSnapshotResultsSubtitleParams) => `违规仅从 ${formattedDate} 起开始记录。请尝试调整您的日期筛选条件。`}, + emptyViolationSnapshotResults: {subtitle: (formattedDate: string) => `违规仅从 ${formattedDate} 起开始记录。请尝试调整您的日期筛选条件。`}, emptyUnapprovedResults: { title: '没有报销可审批', subtitle: '零报销,最大轻松。干得好!', @@ -8865,8 +8820,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})` : ''}`; @@ -8898,7 +8853,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}`, @@ -8907,8 +8862,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) => @@ -8923,7 +8878,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}”)`; @@ -8938,8 +8893,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} 已被自动锁定。请在工作区设置中解决该问题。`, @@ -9051,7 +9006,7 @@ ${reportName}`, reply: '回复', from: '来自', in: '在', - parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `来自${reportName}${workspaceName ? `在 ${workspaceName} 中` : ''}`, + parentNavigationSummary: (reportName?: string, workspaceName?: string) => `来自${reportName}${workspaceName ? `在 ${workspaceName} 中` : ''}`, }, qrCodes: { qrCode: '二维码', @@ -9295,14 +9250,14 @@ ${reportName}`, duplicatedTransaction: '可能重复', fieldRequired: '报表字段为必填项', futureDate: '不允许使用未来日期', - inactiveVendor: ({isSupplier = false}: ViolationsInactiveVendorParams = {}) => (isSupplier ? '供应商不再有效' : '供应商不再有效'), + inactiveVendor: (isSupplier = false) => (isSupplier ? '供应商不再有效' : '供应商不再有效'), invoiceMarkup: (invoiceMarkup: number) => `加价 ${invoiceMarkup}%`, maxAge: (maxAge: number) => `日期早于 ${maxAge} 天`, missingCategory: '缺少类别', missingComment: '所选类别需要填写说明', missingAttendees: '此类别需要多个参与者', missingTag: (tagName?: string) => `缺少 ${tagName ?? '标签'}`, - modifiedAmount: ({type, displayPercentVariance}: ViolationsModifiedAmountParams) => { + modifiedAmount: (type?: ViolationDataType, displayPercentVariance?: number) => { switch (type) { case 'distance': return '金额与计算出的距离不符'; @@ -9316,8 +9271,7 @@ ${reportName}`, } }, modifiedDate: '日期与已扫描收据不符', - increasedDistance: ({formattedRouteDistance}: ViolationsIncreasedDistanceParams) => - formattedRouteDistance ? `距离超过计算出的路线 ${formattedRouteDistance}` : '距离超过计算的路线', + increasedDistance: (formattedRouteDistance?: string) => (formattedRouteDistance ? `距离超过计算出的路线 ${formattedRouteDistance}` : '距离超过计算的路线'), nonExpensiworksExpense: '非 Expensiworks 报销', overAutoApprovalLimit: (formattedLimit: string) => `报销金额超出自动审批上限 ${formattedLimit}`, overCategoryLimit: (formattedLimit: string) => `金额超出每人 ${formattedLimit} 的类别限额`, @@ -9617,8 +9571,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: '公司卡管理', @@ -9631,8 +9585,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: '自定义报销规则', @@ -9767,7 +9721,7 @@ ${reportName}`, addCopilot: '添加副驾驶', membersCanAccessYourAccount: '这些成员可以访问你的账户:', youCanAccessTheseAccounts: '您可以访问这些账户:', - role: ({role}: OptionalParam = {}) => { + role: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '完整'; @@ -9782,7 +9736,7 @@ ${reportName}`, accessLevel: '访问级别', confirmCopilot: '在下方确认你的副驾驶。', accessLevelDescription: '请选择下方的访问级别。完整和有限访问都允许副驾驶查看所有会话和报销。', - roleDescription: ({role}: OptionalParam = {}) => { + roleDescription: (role?: DelegateRole) => { switch (role) { case CONST.DELEGATE_ROLE.ALL: return '允许其他成员代表你在你的账户中执行所有操作。包括聊天、提交、审批、付款、更新设置等。'; @@ -9805,7 +9759,7 @@ ${reportName}`, notAllowedMessage: (accountOwnerEmail: string) => `作为${accountOwnerEmail}的副驾驶,你没有权限执行此操作。抱歉!`, removeCopilotAccess: '移除我的副驾驶访问权限', removeCopilotAccessTitle: '移除副驾驶访问权限?', - removeCopilotAccessConfirmation: ({delegatorName}: RemoveCopilotAccessConfirmationParams) => `您确定要移除对${delegatorName}的 Expensify 账户的副驾驶访问权限吗?此操作无法撤销。`, + removeCopilotAccessConfirmation: (delegatorName: string) => `您确定要移除对${delegatorName}的 Expensify 账户的副驾驶访问权限吗?此操作无法撤销。`, removeCopilotAccessConfirm: '移除访问权限', copilotAccess: 'Copilot 访问', }, @@ -9818,9 +9772,9 @@ ${reportName}`, nothingToPreview: '无可预览内容', editJson: '编辑 JSON:', preview: '预览:', - missingProperty: ({propertyName}: MissingPropertyParams) => `缺少 ${propertyName}`, - invalidProperty: ({propertyName, expectedType}: InvalidPropertyParams) => `无效属性:${propertyName} - 预期:${expectedType}`, - invalidValue: ({expectedValues}: InvalidValueParams) => `无效的值 - 预期为:${expectedValues}`, + missingProperty: ({propertyName}: {propertyName: string}) => `缺少 ${propertyName}`, + invalidProperty: ({propertyName, expectedType}: {propertyName: string; expectedType: string}) => `无效属性:${propertyName} - 预期:${expectedType}`, + invalidValue: ({expectedValues}: {expectedValues: string}) => `无效的值 - 预期为:${expectedValues}`, missingValue: '缺少值', createReportAction: '创建报表操作', reportAction: '报告操作', diff --git a/src/libs/ModifiedExpenseMessage.ts b/src/libs/ModifiedExpenseMessage.ts index cc4d91414c9f..7c4a68fe1343 100644 --- a/src/libs/ModifiedExpenseMessage.ts +++ b/src/libs/ModifiedExpenseMessage.ts @@ -172,7 +172,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/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 96480b001db3..89f57bff1b93 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,7 +469,7 @@ 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()); } /** @@ -498,7 +498,7 @@ function getCrossBorderReimbursedMessage( 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( @@ -2200,9 +2200,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'); @@ -2232,7 +2232,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'); @@ -2249,9 +2249,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: @@ -2922,7 +2922,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 { @@ -3428,11 +3428,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') { @@ -3945,7 +3941,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 { @@ -3954,7 +3950,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 { diff --git a/src/libs/Violations/ViolationsUtils.ts b/src/libs/Violations/ViolationsUtils.ts index 53dd27f6aa0e..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': @@ -1011,13 +1011,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 8fdaf3a5df74..9a192904aab9 100644 --- a/src/pages/Debug/DebugDetails.tsx +++ b/src/pages/Debug/DebugDetails.tsx @@ -112,7 +112,12 @@ function DebugDetails({formType, data, policyHasEnabledTags, policyID, children, try { validate(key, DebugUtils.onyxDataToString(value)); } catch (e) { - const {cause, message} = e as SyntaxError; + if (!(e instanceof Error)) { + newErrors[key] = String(e); + continue; + } + + const {message, cause} = e; newErrors[key] = cause || message === 'debug.missingValue' ? translate(message as TranslationPaths, cause as never) : message; } } diff --git a/src/pages/DynamicReportDetailsPage.tsx b/src/pages/DynamicReportDetailsPage.tsx index aa2256246c76..e5747745ead5 100644 --- a/src/pages/DynamicReportDetailsPage.tsx +++ b/src/pages/DynamicReportDetailsPage.tsx @@ -366,7 +366,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/Search/EmptySearchView.tsx b/src/pages/Search/EmptySearchView.tsx index ac2b28fec467..ec83efdb3608 100644 --- a/src/pages/Search/EmptySearchView.tsx +++ b/src/pages/Search/EmptySearchView.tsx @@ -217,9 +217,7 @@ function EmptySearchViewContent({ content = { ...defaultViewItemHeader.folder, title: translate('search.searchResults.emptyStatementsResults.title'), - subtitle: translate('search.searchResults.emptyViolationSnapshotResults.subtitle', { - formattedDate: DateUtils.formatViolationSnapshotStartedAtDate(violationSnapshotStartedAt, timezone), - }), + subtitle: translate('search.searchResults.emptyViolationSnapshotResults.subtitle', DateUtils.formatViolationSnapshotStartedAtDate(violationSnapshotStartedAt, timezone)), }; } diff --git a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx index 696be8c8f51f..7bcb1bfa9881 100755 --- a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx @@ -462,8 +462,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 10517d5b77c4..603d06a576f8 100644 --- a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -529,7 +529,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'), }); @@ -82,7 +82,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/Copilot/CopilotPage.tsx b/src/pages/settings/Copilot/CopilotPage.tsx index f30e004fe596..4c4124f89b78 100644 --- a/src/pages/settings/Copilot/CopilotPage.tsx +++ b/src/pages/settings/Copilot/CopilotPage.tsx @@ -96,7 +96,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, @@ -181,7 +181,7 @@ function CopilotPage() { {!!role && ( diff --git a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx index 440defd8b5a7..825a597c376a 100644 --- a/src/pages/settings/Profile/Avatar/AvatarPreview.tsx +++ b/src/pages/settings/Profile/Avatar/AvatarPreview.tsx @@ -36,7 +36,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, phraseParam?: Record) => void; /** Opens the avatar crop screen for the picked image */ openCropper: (image: FileObject) => void; }; @@ -97,16 +97,16 @@ function AvatarPreview({selected, isRemoved, onImageRemoved, imageData, setError 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/useProfileAvatarForm.ts b/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts index 42ad0869ad1c..ff1b6e49e1e7 100644 --- a/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts +++ b/src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts @@ -36,7 +36,7 @@ function useProfileAvatarForm() { getHasUnsavedChanges: () => isDirty, }); - const setError = (error: TranslationPaths | null, phraseParam: Record) => { + const setError = (error: TranslationPaths | null, phraseParam: Record = {}) => { setErrorData({validationError: error, phraseParam}); }; diff --git a/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx b/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx index a5c6d25da652..85eedb5cc3dd 100644 --- a/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx +++ b/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx @@ -75,9 +75,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 1b2c00223a13..2ccab37eacc3 100644 --- a/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx +++ b/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx @@ -47,8 +47,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 e32872428472..aa6083b11c81 100644 --- a/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx +++ b/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx @@ -54,9 +54,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 cb1ddb856481..3bd3e07df6c2 100644 --- a/src/pages/settings/Subscription/PaymentCard/index.tsx +++ b/src/pages/settings/Subscription/PaymentCard/index.tsx @@ -72,10 +72,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 f45ca1aa7800..e047ae5f22f6 100644 --- a/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx +++ b/src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx @@ -55,10 +55,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 8d45f18e4daa..bbc2f114a9ca 100644 --- a/src/pages/settings/Subscription/SubscriptionSettings/index.tsx +++ b/src/pages/settings/Subscription/SubscriptionSettings/index.tsx @@ -95,10 +95,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/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index b110735649e0..61ad0cddea51 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -214,8 +214,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, @@ -522,7 +522,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 5feed19e71cf..8b70e798d309 100644 --- a/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx +++ b/src/pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage.tsx @@ -58,12 +58,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)} {isReimbursable ? translate('workspace.sageIntacct.defaultVendorDescription', true) - : translate('workspace.accounting.defaultVendorSelectHeader', { - connectionName: translate('workspace.accounting.connectionName', {connectionName: CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT}), - })} + : translate('workspace.accounting.defaultVendorSelectHeader', translate('workspace.accounting.connectionName', CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT))} ), diff --git a/src/pages/workspace/accounting/intacct/export/SageIntacctNonReimbursableExpensesPage.tsx b/src/pages/workspace/accounting/intacct/export/SageIntacctNonReimbursableExpensesPage.tsx index aa81144aa6f3..b6bdcf476f14 100644 --- a/src/pages/workspace/accounting/intacct/export/SageIntacctNonReimbursableExpensesPage.tsx +++ b/src/pages/workspace/accounting/intacct/export/SageIntacctNonReimbursableExpensesPage.tsx @@ -97,7 +97,7 @@ function SageIntacctNonReimbursableExpensesPage({policy}: WithPolicyConnectionsP description: translate('workspace.sageIntacct.defaultVendor'), helperText: config?.export.nonReimbursable === CONST.SAGE_INTACCT_NON_REIMBURSABLE_EXPENSE_TYPE.CREDIT_CARD_CHARGE - ? translate('workspace.accounting.defaultVendorHelperText', {isSet: isDefaultVendorSet}) + ? translate('workspace.accounting.defaultVendorHelperText', isDefaultVendorSet) : undefined, onPress: () => { if (!policyID) { diff --git a/src/pages/workspace/accounting/intacct/import/SageIntacctImportPage.tsx b/src/pages/workspace/accounting/intacct/import/SageIntacctImportPage.tsx index a86b174f01ed..bff207abfb76 100644 --- a/src/pages/workspace/accounting/intacct/import/SageIntacctImportPage.tsx +++ b/src/pages/workspace/accounting/intacct/import/SageIntacctImportPage.tsx @@ -58,7 +58,7 @@ function SageIntacctImportPage({policy}: WithPolicyProps) { Object.values(CONST.SAGE_INTACCT_CONFIG.MAPPINGS).map((mapping) => { 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 2df05881a73f..91372141408a 100644 --- a/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx +++ b/src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx @@ -79,7 +79,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)} Navigation.goBack()} /> - {translate('workspace.common.existingConnectionsDescription', {connectionName: CONST.POLICY.CONNECTIONS.NAME.RILLET})} + {translate('workspace.common.existingConnectionsDescription', CONST.POLICY.CONNECTIONS.NAME.RILLET)} 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 369a82e0b49c..edbd7e0b9388 100644 --- a/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx +++ b/src/pages/workspace/reports/ReportFieldsInitialValuePage.tsx @@ -86,9 +86,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 97aa17ba74e9..6a61da39e702 100644 --- a/tests/ui/ReportActionItemTest.tsx +++ b/tests/ui/ReportActionItemTest.tsx @@ -762,7 +762,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 6fe6a0c1098c..a6d5f5923b9b 100644 --- a/tests/unit/ModifiedExpenseMessageTest.ts +++ b/tests/unit/ModifiedExpenseMessageTest.ts @@ -136,7 +136,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', () => { @@ -145,10 +145,7 @@ 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', () => { @@ -166,10 +163,7 @@ 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', () => { @@ -199,7 +193,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', policyExpenseReport.reportName, 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 () => { @@ -219,7 +213,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); }); }); @@ -1997,10 +1991,7 @@ 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); }); @@ -2024,10 +2015,7 @@ 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 caf98066b00b..9bb3d92e4fea 100644 --- a/tests/unit/OptionsListUtilsTest.tsx +++ b/tests/unit/OptionsListUtilsTest.tsx @@ -6370,11 +6370,7 @@ describe('OptionsListUtils', () => { currentUserLogin: '', }); - expect(lastMessage).toBe( - translateLocal('reportArchiveReasons.policyDeleted', { - policyName: policy.name, - }), - ); + expect(lastMessage).toBe(translateLocal('reportArchiveReasons.policyDeleted', {policyName: policy.name})); }); it('should use the passed policy name for REMOVED_FROM_POLICY archive reason', async () => { @@ -6414,12 +6410,7 @@ describe('OptionsListUtils', () => { currentUserLogin: '', }); - expect(lastMessage).toBe( - translateLocal('reportArchiveReasons.removedFromPolicy', { - displayName: 'Hidden', - policyName: policy.name, - }), - ); + expect(lastMessage).toBe(translateLocal('reportArchiveReasons.removedFromPolicy', {displayName: 'Hidden', policyName: policy.name})); }); it('resolves the workspace-unavailable fallback through the provided translate function when the archived policy is unavailable', async () => { diff --git a/tests/unit/ReportActionsUtilsTest.ts b/tests/unit/ReportActionsUtilsTest.ts index 83a049ec3624..16af45432579 100644 --- a/tests/unit/ReportActionsUtilsTest.ts +++ b/tests/unit/ReportActionsUtilsTest.ts @@ -2519,11 +2519,12 @@ 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', previousRole).toLowerCase(), + translateLocal('workspace.common.roleName', newRole).toLowerCase(), + ); const actual = ReportActionsUtils.getPolicyChangeLogUpdateEmployee(translateLocal, action); expect(actual).toBe(`${expectedCustomFieldMessage}, ${expectedRoleMessage}`);