Add new eslint plugin to check for valid i18n keys
This commit is contained in:
parent
465b4cb0fb
commit
569b6e14a6
39 changed files with 447 additions and 78 deletions
|
@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue