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
10 changes: 5 additions & 5 deletions assets/js/features/components/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@wordpress/components';
import { safeHTML } from '@wordpress/dom';
import { RawHTML, WPElement } from '@wordpress/element';
import { _n, __, sprintf } from '@wordpress/i18n';
import { _n, __, _x, sprintf } from '@wordpress/i18n';

/**
* Internal dependencies.
Expand Down Expand Up @@ -162,15 +162,15 @@ const Control = ({
}
if (titles.length === 2) {
return sprintf(
/* translators: %1$s: first feature name, %2$s: second feature name */
__('%1$s and %2$s', 'elasticpress'),
/* translators: %1$s: feature name, %2$s: last feature name */
_x('%1$s and %2$s', 'two feature names', 'elasticpress'),
titles[0],
titles[1],
);
}
return sprintf(
/* translators: %1$s: comma-separated list of feature names, %2$s: last feature name */
__('%1$s and %2$s', 'elasticpress'),
/* translators: %1$s: feature names, %2$s: last feature name */
_x('%1$s and %2$s', 'multiple feature names', 'elasticpress'),
titles.slice(0, -1).join(__(', ', 'elasticpress')),
titles[titles.length - 1],
);
Expand Down
1 change: 1 addition & 0 deletions assets/js/instant-results/components/results/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const Pagination = ({ offset, onNext, onPage = {}, onPrevious, perPage, total })
}
}}
aria-current={isCurrent ? 'page' : undefined}
/* translators: %d: Page number. */
aria-label={sprintf(__('Page %d', 'elasticpress'), page.value)}
>
{page.value}
Expand Down
6 changes: 3 additions & 3 deletions assets/js/synonyms/apps/synonyms-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default () => {
title: (
<GroupTab isValid={!synonyms.some((s) => !s.valid)}>
{
/* translators: Synonyms count */
/* translators: %d: Number of synonyms. */
sprintf(__('Synonyms (%d)', 'elasticpress'), synonyms.length)
}
</GroupTab>
Expand All @@ -94,7 +94,7 @@ export default () => {
title: (
<GroupTab isValid={!hyponyms.some((s) => !s.valid)}>
{
/* translators: Hyponyms count */
/* translators: %d: Number of hyponyms. */
sprintf(__('Hyponyms (%d)', 'elasticpress'), hyponyms.length)
}
</GroupTab>
Expand All @@ -105,7 +105,7 @@ export default () => {
title: (
<GroupTab isValid={!replacements.some((s) => !s.valid)}>
{
/* translators: Replacements count */
/* translators: %d: Number of replacements. */
sprintf(__('Replacements (%d)', 'elasticpress'), replacements.length)
}
</GroupTab>
Expand Down
Loading