Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
dangrous committed Sep 26, 2024
1 parent 4f93277 commit 588789f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ import type {
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
OnBehalfOfParams,
OOOEventSummaryFullDayParams,
OOOEventSummaryPartialDayParams,
OptionalParam,
Expand Down Expand Up @@ -4818,7 +4819,7 @@ const translations = {
}
},
genericError: 'Oops, something went wrong. Please try again.',
onBehalfOfMessage: (delegator: string) => `on behalf of ${delegator}`,
onBehalfOfMessage: ({delegator}: OnBehalfOfParams) => `on behalf of ${delegator}`,
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.',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import type {
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
OnBehalfOfParams,
OOOEventSummaryFullDayParams,
OOOEventSummaryPartialDayParams,
OptionalParam,
Expand Down Expand Up @@ -5338,7 +5339,7 @@ const translations = {
}
},
genericError: '¡Ups! Ha ocurrido un error. Por favor, inténtalo de nuevo.',
onBehalfOfMessage: (delegator: string) => `en nombre de ${delegator}`,
onBehalfOfMessage: ({delegator}: OnBehalfOfParams) => `en nombre de ${delegator}`,
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.',
Expand Down
5 changes: 5 additions & 0 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ type AuthenticationErrorParams = {
connectionName: string;
};

type OnBehalfOfParams = {
delegator: string;
};

export type {
AuthenticationErrorParams,
ImportMembersSuccessfullDescriptionParams,
Expand Down Expand Up @@ -748,4 +752,5 @@ export type {
CharacterLengthLimitParams,
OptionalParam,
AssignCardParams,
OnBehalfOfParams,
};
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function ReportActionItemSingle({
</View>
) : null}
{action?.delegateAccountID && !isReportPreviewAction && (
<Text style={[styles.chatDelegateMessage]}>{translate('delegate.onBehalfOfMessage', accountOwnerDetails?.displayName ?? '')}</Text>
<Text style={[styles.chatDelegateMessage]}>{translate('delegate.onBehalfOfMessage', {delegator: accountOwnerDetails?.displayName ?? ''})}</Text>
)}
<View style={hasBeenFlagged ? styles.blockquote : {}}>{children}</View>
</View>
Expand Down

0 comments on commit 588789f

Please sign in to comment.