mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 07:58:46 +01:00
Add new eslint plugin to check for valid i18n keys
This commit is contained in:
@@ -26,11 +26,13 @@ export function RemoveGroupMemberConfirmationDialog({
|
||||
onClose,
|
||||
onRemove,
|
||||
}: PropsType): JSX.Element {
|
||||
const descriptionKey = isAccessControlEnabled(
|
||||
const accessControlEnabled = isAccessControlEnabled(
|
||||
group.accessControlAddFromInviteLink
|
||||
)
|
||||
? 'RemoveGroupMemberConfirmation__description__with-link'
|
||||
: 'RemoveGroupMemberConfirmation__description';
|
||||
);
|
||||
|
||||
const intlComponents = {
|
||||
name: <ContactName title={conversation.title} />,
|
||||
};
|
||||
|
||||
return (
|
||||
<ConfirmationDialog
|
||||
@@ -45,13 +47,19 @@ export function RemoveGroupMemberConfirmationDialog({
|
||||
i18n={i18n}
|
||||
onClose={onClose}
|
||||
title={
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id={descriptionKey}
|
||||
components={{
|
||||
name: <ContactName title={conversation.title} />,
|
||||
}}
|
||||
/>
|
||||
accessControlEnabled ? (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="RemoveGroupMemberConfirmation__description__with-link"
|
||||
components={intlComponents}
|
||||
/>
|
||||
) : (
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="RemoveGroupMemberConfirmation__description"
|
||||
components={intlComponents}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user