Make valid-i18n-keys rule strict and fix most exceptions

This commit is contained in:
Jamie Kyle 2023-03-29 10:15:54 -07:00 committed by GitHub
parent 18a6da310f
commit 11cfcb4e32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 796 additions and 687 deletions

View file

@ -35,32 +35,30 @@ export function SafetyNumberNotification({
i18n,
toggleSafetyNumberModal,
}: Props): JSX.Element {
const changeKey = isGroup
? 'safetyNumberChangedGroup'
: 'safetyNumberChanged';
const name = (
<span
key="external-1"
className="module-safety-number-notification__contact"
>
<ContactName
title={contact.title}
module="module-safety-number-notification__contact"
/>
</span>
);
return (
<SystemMessage
icon="safety-number"
contents={
// eslint-disable-next-line local-rules/valid-i18n-keys
<Intl
id={changeKey}
components={{
name: (
<span
key="external-1"
className="module-safety-number-notification__contact"
>
<ContactName
title={contact.title}
module="module-safety-number-notification__contact"
/>
</span>
),
}}
i18n={i18n}
/>
isGroup ? (
<Intl
id="safetyNumberChangedGroup"
components={{ name }}
i18n={i18n}
/>
) : (
<Intl id="safetyNumberChanged" components={{ name }} i18n={i18n} />
)
}
button={
<Button