Skip to content

Commit

Permalink
Substack subscriber importer: add translation function (#96348)
Browse files Browse the repository at this point in the history
  • Loading branch information
simison authored Nov 13, 2024
1 parent 1589ed2 commit 5ad924e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { Notice } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';

export default function SuccessNotice( { allEmailsCount }: { allEmailsCount: number } ) {
const { _n } = useI18n();
return (
<Notice status="success" className="importer__notice" isDismissible={ false }>
{ createInterpolateElement(
sprintf(
// @TODO: add _n() translation function once we finalize this copy.
// translators: %d is the number of subscribers
'All set! We’ve found <strong>%d subscribers</strong> to import.',
_n(
'All set! We’ve found <strong>%d subscriber</strong> to import.',
'All set! We’ve found <strong>%d subscribers</strong> to import.',
allEmailsCount
),
allEmailsCount
),
{
Expand Down

0 comments on commit 5ad924e

Please sign in to comment.