Skip to content

Commit

Permalink
i18n - security table headers
Browse files Browse the repository at this point in the history
  • Loading branch information
maurycupitt committed Jul 13, 2023
1 parent fd20a4b commit ef430cf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
16 changes: 12 additions & 4 deletions public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@
},
"POLICY_TABLE_THREAT": {
"message": "THREAT",
"description": "THe column header in the policy table for threat"
"description": "The column header in the policy table for threat"
},
"POLICY_TABLE_POLICY": {
"message": "POLICY",
"description": "THe column header in the policy table for policy"
"description": "The column header in the policy table for policy"
},
"POLICY_TABLE_CONSTRAINT": {
"message": "CONSTRAINT",
"description": "THe column header in the policy table for constraint name"
"description": "The column header in the policy table for constraint name"
},
"POLICY_TABLE_CONDITION": {
"message": "CONDITION",
"description": "THe column header in the policy table for condition"
"description": "The column header in the policy table for condition"
},
"POPUP_TAB_INFO": {
"message": "Info",
Expand Down Expand Up @@ -267,6 +267,14 @@
"message": "All Versions",
"description": "The list of all the available component versions"
},
"SECURITY_TABLE_CVSS": {
"message": "CVSS",
"description": "The column header in the security table for cvss"
},
"SECURITY_TABLE_ISSUE": {
"message": "ISSUE",
"description": "The column header in the security table for issue"
},
"SIDEBAR_LINK_GETTING_STARTED": {
"message": "Getting Started",
"description": "Sidebar Navigation Link in Options Page"
Expand Down
7 changes: 5 additions & 2 deletions src/components/Popup/IQServer/SecurityPage/SecurityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import { ApiSecurityIssueDTO } from '@sonatype/nexus-iq-api-client'
import { sortSecurityIssues, SecurityIssue } from '../../../../types/ArtifactMessage'
import { NxTable, NxThreatIndicatorLegend } from '@sonatype/react-shared-components'

// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-explicit-any
const _browser: any = chrome ? chrome : browser

function IqSecurityPage() {
const popupContext = useContext(ExtensionPopupContext)
const [open, setOpen] = useState('')
Expand Down Expand Up @@ -55,8 +58,8 @@ function IqSecurityPage() {
<NxTable.Head>
<NxTable.Row isClickable className='nx-table-row nx-table-row--header'>
{/*<th className="nx-cell nx-cell--header nx-cell--num">Threat</th>*/}
<NxTable.Cell>CVSS</NxTable.Cell>
<NxTable.Cell>Issue</NxTable.Cell>
<NxTable.Cell>{_browser.i18n.getMessage('SECURITY_TABLE_CVSS')}</NxTable.Cell>
<NxTable.Cell>{_browser.i18n.getMessage('SECURITY_TABLE_ISSUE')}</NxTable.Cell>
<NxTable.Cell chevron />
</NxTable.Row>
</NxTable.Head>
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const popupConfig = {
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
},
{
test: /\.(ttf|eot|woff2?|svg|png)$/,
test: /\.(ttf|eot|woff2?|svg|png|json)$/,
type: 'asset'
}
],
Expand Down

0 comments on commit ef430cf

Please sign in to comment.