Add new eslint plugin to check for valid i18n keys

This commit is contained in:
Jamie Kyle
2023-01-05 14:43:33 -08:00
committed by GitHub
parent 465b4cb0fb
commit 569b6e14a6
39 changed files with 447 additions and 78 deletions

View File

@@ -64,7 +64,6 @@ export function SafetyNumberViewer({
);
const { isVerified } = contact;
const verifiedStatusKey = isVerified ? 'isVerified' : 'isNotVerified';
const verifyButtonText = isVerified ? i18n('unverify') : i18n('verify');
return (
@@ -79,7 +78,12 @@ export function SafetyNumberViewer({
) : (
<span className="module-SafetyNumberViewer__icon--shield" />
)}
<Intl i18n={i18n} id={verifiedStatusKey} components={[boldName]} />
{}
{isVerified ? (
<Intl i18n={i18n} id="isVerified" components={[boldName]} />
) : (
<Intl i18n={i18n} id="isNotVerified" components={[boldName]} />
)}
</div>
<div className="module-SafetyNumberViewer__button">
<Button