webpack/scenes/SmartProxy/AdditionalCapsuleContent.js in katello-4.11.0.rc2 vs webpack/scenes/SmartProxy/AdditionalCapsuleContent.js in katello-4.11.0

- old
+ new

@@ -1,18 +1,20 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { translate as __ } from 'foremanReact/common/I18n'; import ContentConfig from '../Content/ContentConfig'; const AdditionalCapsuleContent = ({ counts }) => { const { deb: debPackageCount = 0, docker_manifest: dockerManifestCount = 0, + docker_manifest_list: dockerManifestListCount = 0, docker_tag: dockerTagCount = 0, file: fileCount = 0, erratum: errataCount = 0, package_group: packageGroup = 0, - 'rpm.modulemd': moduleStreamCount = 0, + module_stream: moduleStreamCount = 0, } = counts; const contentConfigTypes = ContentConfig.filter(({ names: { capsuleCountLabel } }) => !!counts[`${capsuleCountLabel}`]) .map(({ @@ -30,41 +32,46 @@ return ( <> {errataCount > 0 && <> - {`${errataCount} Errata`}<br /> + {`${errataCount} ${__('Errata')}`}<br /> </> } {moduleStreamCount > 0 && <> - {`${moduleStreamCount} Module streams`}<br /> + {`${moduleStreamCount} ${__('Module streams')}`}<br /> </> } {packageGroup > 0 && <> - {`${packageGroup} Package groups`}<br /> + {`${packageGroup} ${__('Package groups')}`}<br /> </> } {dockerTagCount > 0 && <> - {`${dockerTagCount} Container tags`}<br /> + {`${dockerTagCount} ${__('Container tags')}`}<br /> </> } {dockerManifestCount > 0 && <> - {`${dockerManifestCount} Container manifests`}<br /> + {`${dockerManifestCount} ${__('Container manifests')}`}<br /> </> } + {dockerManifestListCount > 0 && + <> + {`${dockerManifestListCount} ${__('Container manifest lists')}`}<br /> + </> + } {fileCount > 0 && <> - {`${fileCount} Files`}<br /> + {`${fileCount} ${__('Files')}`}<br /> </> } {debPackageCount > 0 && <> - {`${debPackageCount} Debian packages`}<br /> + {`${debPackageCount} ${__('Debian packages')}`}<br /> </>} {contentConfigTypes?.length > 0 && contentConfigTypes.map(({ count, pluralLowercase }) => ( <React.Fragment key={pluralLowercase}> {`${count} ${pluralLowercase}`}<br /> @@ -76,14 +83,15 @@ AdditionalCapsuleContent.propTypes = { counts: PropTypes.shape({ deb: PropTypes.number, docker_manifest: PropTypes.number, + docker_manifest_list: PropTypes.number, docker_tag: PropTypes.number, file: PropTypes.number, erratum: PropTypes.number, package_group: PropTypes.number, - 'rpm.modulemd': PropTypes.number, + module_stream: PropTypes.number, }), }; AdditionalCapsuleContent.defaultProps = { counts: {},