aboutsummaryrefslogtreecommitdiffstats
path: root/packages/renderer/src/components/locationBar/SecurityLabel.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/renderer/src/components/locationBar/SecurityLabel.tsx')
-rw-r--r--packages/renderer/src/components/locationBar/SecurityLabel.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/renderer/src/components/locationBar/SecurityLabel.tsx b/packages/renderer/src/components/locationBar/SecurityLabel.tsx
index 6e27e6b..d9dff86 100644
--- a/packages/renderer/src/components/locationBar/SecurityLabel.tsx
+++ b/packages/renderer/src/components/locationBar/SecurityLabel.tsx
@@ -24,6 +24,7 @@ import IconGlobe from '@mui/icons-material/Public';
24import IconWarning from '@mui/icons-material/Warning'; 24import IconWarning from '@mui/icons-material/Warning';
25import { styled } from '@mui/material/styles'; 25import { styled } from '@mui/material/styles';
26import React from 'react'; 26import React from 'react';
27import { useTranslation } from 'react-i18next';
27 28
28import LocationInputAdornment from './LocationInputAdornment'; 29import LocationInputAdornment from './LocationInputAdornment';
29import getAlertColor from './getAlertColor'; 30import getAlertColor from './getAlertColor';
@@ -60,6 +61,10 @@ export default function SecurityLabel({
60 changed: boolean; 61 changed: boolean;
61 position: 'start' | 'end'; 62 position: 'start' | 'end';
62}): JSX.Element { 63}): JSX.Element {
64 const { t } = useTranslation(undefined, {
65 keyPrefix: 'securityLabel',
66 });
67
63 const { type } = splitResult; 68 const { type } = splitResult;
64 if (changed || type === 'empty') { 69 if (changed || type === 'empty') {
65 return ( 70 return (
@@ -75,14 +80,14 @@ export default function SecurityLabel({
75 <SecurityLabelRoot 80 <SecurityLabelRoot
76 alert={false} 81 alert={false}
77 position={position} 82 position={position}
78 aria-label="Secure connection" 83 aria-label={t('secureConnection')}
79 > 84 >
80 <IconHttps fontSize="small" /> 85 <IconHttps fontSize="small" />
81 </SecurityLabelRoot> 86 </SecurityLabelRoot>
82 ) : ( 87 ) : (
83 <SecurityLabelRoot alert position={position}> 88 <SecurityLabelRoot alert position={position}>
84 <IconHttp fontSize="small" /> 89 <IconHttp fontSize="small" />
85 <SecurityLabelText>Not secure</SecurityLabelText> 90 <SecurityLabelText>{t('notSecureConnection')}</SecurityLabelText>
86 </SecurityLabelRoot> 91 </SecurityLabelRoot>
87 ); 92 );
88 } 93 }
@@ -90,7 +95,7 @@ export default function SecurityLabel({
90 return ( 95 return (
91 <SecurityLabelRoot alert position={position}> 96 <SecurityLabelRoot alert position={position}>
92 <IconWarning fontSize="small" /> 97 <IconWarning fontSize="small" />
93 <SecurityLabelText>Unknown site</SecurityLabelText> 98 <SecurityLabelText>{t('unknownSite')}</SecurityLabelText>
94 </SecurityLabelRoot> 99 </SecurityLabelRoot>
95 ); 100 );
96 default: 101 default: