Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions frontend/src/guidance/StrengthCategory.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Box, Text } from '@chakra-ui/react'
import { t, Trans } from '@lingui/macro'
import { Trans } from '@lingui/macro'

export function StrengthCategory({ items, strength, type }) {
export function StrengthCategory({ items, strength, title }) {
let titleBg = 'info'
let mainBg = 'info'
let title = ''

switch (strength) {
case 'strong':
Expand All @@ -23,15 +22,6 @@ export function StrengthCategory({ items, strength, type }) {
break
}

switch (type) {
case 'ciphers':
title = t`Strong Ciphers:`
break
case 'curves':
title = t`Strong Curves:`
break
}

const mapCiphers = (cipherList) => {
return (
<Box px="2">
Expand Down Expand Up @@ -67,5 +57,5 @@ export function StrengthCategory({ items, strength, type }) {
StrengthCategory.propTypes = {
items: PropTypes.arrayOf(PropTypes.string).isRequired,
strength: PropTypes.oneOf(['strong', 'acceptable', 'weak']).isRequired,
type: PropTypes.oneOf(['curves', 'ciphers']).isRequired,
title: PropTypes.string.isRequired,
}
12 changes: 6 additions & 6 deletions frontend/src/guidance/WebGuidance.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,35 @@ const WebGuidance = ({ webScan, sslStatus, httpsStatus }) => {
<Accordion allowMultiple defaultIndex={[0, 1]}>
<ScanDetails title={t`Ciphers`}>
<StrengthCategory
type="ciphers"
title={t`Strong Ciphers:`}
strength="strong"
items={tlsScan.strongCiphers}
/>
<StrengthCategory
type="ciphers"
title={t`Acceptable Ciphers:`}
strength="acceptable"
items={tlsScan.acceptableCiphers}
/>
<StrengthCategory
type="ciphers"
title={t`Weak Ciphers:`}
strength="weak"
items={tlsScan.weakCiphers}
/>
</ScanDetails>

<ScanDetails title={t`Curves`}>
<StrengthCategory
type="ciphers"
title={t`Strong Curves:`}
strength="strong"
items={tlsScan.strongCiphers}
/>
<StrengthCategory
type="ciphers"
title={t`Acceptable Curves:`}
strength="acceptable"
items={tlsScan.acceptableCiphers}
/>
<StrengthCategory
type="ciphers"
title={t`Weak Curves:`}
strength="weak"
items={tlsScan.weakCiphers}
/>
Expand Down
32 changes: 16 additions & 16 deletions frontend/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ msgstr "A verification link has been sent to your email account"
msgid "ADMIN"
msgstr "ADMIN"

#: src/guidance/ScanDetails.js:156
#~ msgid "Acceptable Ciphers:"
#~ msgstr "Acceptable Ciphers:"
#: src/guidance/WebGuidance.js:76
msgid "Acceptable Ciphers:"
msgstr "Acceptable Ciphers:"

#: src/guidance/ScanDetails.js:189
#~ msgid "Acceptable Curves:"
#~ msgstr "Acceptable Curves:"
#: src/guidance/WebGuidance.js:94
msgid "Acceptable Curves:"
msgstr "Acceptable Curves:"

#: src/termsConditions/TermsConditionsPage.js:85
msgid "Access to Information"
Expand Down Expand Up @@ -1706,7 +1706,7 @@ msgstr "No values were supplied when attempting to update organization details."
msgid "Non-compliant"
msgstr "Non-compliant"

#: src/guidance/StrengthCategory.js:48
#: src/guidance/StrengthCategory.js:38
#: src/user/EditableUserTFAMethod.js:164
msgid "None"
msgstr "None"
Expand Down Expand Up @@ -2388,11 +2388,11 @@ msgstr "Sort by:"
msgid "Source IP Address"
msgstr "Source IP Address"

#: src/guidance/StrengthCategory.js:28
#: src/guidance/WebGuidance.js:71
msgid "Strong Ciphers:"
msgstr "Strong Ciphers:"

#: src/guidance/StrengthCategory.js:31
#: src/guidance/WebGuidance.js:89
msgid "Strong Curves:"
msgstr "Strong Curves:"

Expand Down Expand Up @@ -2864,13 +2864,13 @@ msgstr "We've sent an SMS to your registered phone number with an authentication
msgid "We've sent you an email with an authentication code to sign into Tracker."
msgstr "We've sent you an email with an authentication code to sign into Tracker."

#: src/guidance/ScanDetails.js:165
#~ msgid "Weak Ciphers:"
#~ msgstr "Weak Ciphers:"
#: src/guidance/WebGuidance.js:81
msgid "Weak Ciphers:"
msgstr "Weak Ciphers:"

#: src/guidance/ScanDetails.js:198
#~ msgid "Weak Curves:"
#~ msgstr "Weak Curves:"
#: src/guidance/WebGuidance.js:99
msgid "Weak Curves:"
msgstr "Weak Curves:"

#: src/admin/WebCheckPage.js:173
msgid "Web Check"
Expand Down Expand Up @@ -3055,7 +3055,7 @@ msgid "https://https-everywhere.canada.ca/en/help/"
msgstr "https://https-everywhere.canada.ca/en/help/"

#: src/app/App.js:118
#: src/app/App.js:341
#: src/app/App.js:339
#: src/user/MyTrackerPage.js:43
#: src/user/MyTrackerPage.js:74
msgid "myTracker"
Expand Down
32 changes: 16 additions & 16 deletions frontend/src/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ msgstr "Un lien de vérification a été envoyé à votre compte de messagerie."
msgid "ADMIN"
msgstr "ADMIN"

#: src/guidance/ScanDetails.js:156
#~ msgid "Acceptable Ciphers:"
#~ msgstr "Ciphers acceptés:"
#: src/guidance/WebGuidance.js:76
msgid "Acceptable Ciphers:"
msgstr "Ciphers acceptés:"

#: src/guidance/ScanDetails.js:189
#~ msgid "Acceptable Curves:"
#~ msgstr "Courbes acceptables:"
#: src/guidance/WebGuidance.js:94
msgid "Acceptable Curves:"
msgstr "Courbes acceptables:"

#: src/termsConditions/TermsConditionsPage.js:85
msgid "Access to Information"
Expand Down Expand Up @@ -1690,7 +1690,7 @@ msgstr "Aucune valeur n'a été fournie lors de la tentative de mise à jour des
msgid "Non-compliant"
msgstr "Non conforme"

#: src/guidance/StrengthCategory.js:48
#: src/guidance/StrengthCategory.js:38
#: src/user/EditableUserTFAMethod.js:164
msgid "None"
msgstr "Aucun"
Expand Down Expand Up @@ -2372,11 +2372,11 @@ msgstr "Trier par:"
msgid "Source IP Address"
msgstr "Adresse IP source"

#: src/guidance/StrengthCategory.js:28
#: src/guidance/WebGuidance.js:71
msgid "Strong Ciphers:"
msgstr "Ciphers forts:"

#: src/guidance/StrengthCategory.js:31
#: src/guidance/WebGuidance.js:89
msgid "Strong Curves:"
msgstr "Courbes fortes:"

Expand Down Expand Up @@ -2844,13 +2844,13 @@ msgstr "Nous avons envoyé un SMS à votre numéro de téléphone enregistré av
msgid "We've sent you an email with an authentication code to sign into Tracker."
msgstr "Nous vous avons envoyé un e-mail avec un code d'authentification pour vous connecter à Suivi."

#: src/guidance/ScanDetails.js:165
#~ msgid "Weak Ciphers:"
#~ msgstr "Ciphers faibles:"
#: src/guidance/WebGuidance.js:81
msgid "Weak Ciphers:"
msgstr "Ciphers faibles:"

#: src/guidance/ScanDetails.js:198
#~ msgid "Weak Curves:"
#~ msgstr "Courbes faibles:"
#: src/guidance/WebGuidance.js:99
msgid "Weak Curves:"
msgstr "Courbes faibles:"

#: src/admin/WebCheckPage.js:173
msgid "Web Check"
Expand Down Expand Up @@ -3027,7 +3027,7 @@ msgid "https://https-everywhere.canada.ca/en/help/"
msgstr "https://https-everywhere.canada.ca/en/help/"

#: src/app/App.js:118
#: src/app/App.js:341
#: src/app/App.js:339
#: src/user/MyTrackerPage.js:43
#: src/user/MyTrackerPage.js:74
msgid "myTracker"
Expand Down