Skip to content

Commit

Permalink
fix: Wrong copy in tooltips for the green shields of users and conver…
Browse files Browse the repository at this point in the history
…sations (#16991)
  • Loading branch information
przemvs authored Mar 4, 2024
1 parent 90827f2 commit bd489a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"E2EI.certificateNotDownloaded": "End-to-end identity certificate not downloaded",
"E2EI.certificateRevoked": "End-to-end identity certificate revoked",
"E2EI.certificateTitle": "End-to-end identity certificate",
"E2EI.conversationVerified": "Conversation verified (End-to-end identity)",
"E2EI.copyCertificate": "Copy to Clipboard",
"E2EI.deviceVerified": "Device verified (End-to-end identity)",
"E2EI.downloadCertificate": "Download",
Expand All @@ -72,6 +73,7 @@
"E2EI.showCertificateDetails": "Show Certificate Details",
"E2EI.status": "Status:",
"E2EI.updateCertificate": "Update Certificate",
"E2EI.userDevicesVerified": "All devices verified (End-to-end identity)",
"E2EI.valid": "Valid",
"E2EI.verified": "Verified (End-to-end Identity)",
"LOGOUT_REASON.ACCOUNT_REMOVED": "You were signed out because your account was deleted.",
Expand Down Expand Up @@ -1533,4 +1535,4 @@
"wireMacos": "{{brandName}} for macOS",
"wireWindows": "{{brandName}} for Windows",
"wire_for_web": "{{brandName}} for Web"
}
}
11 changes: 9 additions & 2 deletions src/script/components/VerificationBadge/VerificationBadges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ import {Conversation} from 'src/script/entity/Conversation';
import {User} from 'src/script/entity/User';
import {useUserIdentity} from 'src/script/hooks/useDeviceIdentities';
import {useKoSubscribableChildren} from 'Util/ComponentUtil';
import {t} from 'Util/LocalizerUtil';
import {StringIdentifer, t} from 'Util/LocalizerUtil';

type VerificationBadgeContext = 'user' | 'conversation' | 'device';

interface VerificationBadgesProps {
conversationProtocol?: ConversationProtocol;
isProteusVerified?: boolean;
Expand Down Expand Up @@ -131,8 +132,14 @@ const MLSVerificationBadge = ({context, MLSStatus}: {MLSStatus?: MLSStatuses; co

switch (MLSStatus) {
case MLSStatuses.VALID:
const translationKeys: Record<VerificationBadgeContext, StringIdentifer> = {
conversation: 'E2EI.conversationVerified',
user: 'E2EI.userDevicesVerified',
device: 'E2EI.deviceVerified',
};

return (
<Tooltip body={t('E2EI.deviceVerified')} {...mlsVerificationProps}>
<Tooltip body={t(translationKeys[context])} {...mlsVerificationProps}>
<MLSVerified />
</Tooltip>
);
Expand Down

0 comments on commit bd489a2

Please sign in to comment.