import React from 'react' import { __, _n, sprintf } from '@wordpress/i18n' export interface EnvironmentDisclosureProps { summary: Record errorCount: number } export const EnvironmentDisclosure: React.FC = ({ summary, errorCount }) =>
{__('What gets sent with this report', 'code-snippets')}
{Object.entries(summary).map(([label, value]) =>
{label}
{value}
)}
{__('JavaScript errors', 'code-snippets')}
{0 === errorCount ? __('none on this page', 'code-snippets') // translators: %d: number of JavaScript errors captured on the current page. : sprintf(_n('%d error captured', '%d errors captured', errorCount, 'code-snippets'), errorCount)}

{__('Your site address, email address and full plugin list stay with the Code Snippets team. Only the report itself and the version numbers appear on the public issue tracker.', 'code-snippets')}